Weibo's GUIde - GUI Editor for BlitzPlus and I think MaxGUI

Started by Amon, March 12, 2023, 11:16:20

Previous topic - Next topic

Amon

Weibo's GUIde 14a



It exports to .bmx so I'm thinking it is for MaxGUI also. I'm going to test that now.

This is the code it exports for BlitzMax.

'GUIde 1.4 BlitzMAX export
SuperStrict
AppTitle ="EditWindow"
Global EditWindow:TGadget
Global btnButton0:TGadget
Global teaTextArea0:TGadget
Global btnButton1:TGadget
Global tfdTextField0:TGadget
EditWindow=CreateWindow("EditWindow",0,00,400,400,Desktop(),WINDOW_TITLEBAR|WINDOW_RESIZABLE)
btnButton0=CreateButton("btnButton0",32,32,64,24,EditWindow,BUTTON_PUSH)
SetGadgetLayout btnButton0,1,0,1,0
teaTextArea0=CreateTextArea(32,64,272,144,EditWindow,0)
SetGadgetText teaTextArea0,"teaTextArea0"
SetTextAreaColor teaTextArea0,255,255,255,1
SetTextAreaColor teaTextArea0,0,0,0,0
SetGadgetLayout teaTextArea0,1,0,1,0
btnButton1=CreateButton("btnButton1",240,216,64,24,EditWindow,BUTTON_PUSH)
SetGadgetLayout btnButton1,1,0,1,0
tfdTextField0=CreateTextField(104,32,200,20,EditWindow)
SetGadgetText tfdTextField0,"textfield"
SetGadgetLayout tfdTextField0,1,0,1,0

'-mainloop--------------------------------------------------------------

Repeat
Select WaitEvent()
Case EVENT_GADGETACTION ' interacted with gadget
DoGadgetAction()
Case EVENT_WINDOWCLOSE ' close gadget
Exit
End Select
Forever

'-gadget actions--------------------------------------------------------

Function DoGadgetAction()
Select EventSource()
Case btnButton0 ' user pressed button

Case btnButton1 ' user pressed button

Case tfdTextField0
If EventData() = 13 Then ' user pressed return in textfield
EndIf

End Select
End Function