From f460a00c347b44b7633366275e56a1f2b34b7fa7 Mon Sep 17 00:00:00 2001 From: Ian C Date: Thu, 15 Sep 2005 01:02:13 +0000 Subject: *** empty log message *** --- simplegui/.cvsignore | 2 ++ simplegui/font.bmf | Bin 0 -> 24420 bytes simplegui/test.bmx | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 simplegui/.cvsignore create mode 100644 simplegui/font.bmf create mode 100644 simplegui/test.bmx (limited to 'simplegui') 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 Binary files /dev/null and b/simplegui/font.bmf 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 -- cgit v1.2.3