diff options
Diffstat (limited to 'simplegui')
-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 |