fb:porticula NoPaste
DeGUI test
Uploader: | DonStevone |
Datum/Zeit: | 31.10.2011 17:23:36 |
#Include "DeGUI.bi"
Screenres 640, 480, 32
Declare Sub Ev(ID as String)
Dim Shared as Button PTR Butt(1 to 2)
Butt(1) = NEW Button("Button1", @Ev, 150, 50, 1, 1, "Text", 60, 10)
Butt(2) = NEW Button("Button2", @Ev, 150, 75, 1, 1, "Show1", 60, 10)
Dim as Label Label1 = Label(250, 10, "Damn easy - GUI")
Dim Shared as Checkbox PTR Check
Check = NEW Checkbox(150, 100, "Check1", @Ev)
Dim Shared as TextField PTR Text
Text = New TextField(200, 200, 20, "TextField")
While(NOT Multikey(&h01))
Butt(1)->Control()
Butt(2)->Control()
Check->Control()
Text->Control()
ScreenLock
Butt(1)->GClear(0)
Butt(2)->GClear(0)
Label1.GClear()
Check->GClear()
Text->GClear()
'######
Butt(1)->G()
Butt(2)->G()
Label1.G()
Check->G()
Text->G()
ScreenUnlock
Sleep 10
Wend
Sub Ev(ID as String)
If ID = "Button1" then
Print "Button1 Clicked"
Butt(1)->Hide()
If Check->Checked = 1 then Print Text->Text
Endif
If ID = "Button2" then Butt(1)->Show()
If ID = "Check1" then Print "Status: " & Check->Checked
End Sub