summaryrefslogtreecommitdiff
path: root/simplegui
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 /simplegui
parent3fa76a0019ee15564b1c6c5d3f5e194c30939b16 (diff)
*** empty log message ***
Diffstat (limited to 'simplegui')
-rw-r--r--simplegui/.cvsignore2
-rw-r--r--simplegui/font.bmfbin0 -> 24420 bytes
-rw-r--r--simplegui/test.bmx52
3 files changed, 54 insertions, 0 deletions
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