diff options
-rw-r--r-- | glflag/test.bmx | 38 | ||||
-rw-r--r-- | imagefont/bmaxtest.bmf | bin | 22016 -> 84480 bytes | |||
-rw-r--r-- | imagefont/test.bmx | 6 | ||||
-rw-r--r-- | simplegui/.cvsignore | 2 | ||||
-rw-r--r-- | simplegui/font.bmf | bin | 0 -> 24420 bytes | |||
-rw-r--r-- | simplegui/test.bmx | 52 |
6 files changed, 81 insertions, 17 deletions
diff --git a/glflag/test.bmx b/glflag/test.bmx index 24aa3ba..7fadef6 100644 --- a/glflag/test.bmx +++ b/glflag/test.bmx @@ -27,25 +27,33 @@ glDisable(GL_LIGHTING) glMatrixMode(GL_MODELVIEW) -cells=50 -size=1 - -'f:GLFlag=GLFlag.Create(tid1,cells,cells,size,False,-200) -f:GLFlag=GLFlag.Create(tid2,cells,cells,size,True,-200) - -c=0 +cells=100 +size=10 + +f1:TGLFlag=TGLFlag.Create(tid1,cells,cells,size,False,-400) +f2:TGLFlag=TGLFlag.Create(tid2,cells,cells,size,True,-400) + +f1.SetMove(300) +f2.SetMove(300) +'f.xrot=-60 + +For x=0 Until cells + For y=0 Until cells + dx=cells/2-x + dy=cells/2-y + + f1.Nudge(x,y,((dx*dx)+(dy*dy))*10,50) + f2.Nudge(x,y,((dx*dx)+(dy*dy))*10+1800,50) + c:+100 + Next +Next While Not KeyDown(KEY_ESCAPE) - c:+1 - - If (c=100) - f.Nudge(Rand(0,cells-1),Rand(0,cells-1),Rnd(),Rnd(),Rnd()) - c=0 - EndIf - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT) glLoadIdentity() - f.Render(0.9,0.95) + f1.Render() + f2.Render() + 'f.yrot:+0.1 bglSwapBuffers FlushMem Wend diff --git a/imagefont/bmaxtest.bmf b/imagefont/bmaxtest.bmf Binary files differindex 55ae145..1867516 100644 --- a/imagefont/bmaxtest.bmf +++ b/imagefont/bmaxtest.bmf diff --git a/imagefont/test.bmx b/imagefont/test.bmx index 29095c4..b17278a 100644 --- a/imagefont/test.bmx +++ b/imagefont/test.bmx @@ -3,14 +3,14 @@ Import noddybox.bitmapfont 'Import "BitmapFont.bmx" -Incbin "bmaxtest3.bmf" +Incbin "bmaxtest.bmf" Const SCRW=640 Const SCRH=480 SetGraphicsDriver GLMax2DDriver() Graphics SCRW,SCRH,32,60' Or HARDSYNC -fnt:BitmapFont=BitmapFont.Load("incbin::bmaxtest3.bmf",0) +fnt:TBitmapFont=TBitmapFont.Load("incbin::bmaxtest.bmf",0) If fnt=Null RuntimeError "Failed to open font" @@ -117,3 +117,5 @@ While Not KeyHit(KEY_ESCAPE) Flip Wend + +EndGraphics diff --git a/simplegui/.cvsignore b/simplegui/.cvsignore new file mode 100644 index 0000000..8f686ea --- /dev/null +++ b/simplegui/.cvsignore @@ -0,0 +1,2 @@ +test.debug.exe
+.bmx
\ No newline at end of file diff --git a/simplegui/font.bmf b/simplegui/font.bmf Binary files differnew file mode 100644 index 0000000..38378e6 --- /dev/null +++ b/simplegui/font.bmf diff --git a/simplegui/test.bmx b/simplegui/test.bmx new file mode 100644 index 0000000..aaf94c2 --- /dev/null +++ b/simplegui/test.bmx @@ -0,0 +1,52 @@ +' $Id$ + +Import noddybox.simplegui +Import noddybox.bitmapfont + +Incbin "font.bmf" + +Const SCRW=800 +Const SCRH=600 + +SetGraphicsDriver GLMax2DDriver() +Graphics SCRW,SCRH,32,60' Or HARDSYNC + +font:TBitmapFont=TBitmapFont.Load("incbin::font.bmf",0) + +gui:TGUIHandler=TGUIHandler.Create() + +label1:TLabel=TLabel.Create(font,0,0,"Text 1: ") +label2:TLabel=TLabel.Create(font,0,20,"Text 2: ") +text1:TText=TText.Create(font,label1.w,0,"Text entry 1",20) +text2:TText=TText.Create(font,label2.w,20,"Text entry 2",30) + +gui.Register(label1) +gui.Register(label2) +gui.Register(text1) +gui.Register(text2) + +SetBlend(ALPHABLEND) + +While Not KeyHit(KEY_ESCAPE) + Cls + + If KeyHit(KEY_F1) + gui.SetFocus(Null) + EndIf + + If KeyHit(KEY_F2) + gui.SetFocus(text1) + EndIf + + If KeyHit(KEY_F3) + gui.SetFocus(text2) + EndIf + + gui.EventLoop() + + Flip + FlushMem +Wend + +EndGraphics +End |