Hello,
i have been working on and off on a window gadget system.
basically it sucks, but it looks totally awesome.
at the moment it isn't 100% functional but i'm getting there.
what is left to do is:
* file browser (Save, Load and OK button)
* some global variables that need to be resett
* if clicking the menu, make sure a button isn't clicked etc.
* parent and child based structure
* and other stuff, oh and + stuff.
anyway, here is a simple list of commands:
wigaMainMenuUpdate()==
wigaMainMenuGetClickedSub()==
wigaMainMenuGetClicked()==
wigaMainMenuSetup()==
wigaMainMenuAddMenuItem==( id, caption$ )
wigaMainMenuAddMenuSubItem==( parent, id, caption$ )
wigaWindowCreate==( id, caption$, xsize, ysize )
wigaWindowPosition==( id, xpos, ypos )
wigaWindowSetup()==
wigaWindowDisableClose==( id )
wigaWindowAddButton==( id, parent, caption, xpos, ypos )
wigaFrameSetup()=wigawigaFrameSetup.htm=
wigaFrameAdd=wigawigaFrameAdd=( id, xpos, ypos, xsize, ysize, caption$, parent )
wigaFrameUpdate()=wigawigaFrameUpdate=
wigaRadioButtonSetup()==
wigaRadioButtonAdd==( id, group, xpos, ypos, caption as string, parent )
wigaRadioButtonUpdate()==
wigaRadioButtonDrawNormal==( xpos, ypos )
wigaRadioButtonDrawHover==( xpos, ypos )
wigaRadioButtonDrawChecked==( xpos, ypos )
wigaRadioButtonIsChecked==( id )
wigaCheckBoxSetup()==
wigaCheckBoxAdd==( id, xpos, ypos, caption as string, parent )
wigaCheckBoxUpdate()==
wigaCheckBoxIsChecked==( id )
wigaCheckBoxSetChecked==( id, status )
wigaCheckBoxDrawChecked==( xpos, ypos )
wigaDropDownAddBox==( id, xpos, ypos, parent )
wigaDropDownAddItem==( parent, id, caption as string )
wigaDropDownSetup()==
wigaDropDownUpdate()==
wigaWindowAddLabel==( parent as integer, id as integer, caption as string, xpos as integer, ypos as integer )
wigaWindowGetActiveWindow()==
wigaWindowGetButtonClicked()==
wigaWindowUpdate()==
wigaToolbarSetup()==
wigaToolbarAddButton==( id as integer, image as integer, alt as string )
wigaToolbarAddSplitter==( id as integer )
wigaToolbarGetClicked()==
wigaToolbarUpdate()==
wigaSetupBrowser()==
wigaBrowserAddFilter==( id, name$, filter1$, filter2$, filter3$, filter4$, filter5$)
here is the wigaFunctions.dba file:
Type tWigaFrame
xpos as integer
ypos as integer
xsize as integer
ysize as integer
caption as string
parent as integer
EndType
Function wigaFrameSetup()
GLOBAL wigaFrameCount AS INTEGER
DIM wigaFrame( 30 ) AS tWigaFrame
EndFunction
Function wigaFrameAdd( id, xpos, ypos, xsize, ysize, caption as string, parent )
Inc wigaFrameCount, 1
wigaFrame( id ).xpos = xpos
wigaFrame( id ).ypos = ypos
wigaFrame( id ).xsize = xsize
wigaFrame( id ).ysize = ysize
wigaFrame( id ).caption = caption
wigaFrame( id ).parent = parent
EndFunction
Function wigaFrameUpdate()
For x = 1 To wigaFrameCount
xpos = wigaFrame( x ).xpos
ypos = wigaFrame( x ).ypos
xsize = wigaFrame( x ).xsize
ysize = wigaFrame( x ).ysize
length = len( wigaFrame( x ).caption ) *8.2
Ink RGB( 208, 208, 191 ), 0
Line xpos+3, ypos, xpos+10, ypos
Line xpos, ypos+3, xpos, ypos+ysize-3
Line xpos, ypos+3, xpos+3, ypos
Line xpos, ypos+ysize-3, xpos+3, ypos+ysize
Line xpos+3, ypos+ysize, xpos+xsize-3, ypos+ysize
Line xpos+xsize-3, ypos+ysize, xpos+xsize, ypos+ysize-3
Line xpos+xsize, ypos+ysize-3, xpos+xsize, ypos+3
Line xpos+xsize-3, ypos, xpos+xsize, ypos+4
Line xpos+length+10, ypos, xpos+xsize-3, ypos
Ink RGB( 000, 070, 213 ), 0 : Text xpos+10, ypos-7, wigaFrame( x ).caption
Next x
EndFunction
Type tWigaRadioButton
xpos as integer
ypos as integer
caption as string
parent as integer
length as integer
checked as boolean
group as integer
clicked as integer
id as integer
EndType
Function wigaRadioButtonSetup()
GLOBAL wigaRadioButtonLatch AS INTEGER
GLOBAL wigaRadioButtonCount AS INTEGER
GLOBAL wigaRadioButtonClick AS INTEGER
DIM wigaRadioButton( 30 ) AS tWigaRadioButton
DIM GroupClick( 30 ) AS tWigaRadioButton
EndFunction
Function wigaRadioButtonAdd( id, group, xpos, ypos, caption as string, parent )
Inc wigaRadioButtonCount, 1
wigaRadioButton( id ).xpos = xpos
wigaRadioButton( id ).ypos = ypos
wigaRadioButton( id ).caption = caption
wigaRadioButton( id ).parent = parent
wigaRadioButton( id ).group = group
EndFunction
Function wigaRadioButtonUpdate()
For x = 1 To wigaRadioButtonCount
xpos = wigaRadioButton( x ).xpos
ypos = wigaRadioButton( x ).ypos
length = 15+(len(wigaRadioButton( x ).caption) *8.2)
If length > wigaRadioButton( x ).length Then wigaRadioButton( x ).length = length
wigaRadioButtonDrawNormal( xpos, ypos+3 )
If MouseX() > xpos And MouseX() < xpos+length And MouseY() > ypos And MouseY() < ypos+15
wigaRadioButtonDrawHover( xpos, ypos+3 )
If MouseClick()=1 And wigaRadioButtonLatch = 0 And wigaDropDownOverItem = 0
wigaRadioButtonLatch = 1
If GroupClick( wigaRadioButton( x ).group ).clicked = 1
wigaRadioButton( GroupClick( wigaRadioButton( x ).group ).Id ).checked = 0
EndIf
wigaRadioButton( x ).checked = 1
GroupClick( wigaRadioButton( x ).group ).clicked = 1
GroupClick( wigaRadioButton( x ).group ).Id = x
EndIf
EndIf
Ink RGB( 000, 000, 000 ), 0 : Text xpos+15, ypos, wigaRadioButton( x ).caption
If wigaRadioButtonIsChecked( x )=1 Then : wigaRadioButtonDrawChecked( xpos, ypos+2 )
Next x
If MouseClick()=0 Then wigaRadioButtonLatch = 0
EndFunction
Function wigaRadioButtonDrawNormal( xpos, ypos )
Ink RGB( 049, 106, 197 ), 0
Dot xpos+4, ypos : Dot xpos+5, ypos : Dot xpos+4, ypos+9 : Dot xpos+5, ypos+9
Dot xpos+3, ypos+1 : Dot xpos+2, ypos+1 : Dot xpos+1, ypos+2 : Dot xpos+1, ypos+3
Dot xpos, ypos+4 : Dot xpos, ypos+5 : Dot xpos+1, ypos+6 : Dot xpos+1, ypos+7
Dot xpos+2, ypos+8 : Dot xpos+3, ypos+8 : Dot xpos+6, ypos+8 : Dot xpos+7, ypos+8
Dot xpos+8, ypos+7 : Dot xpos+8, ypos+6 : Dot xpos+9, ypos+5 : Dot xpos+9, ypos+4
Dot xpos+8, ypos+3 : Dot xpos+8, ypos+2 : Dot xpos+3, ypos+1 : Dot xpos+7, ypos+1 : Dot xpos+6, ypos+1
Ink RGB( 214, 225, 243 ), 0
Dot xpos+4, ypos+1 : Dot xpos+5, ypos+1
box xpos+2, ypos+2, xpos+8, ypos+8
Dot xpos+1, ypos+4 : Dot xpos+1, ypos+5
Dot xpos+8, ypos+4 : Dot xpos+8, ypos+5
Dot xpos+4, ypos+8 : Dot xpos+5, ypos+8
EndFunction
Function wigaRadioButtonDrawHover( xpos, ypos )
Ink RGB( 049, 106, 197 ), 0
Dot xpos+4, ypos : Dot xpos+5, ypos : Dot xpos+4, ypos+9 : Dot xpos+5, ypos+9
Dot xpos+3, ypos+1 : Dot xpos+2, ypos+1 : Dot xpos+1, ypos+2 : Dot xpos+1, ypos+3
Dot xpos, ypos+4 : Dot xpos, ypos+5 : Dot xpos+1, ypos+6 : Dot xpos+1, ypos+7
Dot xpos+2, ypos+8 : Dot xpos+3, ypos+8 : Dot xpos+6, ypos+8 : Dot xpos+7, ypos+8
Dot xpos+8, ypos+7 : Dot xpos+8, ypos+6 : Dot xpos+9, ypos+5 : Dot xpos+9, ypos+4
Dot xpos+8, ypos+3 : Dot xpos+8, ypos+2 : Dot xpos+3, ypos+1 : Dot xpos+7, ypos+1 : Dot xpos+6, ypos+1
Ink RGB( 152, 180, 226 ), 0
Dot xpos+4, ypos+1 : Dot xpos+5, ypos+1
box xpos+2, ypos+2, xpos+8, ypos+8
Dot xpos+1, ypos+4 : Dot xpos+1, ypos+5
Dot xpos+8, ypos+4 : Dot xpos+8, ypos+5
Dot xpos+4, ypos+8 : Dot xpos+5, ypos+8
EndFunction
Function wigaRadioButtonDrawChecked( xpos, ypos )
Ink RGB( 000, 000, 000 ), 0
dot xpos+3, ypos+3 : dot xpos+4, ypos+3 : dot xpos+5, ypos+3 : dot xpos+6, ypos+3
dot xpos+2, ypos+4 : dot xpos+3, ypos+4 : dot xpos+4, ypos+4 : dot xpos+5, ypos+4 : dot xpos+6, ypos+4 : dot xpos+7, ypos+4
dot xpos+2, ypos+5 : dot xpos+3, ypos+5 : dot xpos+4, ypos+5 : dot xpos+5, ypos+5 : dot xpos+6, ypos+5 : dot xpos+7, ypos+5
dot xpos+2, ypos+6 : dot xpos+3, ypos+6 : dot xpos+4, ypos+6 : dot xpos+5, ypos+6 : dot xpos+6, ypos+6 : dot xpos+7, ypos+6
dot xpos+2, ypos+7 : dot xpos+3, ypos+7 : dot xpos+4, ypos+7 : dot xpos+5, ypos+7 : dot xpos+6, ypos+7 : dot xpos+7, ypos+7
dot xpos+3, ypos+8 : dot xpos+4, ypos+8 : dot xpos+5, ypos+8 : dot xpos+6, ypos+8
EndFunction
Function wigaRadioButtonIsChecked( id )
returnValue = wigaRadioButton( id ).checked
EndFunction returnValue
Type tWigaCheckBox
xpos as integer
ypos as integer
caption as string
parent as integer
length as integer
checked as boolean
EndType
Function wigaCheckBoxSetup()
GLOBAL wigaCheckBoxLatch AS INTEGER
GLOBAL wigaCheckBoxCount AS INTEGER
GLOBAL wigaCheckBoxClick AS INTEGER
DIM wigaCheckBox( 30 ) AS tWigaCheckBox
EndFunction
Function wigaCheckBoxAdd( id, xpos, ypos, caption as string, parent )
Inc wigaCheckBoxCount, 1
wigaCheckBox( id ).xpos = xpos
wigaCheckBox( id ).ypos = ypos
wigaCheckBox( id ).caption = caption
wigaCheckBox( id ).parent = parent
EndFunction
Function wigaCheckBoxUpdate()
For x = 1 To wigaCheckBoxCount
xpos = wigaCheckBox( x ).xpos
ypos = wigaCheckBox( x ).ypos
length = 15+(len(wigaCheckBox( x ).caption) *8.2)
If length > wigaCheckBox( x ).length Then wigaCheckBox( x ).length = length
Ink RGB( 049, 106, 197 ), 0 : Box xpos, ypos+3, xpos+8, ypos+11
Ink RGB( 214, 225, 243 ), 0 : Box xpos+1, ypos+4, xpos+7, ypos+10
If MouseX() > xpos And MouseX() < xpos+wigaCheckBox( x ).length And MouseY() > ypos And MouseY() < ypos+15
Ink RGB( 049, 106, 197 ), 0 : Box xpos, ypos+3, xpos+8, ypos+11
Ink RGB( 152, 180, 226 ), 0 : Box xpos+1, ypos+4, xpos+7, ypos+10
If MouseClick()=1 And wigaCheckBoxLatch = 0
wigaCheckBoxLatch = 1
If wigaCheckBox( x ).checked = 1 Then wigaCheckBox( x ).checked = 0 Else wigaCheckBox( x ).checked = 1
EndIf
EndIf
Ink RGB( 000, 000, 000 ), 0 : Text xpos+15, ypos, wigaCheckBox( x ).caption
If wigaCheckBoxIsChecked( x )=1 Then : wigaCheckBoxDrawChecked( xpos, ypos+2 )
Next x
If MouseClick()=0 Then wigaCheckBoxLatch = 0
EndFunction
Function wigaCheckBoxIsChecked( id )
returnValue = wigaCheckBox( id ).checked
EndFunction returnValue
Function wigaCheckBoxSetChecked( id, status )
wigaCheckBox( id ).checked = status
EndFunction
Function wigaCheckBoxDrawChecked( xpos, ypos )
Ink RGB( 000, 000, 000 ), 0
Dot xpos+2, ypos+4 : Dot xpos+1, ypos+5
Dot xpos+2, ypos+5 : Dot xpos+3, ypos+5
Dot xpos+2, ypos+6 : Dot xpos+3, ypos+6
Dot xpos+3, ypos+7 : Dot xpos+4, ypos+6
Dot xpos+5, ypos+6 : Dot xpos+4, ypos+7
Dot xpos+1, ypos+5 : Dot xpos+4, ypos+8
Dot xpos+5, ypos+7 : Dot xpos+6, ypos+6
Dot xpos+6, ypos+5 : Dot xpos+7, ypos+5
Dot xpos+8, ypos+3 : Dot xpos+9, ypos+2
Dot xpos+10, ypos+1: Dot xpos+11, ypos
EndFunction
Function wigaDropDownAddBox( id, xpos, ypos, parent )
Inc wigaDropDownCount, 1
wigaDropDown( id, 0 ).xpos = xpos
wigaDropDown( id, 0 ).ypos = ypos
wigaDropDown( id, 0 ).parent = parent
EndFunction
Function wigaDropDownAddItem( parent, id, caption as string )
wigaDropDown( parent, 0 ).count = wigaDropDown( parent, 0 ).count + 1
wigaDropDown( parent, id ).str = caption
wigaDropDown( parent, 0 ).selected = 1
EndFunction
Type tWigaDropDown
str AS STRING
count as integer
xpos as integer
ypos as integer
parent as integer
length as integer
height as integer
selected as integer
EndType
Function wigaDropDownSetup()
GLOBAL wigaDropDownLatch AS INTEGER
GLOBAL wigaDropDownCount AS INTEGER
GLOBAL wigaDropDownClick AS INTEGER
GLOBAL wigaDropDownOverItem AS INTEGER
DIM wigaDropDown( 20, 20 ) AS tWigaDropDown
EndFunction
Function wigaDropDownUpdate()
For x = 1 to wigaDropDownCount
for t = 1 to wigaDropDown( x, 0 ).count
length = len(wigaDropDown( x, t ).str) *8.2
if length > wigaDropDown( x, 0 ).length then wigaDropDown( x, 0 ).length = length
next t
wigaDropDown( x, 0 ).height = wigaDropDown( x, 0 ).count *16
If wigaDropDown( id, 0 ).parent = 0
xpos = wigaDropDown( x, 0 ).xpos
ypos = wigaDropDown( x, 0 ).ypos
xposB = xpos+wigaDropDown( x, 0 ).length : yposB = ypos
EndIf
Ink RGB( 210, 206, 184 ), 0 : Box xpos, ypos, xpos+wigaDropDown( x, 0 ).length, ypos+15
Ink RGB( 236, 233, 216 ), 0 : Box xpos+1, ypos+1, xpos+wigaDropDown( x, 0 ).length-1, ypos+15-1
Ink RGB( 210, 206, 184 ), 0 : Box xposB, yposB, xposB+15, yposB+15
Ink RGB( 236, 233, 216 ), 0 : Box xposB+1, yposB+1, xposB+15-1, yposB+15-1
If MouseX() > xpos And MouseX() < (xposB+15) And MouseY() > yposB And MouseY() < yposB+15
If wigaDropDownOverItem = 0
Ink RGB( 049, 106, 197 ), 0 : Box xpos, ypos, xpos+wigaDropDown( x, 0 ).length, ypos+15
Ink RGB( 236, 233, 216 ), 0 : Box xpos+1, ypos+1, xpos+wigaDropDown( x, 0 ).length-1, ypos+15-1
Ink RGB( 049, 106, 197 ), 0 : Box xposB, yposB, xposB+15, yposB+15
Ink RGB( 189, 207, 236 ), 0 : Box xposB+1, yposB+1, xposB+15-1, yposB+15-1
If MouseClick()=1 And wigaDropDownLatch = 0
wigaDropDownLatch = 1
If x <> wigaDropDownClick
wigaDropDownClick = x
Else
If x = wigaDropDownClick
wigaDropDownClick = 0
EndIf
EndIf
EndIf
EndIf
EndIf
Ink RGB( 000, 000, 000 ), 0
Line xposB+4, yposB+6, xposB+11, yposB+6
Line xposB+5, yposB+7, xposB+10, yposB+7
Line xposB+6, yposB+8, xposB+9, yposB+8
Text xpos, ypos, wigaDropDownGetTextFromID( x )
Next x
wigaDropDownOverItem = 0
If wigaDropDownClick > 0
id = wigaDropDownClick
xpos = wigaDropDown( id, 0 ).xpos
ypos = wigaDropDown( id, 0 ).ypos+16
xpos2 = xpos + wigaDropDown( id, 0 ).length + 15
ypos2 = ypos + wigaDropDown( id, 0 ).height
Ink RGB( 241, 239, 226 ), 0 : Box xpos, ypos, xpos2, ypos2
Ink RGB( 239, 237, 222 ), 0 : Box xpos+1, ypos+1, xpos2-1, ypos2-1
Ink RGB( 255, 255, 255 ), 0 : Box xpos+17, ypos+2, xpos2-1, ypos2-1
for t = 1 to wigaDropDown( id, 0 ).count
If MouseX() > xpos+1 And MouseX() < xpos2-1 And MouseY() > ypos+(t*16)-16 And MouseY() < ypos+(t*16)
Ink RGB( 049, 106, 197 ), 0 : Box xpos+2, (ypos+(t*16)-16)+1, xpos2-2, (ypos+(t*16))-1
Ink RGB( 189, 207, 236 ), 0 : Box xpos+3, (ypos+(t*16)-16)+2, xpos2-3, (ypos+(t*16))-2
wigaDropDownOverItem = 1
If MouseClick()=1 And wigaDropDownLatch = 0
wigaDropDownLatch = 1
wigaDropDown( id, 0 ).selected = t
wigaDropDownClick = 0
EndIf
EndIf
Ink RGB( 000, 000, 000 ), 0 : Text xpos+16, ypos+(t*16)-16, wigaDropDown( id, t ).str
next t
EndIf
If MouseClick()=0 Then wigaDropDownLatch = 0
EndFunction
Function wigaDropDownGetTextFromID( id )
returnVal$ = wigaDropDown( id, wigaDropDown( id, 0 ).selected ).str
EndFunction returnVal$
Function wigaMainMenuSetup()
GLOBAL wigaMenuMouseButtonLatch AS INTEGER
GLOBAL wigaMenuItems AS INTEGER
GLOBAL wigaMenuItemClicked AS INTEGER
GLOBAL wigaMenuItemClicked_Temp AS INTEGER
Global wigaMenuItemClickedSub AS INTEGER
Global wigaMenuItemClickedSub_Temp AS INTEGER
DIM wigaItems( 20, 20 ) AS STRING
DIM wigaItemsCount( 20 ) AS INTEGER
Dim wigaItemXPos( 20 ) AS INTEGER
EndFunction
Function wigaMainMenuAddMenuItem( id as integer, caption as string )
wigaItems( id, 20 ) = caption
Inc wigaMenuItems, 1
EndFunction
Function wigaMainMenuAddMenuSubItem( parent as integer, id as integer, caption as string )
wigaItems( parent, id ) = caption
wigaItemsCount( parent ) = wigaItemsCount( parent ) + 1
wigaItems( parent, 0 ) = str$( wigaItemsCount( parent ) )
EndFunction
Function wigaMainMenuUpdate()
Ink RGB( 236, 233, 216 ), 0 : Box 0, 0, Screen Width()-1, 18
xpos = 5
For x = 1 to wigaMenuItems
xpos2 = xpos + len( wigaItems( x, 20 ) ) *10
If MouseX() > xpos-2 And MouseX() < xpos2-5 And MouseY() > 0 And MouseY() < 18
Ink RGB( 193, 190, 197 ), 0 : Box xpos-2, 0, xpos2-5, 18
Ink RGB( 236, 235, 230 ), 0 : Box xpos-1, 1, xpos2-6, 17
If MouseClick() = 1 And wigaMenuMouseButtonLatch = 0
wigaMenuMouseButtonLatch = 1
wigaMenuItemClicked_Temp = x
EndIf
EndIf
Ink RGB( 000, 000, 000 ), 0 : Text xpos, 1, wigaItems( x, 20 ) : wigaItemXPos( x ) = xpos
inc xpos, (len( wigaItems( x, 20 ))*10)+1
Next x
If wigaMenuItemClicked_Temp > 0
xpos = wigaItemXPos( wigaMenuItemClicked_Temp )
xpos2 = xpos + len( wigaItems( wigaMenuItemClicked_Temp, 20 ) ) *10
Ink RGB( 049, 106, 197 ), 0 : Box xpos-2, 0, xpos2-5, 18
Ink RGB( 189, 207, 236 ), 0 : Box xpos-1, 1, xpos2-6, 17
Ink RGB( 000, 000, 000 ), 0 : Text xpos, 1, wigaItems( wigaMenuItemClicked_Temp, 20 )
For x = 1 to Val(wigaItems( wigaMenuItemClicked_Temp, 0 ))
size = Len( wigaItems( wigaMenuItemClicked_Temp, x ) )
If size > width Then width = size
Next x
width = (width * 10)+21
height = Val(wigaItems( wigaMenuItemClicked_Temp, 0 )) *15
Ink RGB( 172, 168, 153 ), 0 : Box xpos-2, 18, (xpos-2)+width, 18+height
Ink RGB( 252, 252, 250 ), 0 : Box xpos-1, 19, (xpos-1)+(width-1), 19+(height-1)
Ink RGB( 239, 237, 222 ), 0 : Box xpos+1, 21, xpos+15, 18+(height-2)
wigaMenuItemClickedSub_Temp = 0
For x = 1 to Val(wigaItems( wigaMenuItemClicked_Temp, 0 ))
xpos = wigaItemXPos( wigaMenuItemClicked_Temp )
If MouseX() > xpos+1 And MouseX() < (xpos+1)+(width-5) And MouseY() > (18+((x*15)-15)) And MouseY() < (18+(x*15))
If wigaItems( wigaMenuItemClicked_Temp, x ) <> "-"
Ink RGB( 049, 106, 197 ), 0 : Box xpos+1, (18+((x*15)-15)), (xpos+1)+(width-5), (18+(x*15))
Ink RGB( 189, 207, 236 ), 0 : Box xpos+2, (18+((x*15)-15))+1, (xpos+1)+(width-6), (18+(x*15))-1
wigaMenuItemClickedSub_Temp = x
Else
wigaMenuMouseButtonLatch = 1
EndIf
EndIf
If wigaItems( wigaMenuItemClicked_Temp, x ) <> "-"
Ink RGB( 000, 000, 000 ),0 : Text xpos+20, 18+((x*15)-15), wigaItems( wigaMenuItemClicked_Temp, x )
Else
Ink RGB( 193, 190, 179 ), 0 : Line xpos+20, 18+((x*15)-8), (xpos+1)+(width-5), 18+((x*15)-8)
EndIf
Next x
If MouseClick() > 0 And wigaMenuMouseButtonLatch = 0
wigaMenuMouseButtonLatch = 1
wigaMenuItemClickedSub = wigaMenuItemClickedSub_Temp
wigaMenuItemClicked = wigaMenuItemClicked_Temp
wigaMenuItemClickedSub_Temp = 0
wigaMenuItemClicked_Temp = 0
EndIf
EndIf
If MouseClick() = 0 Then wigaMenuMouseButtonLatch = 0
EndFunction
Function wigaMainMenuGetClicked()
EndFunction wigaMenuItemClicked
Function wigaMainMenuGetClickedSub()
EndFunction wigaMenuItemClickedSub
Type TwigaWindows
Caption AS STRING
Width AS INTEGER
Height AS INTEGER
xPos AS INTEGER
yPos AS INTEGER
CloseEnable AS BOOLEAN
TotalButtons AS INTEGER
TotalLabels AS INTEGER
Exist AS BOOLEAN
Hidden AS BOOLEAN
EndType
Type TwigaWindowButtons
Caption AS STRING
xPos AS INTEGER
yPos AS INTEGER
EndType
Function wigaWindowSetup()
GLOBAL wigaTotalWindows
GLOBAL wigaTotalWindowButtons
GLOBAL wigaButtonClicked_Temp
GLOBAL wigaButtonClicked
GLOBAL wigaButtonMouseLatch
GLOBAL wigaActiveWindow
DIM wigaWindows( 20 ) AS TwigaWindows
DIM wigaWindowButtons( 20, 20 ) AS TwigaWindowButtons
DIM wigaWindowLabels( 20, 20 ) AS TwigaWindowButtons
EndFunction
Function wigaWindowCreate( id as integer, caption as string, width as integer, height as integer )
if wigaWindowExist( id ) = 0
wigaWindows( id ).Caption = caption
wigaWindows( id ).Width = width
wigaWindows( id ).Height = height
wigaWindows( id ).CloseEnable = 1
wigaWindows( id ).Exist = 1
wigaWindows( id ).Hidden = 0
Inc wigaTotalWindows, 1
endif
EndFunction
Function wigaWindowClose( id as integer )
wigaWindows( id ).Hidden = 1
EndFunction
Function wigaWindowExist( id )
returnValue = wigaWindows( id ).Exist
EndFunction returnValue
Function wigaWindowPosition( id as integer, xpos as integer, ypos as integer )
wigaWindows( id ).xPos = xpos
wigaWindows( id ).yPos = ypos
EndFunction
Function wigaWindowDisableClose( id as integer )
wigaWindows( id ).CloseEnable = 0
EndFunction
Function wigaWindowEnableClose( id as integer )
wigaWindows( id ).CloseEnable = 1
EndFunction
Function wigaWindowAddButton( parent as integer, id as integer, caption as string, xpos as integer, ypos as integer )
wigaWindowButtons( parent, id ).Caption = caption
wigaWindowButtons( parent, id ).xPos = xpos
wigaWindowButtons( parent, id ).yPos = ypos
wigaWindows( parent ).TotalButtons = wigaWindows( parent ).TotalButtons + 1
EndFunction
Function wigaWindowAddLabel( parent as integer, id as integer, caption as string, xpos as integer, ypos as integer )
wigaWindowLabels( parent, id ).Caption = caption
wigaWindowLabels( parent, id ).xPos = xpos
wigaWindowLabels( parent, id ).yPos = ypos
wigaWindows( parent ).TotalLabels = wigaWindows( parent ).TotalLabels + 1
EndFunction
Function wigaWindowGetActiveWindow()
EndFunction wigaActiveWindow
Function wigaWindowGetButtonClicked()
EndFunction wigaButtonClicked
Function wigaWindowUpdate()
wigaActiveWindow = 0
wigaButtonClicked = 0
for x = 1 to wigaTotalWindows
xpos = wigaWindows( x ).xPos
xpos2 = wigaWindows( x ).xPos + wigaWindows( x ).Width
ypos = wigaWindows( x ).yPos
ypos2 = wigaWindows( x ).yPos + wigaWindows( x ).Height
If MouseX() > xpos And MouseX() < xpos2 And MouseY() > ypos And MouseY() < ypos2
wigaActiveWindow = x
EndIf
Ink RGB( 000, 084, 227 ), 0 : Box xpos, ypos, xpos2, ypos2
Ink RGB( 239, 238, 222 ), 0 : Box xpos+2, ypos+20, xpos2-2, ypos2-2
Ink RGB( 255, 255, 255 ), 0 : Text xpos+5, ypos+2, wigaWindows( x ).Caption
If wigaWindows( x ).CloseEnable = 1
Ink RGB( 255, 255, 255 ), 0 : Box xpos2-20, ypos+2, xpos2-2, ypos+18
Ink RGB( 225, 086, 046 ), 0 : Box xpos2-19, ypos+3, xpos2-3, ypos+17
Ink RGB( 255, 255, 255 ), 0 : Text xpos2-15, ypos+3, "X"
EndIf
For z = 1 to wigaWindows( x ).TotalLabels
Ink RGB( 000, 000, 000 ), 0
Text xpos+wigaWindowLabels( x, z ).xPos, ypos+wigaWindowLabels( x, z ).yPos, wigaWindowLabels( x, z ).Caption
Next z
For z = 1 to wigaWindows( x ).TotalButtons
width = (len( wigaWindowButtons( x, z ).Caption ) * 8.2) + 7
xposB = wigaWindowButtons( x, z ).xPos
yposB = wigaWindowButtons( x, z ).yPos
xposB2 = xposB + width
yposB2 = yposB + 18
Ink RGB( 202, 198, 175 ), 0 : Box xpos+xposB, ypos+yposB, xpos+xposB2, ypos+yposB2
Ink RGB( 236, 235, 230 ), 0 : Box (xpos+xposB)+1, (ypos+yposB)+1, (xpos+xposB2)-1, (ypos+yposB2)-1
wigaButtonClicked_Temp = 0
If MouseX() > xpos+xposB And MouseX() < xpos+xposB2 And MouseY() > ypos+yposB And MouseY() < ypos+yposB2
Ink RGB( 049, 106, 197 ), 0 : Box xpos+xposB, ypos+yposB, xpos+xposB2, ypos+yposB2
Ink RGB( 189, 207, 236 ), 0 : Box (xpos+xposB)+1, (ypos+yposB)+1, (xpos+xposB2)-1, (ypos+yposB2)-1
wigaButtonClicked_Temp = z
EndIf
Ink RGB( 000, 000, 000 ), 0 : Text (xpos+xposB)+5, (ypos+yposB)+2, wigaWindowButtons( x, z ).Caption
If MouseClick() > 0 And wigaButtonMouseLatch = 0
if wigaMainMenuGetClicked() = 0 and wigaMainMenuGetClickedSub() = 0
wigaButtonMouseLatch = 1
wigaButtonClicked = wigaButtonClicked_Temp
endif
EndIf
Next z
next x
If MouseClick() = 0 Then wigaButtonMouseLatch = 0
EndFunction
Type TwigaToolbar
Alt AS STRING
Image AS INTEGER
Family AS STRING
EndType
Function wigaToolbarSetup()
GLOBAL wigaToolbarInitialized = 1
GLOBAL wigaToolbarTotalItems
GLOBAL wigaToolbarLatch
GLOBAL wigaToolbarClicked
DIM wigaToolbar( 30 ) AS TwigaToolbar
EndFunction
Function wigaToolbarAddButton( id as integer, image as integer, alt as string )
wigaToolbar( id ).Image = image
wigaToolbar( id ).Alt = alt
wigaToolbar( id ).Family = "button"
Inc wigaToolbarTotalItems, 1
EndFunction
Function wigaToolbarAddSplitter( id as integer )
wigaToolbar( id ).Image = 0
wigaToolbar( id ).Alt = ""
wigaToolbar( id ).Family = "splitter"
Inc wigaToolbarTotalItems, 1
EndFunction
Function wigaToolbarGetClicked()
EndFunction wigaToolbarClicked
Function wigaToolbarUpdate()
If wigaToolbarInitialized = 1
Ink RGB( 216, 210, 189 ), 0 : Box 0, 18, Screen Width()-1, 36
Ink RGB( 255, 255, 255 ), 0 : Box 0, 19, Screen Width()-1, 36
Ink RGB( 236, 233, 216 ), 0 : Box 0, 20, Screen Width()-1, 38
wigaToolbarClicked = 0
For x = 1 To wigaToolbarTotalItems
xpos = 0+(x*18)-18
ypos = 20
xpos2 = xpos+18
ypos2 = ypos + 17
If wigaToolbar( x ).Family <> "splitter"
Paste Image wigaToolbar( x ).Image, xpos+1, ypos, 1
If MouseX() > xpos And MouseX() < xpos2 And MouseY() > ypos And MouseY() < ypos2
If wigaMenuItemClickedSub_Temp = 0
Ink RGB( 049, 106, 197 ), 0 : Box xpos, ypos, xpos2, ypos2
Ink RGB( 189, 207, 236 ), 0 : Box xpos+1, ypos+1, xpos2-1, ypos2-1
Paste Image wigaToolbar( x ).Image, xpos+1, ypos, 1
If MouseClick() <> 0 And wigaToolbarLatch = 0
wigaToolbarLatch = 1
wigaToolbarClicked = x
EndIf
EndIf
EndIf
Else
Ink RGB( 216, 210, 189 ), 0 : Line xpos+8, ypos, xpos+8, ypos2
EndIf
Next x
EndIf
If MouseClick() = 0 Then wigaToolbarLatch = 0
EndFunction
Type TwigaBrowser
File AS STRING
Name AS STRING
EntryY AS INTEGER
f1 as string
f2 as string
f3 as string
f4 as string
f5 as string
EndType
Function wigaSetupBrowser()
GLOBAL wigaBrowserLatch AS INTEGER
GLOBAL wigaBrowserDiskButtonLatch AS INTEGER
GLOBAL wigaBrowserFileName AS STRING
GLOBAL wigaBrowserFolder AS STRING
GLOBAL wigaBrowserFullPath AS STRING
GLOBAL wigaBrowserFilters AS INTEGER
GLOBAL wigaBrowserDefaultDir AS STRING
GLOBAL wigaBrowserDiskShow AS BOOLEAN
GLOBAL wigaBrowserDrives AS INTEGER
GLOBAL wigaBrowserDrives2 AS INTEGER
GLOBAL wigaBrowserFolderPathText AS STRING
#CONSTANT wigaBrowserComputerLarge 0x65535
DIM wigaBrowserDrive( 20 ) AS STRING
DIM wigaBrowserDriveY( 20 ) AS INTEGER
DIM wigaBrowserFilter( 20 ) AS TwigaBrowser
wigaBrowserDefaultDir = get dir$()
wigaBrowserGetDrives()
load image "media/mycomputer_large.png", wigaBrowserComputerLarge
EndFunction
Function wigaBrowserAddFilter( id, name$, filter1$, filter2$, filter3$, filter4$, filter5$)
wigaBrowserFilter( id ).File = name$
wigaBrowserFilter( id ).f1 = filter1$
wigaBrowserFilter( id ).f2 = filter2$
wigaBrowserFilter( id ).f3 = filter3$
wigaBrowserFilter( id ).f4 = filter4$
wigaBrowserFilter( id ).f5 = filter5$
inc wigaBrowserFilters, 1
EndFunction
function draw_arrow_up( x , y )
ink 0,0
line x+4,y,x,y+3
line x+4,y,x+7,y+2
dot x+7,y+2
line x,y+3,x+2,y+3
line x+2,y+3,x+2,y+8
line x+3,y+8,x+5,y+8
line x+5,y+8,x+5,y+3
line x+5,y+3,x+7,y+3
ink rgb(250,64,64),0
line x+3,y+2,x+3,y+7
line x+4,y+2,x+4,y+7
line x+1,y+2,x+6,y+2
dot x+3,y+1
dot x+4,y+1
endfunction
function draw_folder_image( x , y )
ink 0,0
line x,y,x+5,y
line x,y,x,y+10
line x,y+10,x+10,y+10
line x+10,y+10,x+10,y+3
line x+5,y+3,x+10,y+3
line x+5,y+0,x+5,y+3
ink rgb(240,201,128),0
box x+1,y+1,x+4,y+4
box x+1,y+4,x+9,y+9
endfunction
Function wigaBrowserAddDiskButton( xpos, ypos )
clicked = 0 : mx = mousex() : my = mousey() : mc = mouseclick()
Ink RGB( 202, 198, 175 ), 0 : Box xpos, ypos, xpos+20, ypos+20
Ink RGB( 236, 235, 230 ), 0 : Box xpos+1, ypos+1, (xpos+20)-1, (ypos+20)-1
If mx > xpos And mx < xpos+20 And my > ypos And my < ypos+20
Ink RGB( 049, 106, 197 ), 0 : Box xpos, ypos, xpos+20, ypos+20
Ink RGB( 189, 207, 236 ), 0 : Box xpos+1, ypos+1, (xpos+20)-1, (ypos+20)-1
If MC = 1 And wigaBrowserDiskButtonLatch = 0
wigaBrowserDiskButtonLatch = 1
If wigaBrowserDiskShow = 1 Then wigaBrowserDiskShow = 0 Else wigaBrowserDiskShow = 1
EndIf
EndIf
Ink RGB( 000, 000, 000 ), 0
line xpos+7, ypos +9, xpos+13, ypos+9
line xpos+8, ypos+10, xpos+12, ypos+10
line xpos+9, ypos+11, xpos+11, ypos+11
If wigaBrowserDiskShow = 1
Ink RGB( 172, 168, 153 ), 0 : Box xpos-43, ypos, xpos-1, ypos+(wigaBrowserDrives*16)
Ink RGB( 252, 252, 250 ), 0 : Box xpos-42, ypos+1, xpos-2, ypos+(wigaBrowserDrives*16)-1
Ink RGB( 239, 237, 222 ), 0 : Box xpos-41, ypos+2, xpos-25, ypos+(wigaBrowserDrives*16)-2
Ink RGB( 000, 000, 000 ), 0
wigaBrowserDrives2 = 3
for xx = 1 to wigaBrowserDrives
if mx > xpos-42 And mx < xpos-2 And my > ypos + wigaBrowserDriveY( xx )-1 And my < ypos + wigaBrowserDriveY( xx )+15
Ink RGB( 049, 106, 197 ), 0 : Box xpos-42, ypos+wigaBrowserDriveY(xx)-1, xpos-2, ypos+wigaBrowserDriveY( xx )+15
Ink RGB( 189, 207, 236 ), 0 : Box xpos-41, ypos+wigaBrowserDriveY(xx), xpos-3, ypos+wigaBrowserDriveY( xx )+14
If mc = 1 And wigaBrowserDiskButtonLatch = 0
wigaBrowserDiskButtonLatch = 1
set dir wigaBrowserDrive( xx )
EndIf
EndIf
Ink RGB( 000, 000, 000 ), 0 : Text xpos-22, ypos + wigaBrowserDriveY( xx ), wigaBrowserDrive( xx )
wigaBrowserDriveY( xx+1 )=wigaBrowserDriveY( xx )+16
next xx
EndIf
If MC = 0 Then wigaBrowserDiskButtonLatch = 0
EndFunction
Function wigaBrowserAddUpButton( xpos, ypos )
clicked = 0 : mx = mousex() : my = mousey() : mc = mouseclick()
Ink RGB( 202, 198, 175 ), 0 : Box xpos, ypos, xpos+20, ypos+20
Ink RGB( 236, 235, 230 ), 0 : Box xpos+1, ypos+1, xpos+19, ypos+19
draw_folder_image( xpos+5 , ypos+5 )
draw_arrow_up( xpos+10 , ypos+4 )
EndFunction
Function wigaBrowserAddNewFolderButton( xpos, ypos )
clicked = 0 : mx = mousex() : my = mousey() : mc = mouseclick()
Ink RGB( 202, 198, 175 ), 0 : Box xpos, ypos, xpos+20, ypos+20
Ink RGB( 236, 235, 230 ), 0 : Box xpos+1, ypos+1, xpos+19, ypos+19
draw_folder_image( xpos+5 , ypos+5 )
EndFunction
Function wigaBrowserAddMyComputerButton( xpos, ypos )
clicked = 0 : mx = mousex() : my = mousey() : mc = mouseclick()
`Ink RGB( 202, 198, 175 ), 0 : Box xpos-17, ypos-2, xpos+50, ypos+50
`Ink RGB( 236, 235, 230 ), 0 : Box xpos-16, ypos-1, xpos+49, ypos+49
Ink RGB( 202, 198, 175 ), 0 : Box xpos, ypos-2, xpos+65, ypos+50
Ink RGB( 236, 235, 230 ), 0 : Box xpos+1, ypos-1, xpos+64, ypos+49
If mx > xpos And mx < xpos+65 And my > ypos-2 And my < ypos+50
Ink RGB( 049, 106, 197 ), 0 : Box xpos, ypos-2, xpos+65, ypos+50
Ink RGB( 189, 207, 236 ), 0 : Box xpos+1, ypos-1, xpos+64, ypos+49
`If MC = 1 And wigaBrowserDiskButtonLatch = 0
` wigaBrowserDiskButtonLatch = 1
` If wigaBrowserDiskShow = 1 Then wigaBrowserDiskShow = 0 Else wigaBrowserDiskShow = 1
`EndIf
EndIf
Paste Image wigaBrowserComputerLarge, xpos, ypos, 1
EndFunction
Function wigaBrowserDrawWindow( caption$, xpos, ypos, xpos2, ypos2 )
Ink RGB( 000, 084, 227 ), 0 : Box xpos, ypos, xpos2, ypos2
Ink RGB( 236, 233, 216 ), 0 : Box xpos+2, ypos+20, xpos2-2, ypos2-2
Ink RGB( 255, 255, 255 ), 0 : Text xpos+5, ypos+3, caption$
wigaBrowserAddMyComputerButton( xpos+5, ypos+50 )
Ink RGB( 000, 000, 000 ), 0
Text xpos+5, ypos+23, "Folder:"
Box xpos+65, ypos+22, xpos+350, ypos+42
Ink RGB( 255, 255, 255 ), 0 : Box xpos+66, ypos+23, xpos+349, ypos+41
Ink RGB( 000, 000, 000 ), 0 : Text xpos+67, ypos+22, wigaBrowserFolderPathText
Ink RGB( 127, 157, 185 ), 0 : Box xpos+75, ypos+50, xpos2-10, ypos2-50
Ink RGB( 255, 255, 255 ), 0 : Box xpos+76, ypos+51, xpos2-11, ypos2-51
wigaBrowserAddUpButton( xpos+351, ypos+22 )
wigaBrowserAddNewFolderButton( xpos+372, ypos+22 )
wigaBrowserFolder = get dir$()
wigaBrowserFolderPathText = wigaBrowserFolder
If len(wigaBrowserFolderPathText)>50
wigaBrowserFolderPathText = right$( wigaBrowserFolderPathText, 50 )
EndIf
EndFunction
Function wigaBrowserGetDrives()
Perform Checklist For Drives
wigaBrowserDrives = checklist quantity()
For x= 1 To wigaBrowserDrives
a$ = Checklist String$(x)
wigaBrowserDrive(x) = left$( a$, 2 )
Next x
EndFunction
Function wigaBrowserCall( caption$, dir$, xpos, ypos )
cd dir$
xpos2 = xpos + 400
ypos2 = ypos + 300
repeat
wigaBrowserDrawWindow( caption$, xpos, ypos, xpos2, ypos2 )
remstart
ink rgb(192,192,192),0
box x+10,y+29,x+211,y+46
box x+31,y+53,x+237,y+257
box x+241,y+53,x+258,y+257
box x+43,y+265,x+198,y+280
box x+10,y+288,x+179,y+304
ink rgb(255,255,255),0
box x+11,y+30,x+211,y+46
box x+32,y+54,x+237,y+257
box x+242,y+54,x+258,y+257
box x+44,y+266,x+198,y+280
box x+11,y+289,x+178,y+304
ink 0,0
box x+241,y+53,x+258,y+70
box x+241,y+239,x+258,y+257
box x+191,y+28,x+212,y+47
box x+180,y+287,x+199,y+305
ink rgb(255,255,255),0
box x+220,y+29,x+237,y+46
box x+241,y+29,x+258,y+46
box x+202,y+265,x+258,y+280
box x+202,y+288,x+258,y+304
box x+241,y+53,x+258,y+69
box x+241,y+240,x+258,y+257
box x+192,y+29,x+211,y+46
box x+181,y+288,x+198,y+304
ink rgb(215,215,215),0
box x+221,y+30,x+237,y+46
box x+242,y+30,x+258,y+46
box x+203,y+266,x+258,y+280
box x+203,y+289,x+258,y+304
box x+242,y+54,x+258,y+69
box x+242,y+241,x+258,y+257
box x+193,y+30,x+211,y+46
box x+182,y+289,x+198,y+304
ink 0,0
box x+10,y+53,x+30,y+257
ink rgb(116,255,116),0
box x+10,y+53,x+29,y+257
ink rgb(64,200,64),0
box x+11,y+54,x+29,y+257
ink 0,0
text x+223,y+269,"OK"
text x+212,y+293,"Cancel"
line x+198,y+37,x+204,y+37
line x+199,y+38,x+203,y+38
line x+200,y+39,x+202,y+39
line x+201,y+40,x+201,y+40
line x+187,y+295,x+193,y+295
line x+188,y+296,x+192,y+296
line x+189,y+297,x+191,y+297
line x+190,y+298,x+190,y+298
` draw_folder_image( x+222 , y+34 )
` draw_arrow_up( x+228 , y+31 )
` draw_folder_image( x+243 , y+34 )
ink rgb(250,64,64),0
text x+250,y+30,"+"
` draw_arrow_up( x+246 , y+57 )
` draw_arrow_down( x+246 , y+244 )
remend
sync
until t=1
cd wigaBrowserDefaultDir
EndFunction returnValue
you may not find it useful at all, but whatever. i am using this in the level editor for zombie hunter 3.
here is an example:
rem wiga Main Menu v1.0
rem 03.Aug.2006
rem Lukas W
Sync On : Sync Rate 60
wigaMainMenuSetup()
wigaMainMenuAddMenuItem( 1, "File" )
wigaMainMenuAddMenuSubItem( 1, 1, "New" )
wigaMainMenuAddMenuSubItem( 1, 2, "Open" )
wigaMainMenuAddMenuSubItem( 1, 3, "Save" )
wigaMainMenuAddMenuSubItem( 1, 4, "-" )
wigaMainMenuAddMenuSubItem( 1, 5, "Exit" )
wigaMainMenuAddMenuItem( 2, "Edit" )
wigaMainMenuAddMenuSubItem( 2, 1, "Undo Action" )
wigaMainMenuAddMenuSubItem( 2, 2, "Redo Action" )
wigaMainMenuAddMenuItem( 3, "Other Stuff" )
wigaMainMenuAddMenuSubItem( 3, 1, "Short" )
wigaMainMenuAddMenuSubItem( 3, 2, "Medium Long" )
wigaMainMenuAddMenuSubItem( 3, 3, "-" )
wigaMainMenuAddMenuSubItem( 3, 4, "Very Very Very Very Very Long Item" )
wigaMainMenuAddMenuItem( 4, "Help" )
wigaMainMenuAddMenuSubItem( 4, 1, "About" )
wigaWindowSetup()
wigaWindowCreate( 1, "a Window", 320, 240 )
wigaWindowPosition( 1, 20, 100 )
wigaWindowDisableClose( 1 )
wigaWindowAddButton( 1, 1, "Button1", 50, 50 )
wigaWindowAddLabel( 1, 1, "Label1", 50, 70 )
Load Image "media/new.png", 1
wigaToolbarSetup()
wigaToolbarAddButton( 1, 1, "New" )
wigaToolbarAddButton( 2, 1, "New" )
wigaToolbarAddButton( 3, 1, "New" )
wigaToolbarAddSplitter( 4 )
wigaToolbarAddButton( 5, 1, "New" )
wigaToolbarAddButton( 6, 1, "New" )
wigaDropDownSetup()
wigaDropDownAddBox( 1, 350, 200, 0 )
wigaDropDownAddItem( 1, 1, "List Item 1" )
wigaDropDownAddItem( 1, 2, "Item 2" )
wigaDropDownAddItem( 1, 3, "Item 3" )
wigaDropDownAddItem( 1, 4, "Item 4" )
wigaDropDownAddBox( 2, 350, 220, 0 )
wigaDropDownAddItem( 2, 1, "List Item 2" )
wigaDropDownAddItem( 2, 2, "Item 2" )
wigaDropDownAddItem( 2, 3, "Item 3" )
wigaDropDownAddItem( 2, 4, "looooooooooooooooong" )
wigaDropDownAddItem( 2, 5, "short" )
wigaCheckBoxSetup()
wigaCheckBoxAdd( 1, 350, 100, "Check Box 1", 0 )
wigaCheckBoxAdd( 2, 350, 115, "Check Box 2", 0 )
wigaCheckBoxSetChecked( 2, 1 )
wigaRadioButtonSetup()
wigaRadioButtonAdd( 1, 1, 350, 150, "Radio Button 1", 0 )
wigaRadioButtonAdd( 2, 1, 350, 165, "Radio Button 2", 0 )
wigaRadioButtonAdd( 3, 2, 315, 60, "Radio Button 3", 0 )
wigaRadioButtonAdd( 4, 2, 315, 75, "Radio Button 4", 0 )
wigaFrameSetup()
wigaFrameAdd( 1, 300, 50, 200, 50, "Frame 1", 0 )
Do : CLS RGB( 0, 128, 225)
If wigaMainMenuGetClicked() = 1 ` FILE
If wigaMainMenuGetClickedSub() = 5 Then End ` EXIT
EndIf
If wigaWindowGetActiveWindow() = 1
If wigaWindowGetButtonClicked() = 1
wigaWindowCreate( 2, "window", 100, 200 )
wigaWindowPosition( 2, 400, 50 )
EndIf
EndIf
If wigaToolbarGetClicked() = 1 Then End
wigaWindowUpdate()
wigaFrameUpdate()
wigaCheckBoxUpdate()
wigaRadioButtonUpdate()
wigaDropDownUpdate()
wigaToolbarUpdate()
wigaMainMenuUpdate()
Sync : Loop
and that example brings up this: