summaryrefslogtreecommitdiff
path: root/imagefont
diff options
context:
space:
mode:
Diffstat (limited to 'imagefont')
-rw-r--r--imagefont/test.bmx20
1 files changed, 12 insertions, 8 deletions
diff --git a/imagefont/test.bmx b/imagefont/test.bmx
index c587247..29095c4 100644
--- a/imagefont/test.bmx
+++ b/imagefont/test.bmx
@@ -3,14 +3,14 @@
Import noddybox.bitmapfont
'Import "BitmapFont.bmx"
-Incbin "bmaxtest.bmf"
+Incbin "bmaxtest3.bmf"
Const SCRW=640
Const SCRH=480
-Graphics SCRW,SCRH,32,60
-
-fnt:BitmapFont=BitmapFont.Load("incbin::bmaxtest.bmf")
+SetGraphicsDriver GLMax2DDriver()
+Graphics SCRW,SCRH,32,60' Or HARDSYNC
+fnt:BitmapFont=BitmapFont.Load("incbin::bmaxtest3.bmf",0)
If fnt=Null
RuntimeError "Failed to open font"
@@ -46,7 +46,9 @@ For f=0 Until NO
st[f]=Star.Create()
Next
-While False ' Not KeyHit(KEY_ESCAPE)
+SetBlend(ALPHABLEND)
+
+While Not KeyHit(KEY_ESCAPE)
Cls
For f=0 Until NO
@@ -65,7 +67,7 @@ While False ' Not KeyHit(KEY_ESCAPE)
If (c=100 Or c=255) ci=-ci
EndIf
- DrawText(MemAlloced(),0,100)
+ fnt.DrawColoured(MemAlloced(),0,300,255,0,0)
If KeyHit(KEY_SPACE) Then FlushMem
@@ -73,7 +75,7 @@ While False ' Not KeyHit(KEY_ESCAPE)
Wend
-sc=20
+sc=10
t$="THIS IS SOME VERY, VERY, *VERY* ~~LARGE SCROLLING TEXT....."
x#=0
ang#=0
@@ -88,8 +90,10 @@ While Not KeyHit(KEY_ESCAPE)
SetTransform(0,1,1)
+ Rem
DrawText("x="+x+" width="+(-fnt.TextWidth(t[0..1]))+" mem="+MemAlloced(),0,100)
DrawText("t="+t,0,110)
+ EndRem
SetTransform(ang,sc,sc)
@@ -97,7 +101,7 @@ While Not KeyHit(KEY_ESCAPE)
If ang<=-10 Or ang>=10 Then angi=-angi
- fnt.DrawColoured(t$,x,200,255,128,128)
+ fnt.DrawColoured(t$,x,0,255,255,255)'128,128)
If Not KeyDown(KEY_P)
x:-5