summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-09-15 01:02:13 +0000
committerIan C <ianc@noddybox.co.uk>2005-09-15 01:02:13 +0000
commitf460a00c347b44b7633366275e56a1f2b34b7fa7 (patch)
tree54dd80489cdc37f17aa82db9eb0e37eae39c6a90
parent3fa76a0019ee15564b1c6c5d3f5e194c30939b16 (diff)
*** empty log message ***
-rw-r--r--glflag/test.bmx38
-rw-r--r--imagefont/bmaxtest.bmfbin22016 -> 84480 bytes
-rw-r--r--imagefont/test.bmx6
-rw-r--r--simplegui/.cvsignore2
-rw-r--r--simplegui/font.bmfbin0 -> 24420 bytes
-rw-r--r--simplegui/test.bmx52
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
index 55ae145..1867516 100644
--- a/imagefont/bmaxtest.bmf
+++ b/imagefont/bmaxtest.bmf
Binary files differ
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
new file mode 100644
index 0000000..38378e6
--- /dev/null
+++ b/simplegui/font.bmf
Binary files differ
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