diff options
author | Ian C <ianc@noddybox.co.uk> | 2005-09-23 23:36:10 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2005-09-23 23:36:10 +0000 |
commit | 02008b9c367d517d4211298d8a732870e1e22c09 (patch) | |
tree | 829ba0d42da97411e4aef0c0235d2c39f80e6e4f | |
parent | b862dc950a4b19216e169c6d56a47b830b4ba769 (diff) |
*** empty log message ***
-rw-r--r-- | simplegui/test.bmx | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/simplegui/test.bmx b/simplegui/test.bmx index 9b916fd..0c1701e 100644 --- a/simplegui/test.bmx +++ b/simplegui/test.bmx @@ -33,6 +33,14 @@ Global numberf:TNumberFloat=TNumberFloat.Create(gui,80,60) TLabel.Create(gui,0,80,"Int:") Global numberi:TNumberInt=TNumberInt.Create(gui,80,80) +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:") +Global dnum:TNumberInt=TNumberInt.Create(dialog,dpanel.x+25,dpanel.y+25) +Global dok:TButton=TButton.Create(dialog,dpanel.x+5,dpanel.y+dpanel.h-25,dpanel.w/2-10,20,"OK",Null) +Global dcan:TButton=TButton.Create(dialog,dpanel.x+dpanel.w/2+5,dpanel.y+dpanel.h-25,dpanel.w/2-10,20,"Cancel",Null) + + SetBlend(ALPHABLEND) Global quit=False @@ -92,9 +100,17 @@ End Function Function Menu() - Local opt:Int=GUIMenu("A long long Menu",["Option 1","Option 2","Option 3"],MouseX(),MouseY()) + Local opt:Int=GUIMenu("A long long Menu",["Test Dialog","Option 1","Option 2","Option 3"],MouseX(),MouseY()) If opt>-1 - GUINotify("Selected " + opt) + If opt=0 + dnum.value=numberi.value + + If GUIDialog(dialog,dok,dcan) + numberi.value=dnum.value + EndIf + Else + GUINotify("Selected " + opt) + EndIf EndIf End Function |