summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-09-26 23:11:03 +0000
committerIan C <ianc@noddybox.co.uk>2005-09-26 23:11:03 +0000
commit57a46e7b6f61fa750b282ba6ac15b978eebb8335 (patch)
tree97d5ec6a0abf481bc10ac9d0d1b590c787c3cba6
parent02008b9c367d517d4211298d8a732870e1e22c09 (diff)
*** empty log message ***
-rw-r--r--algorithm/test.bmx11
-rw-r--r--simplegui/test.bmx14
2 files changed, 22 insertions, 3 deletions
diff --git a/algorithm/test.bmx b/algorithm/test.bmx
index 575c1d4..60ce813 100644
--- a/algorithm/test.bmx
+++ b/algorithm/test.bmx
@@ -9,7 +9,7 @@ SetGraphicsDriver GLMax2DDriver()
Graphics SCRW,SCRH,32,60' Or HARDSYNC
While Not KeyHit(KEY_ESCAPE)
- 'Cls
+ Cls
Local l:TList=DoLine(Rand(0,SCRW),Rand(0,SCRH),Rand(0,SCRW),Rand(0,SCRH))
@@ -18,6 +18,15 @@ While Not KeyHit(KEY_ESCAPE)
Plot(p.x,p.y)
Next
+ Local pa:TAlgoPoint[]=DoCircle(Rand(0,SCRW),Rand(0,SCRH),Rand(100,200))
+
+ For Local f:Int=0 To 359
+ Local nf:Int=(f+1) Mod 360
+
+ SetColor(Rand(100,255),Rand(100,255),Rand(100,255))
+ DrawLine(pa[f].x,pa[f].y,pa[nf].x,pa[nf].y)
+ Next
+
Flip
FlushMem
Wend
diff --git a/simplegui/test.bmx b/simplegui/test.bmx
index 0c1701e..6249fd5 100644
--- a/simplegui/test.bmx
+++ b/simplegui/test.bmx
@@ -19,8 +19,8 @@ Global gui:TGUIHandler=TGUIHandler.Create()
Global label1:TLabel=TLabel.Create(gui,0,0,"Text 1:")
Global label2:TLabel=TLabel.Create(gui,0,20,"Text 2:")
-Global text1:TText=TText.Create(gui,label1.w,0,"Text entry 1",20,TextCallback)
-Global text2:TText=TText.Create(gui,label2.w,20,"Text entry 2",30)
+Global text1:TText=TText.Create(gui,label1.w,0,"Text entry 1",20,False,TextCallback)
+Global text2:TText=TText.Create(gui,label2.w,20,"Text entry 2",30,False)
Global check1:TCheckbox=TCheckbox.Create(gui,400,0,"Check 1",CheckCallback)
Global check2:TCheckbox=TCheckbox.Create(gui,400,20,"Check 2")
Global button1:TButton=TButton.Create(gui,0,360,100,30,"Test Alerts",ButtonCallback)
@@ -33,6 +33,16 @@ Global numberf:TNumberFloat=TNumberFloat.Create(gui,80,60)
TLabel.Create(gui,0,80,"Int:")
Global numberi:TNumberInt=TNumberInt.Create(gui,80,80)
+TLabel.Create(gui,0,100,"Float")
+TText.Create(gui,100,100,"",20,TText.NUMERIC)
+TLabel.Create(gui,0,110,"Float pos")
+TText.Create(gui,100,110,"",20,TText.NUMERIC|TText.POSITIVE)
+TLabel.Create(gui,0,120,"Int")
+TText.Create(gui,100,120,"",20,TText.NUMERIC|TText.INTEGER)
+TLabel.Create(gui,0,130,"Int pos")
+TText.Create(gui,100,130,"",20,TText.NUMERIC|TText.INTEGER|TText.POSITIVE)
+
+
Global dialog:TGUIHandler=TGUIHandler.Create()
Global dpanel:TPanel=TPanel.Create(dialog,-1,-1,400,300)
Global dlab:TLabel=TLabel.Create(dialog,dpanel.x+5,dpanel.y+5,"Enter a number:")