The more I look at it, the less complicated it looks. Heh.
Now for some news from me...
I got my GUI routines to look like this:
`-----------------------------------------------------------------------
`-- GUI procedures: General GUI and the inventory list go here
`-----------------------------------------------------------------------
_ProgGUI: `GUI for object information and current status
Paste Image GUI,0,0 : `Top bar
Paste Image GUI,0,743 : `Bottom bar
`Print the program options on the top bar
Text 15,5,"OBJECT INVENTORY | " : Text 180,5,"SAVE CURRENT DESIGN | "
Text 370,5,"CAMERA VIEWS | " : Text 510,5,"LOAD SAVED PROJECT OR DESIGN"
`Print important status messages over the bottom bar, including currrent selected object's position and FPS rate
Text 935,748,"FPS: "+Str$(Screen FPS() )
Text 15,748,"Object Position: X"+Str$(NewPosX#)+" Y"+Str$(NewPosY#)+" Z"+Str$(NewPosZ#)
Return
_Inventory: `Inventory list for objects
`Draw the main box
Ink RGB(125,125,125), RGB(125,125,125) : Box 256,192,512,384
Ink RGB(255,255,255), RGB(255,255,255)
Return
...from this:
Rem -------------------------------------
Rem Menu GUI routines
_MenuBar:
Ink RGB(165,165,165), RGB(165,165,165)
Box 0,0,1024,25 : Box 0,743,1024,768
Ink RGB(255,255,255), RGB(255,255,255)
Center Text 32,5,"OBJECTS" : Center Text 94,5,"SAVE" : Center Text 164,5,"CAMERA"
MX=MouseX() : MY= MouseY() : MC=MouseClick()
If MX=>2 And MY=>2 And MX=<62 And MY=<24
Ink RGB(0,0,0), RGB(0,0,0)
Center Text 32,5,"OBJECTS"
OptPress=1
Else
OptPress=0
EndIf
`If the user clicks on "Options"
If MC=1 And OptPress=1 Then GoSub _OptsMenu: : MC=0
If MX=>64 And MY=>2 And MX=<128 And MY=<24
Ink RGB(0,0,0), RGB(0,0,0)
Center Text 94,5,"SAVE"
If MC=1 Then GoSub _SaveLevel:
EndIf
If MX=>130 And MY=>2 And MX=<200 And MY=<24
Ink RGB(0,0,0), RGB(0,0,0)
Center Text 164,5,"CAMERA"
CamPress=1
Else
CamPress=0
EndIf
If MC=1 And CamPress=1 Then GoSub _CamMenu: : MC=0
Return
_OptsMenu:
SelectedObj=0
Do
Ink RGB(165,165,165), RGB(165,165,165)
Box 0,0,1024,25 : `Menu bar
Box 2,26,162,196 : `Options menu
Ink RGB(85,85,85), RGB(85,85,85)
Box 4,28,160,194 : `Options menu dark interior
Ink RGB(255,255,255), RGB(255,255,255)
Center Text 32,5,"OBJECTS" : Center Text 94,5,"SAVE" : Center Text 164,5,"CAMERA"
Ink RGB(255,255,255), RGB(255,255,255)
Center Text 81,34,"Make a 1-Unit Block"
Ink RGB(255,255,255), RGB(255,255,255)
Center Text 81,54,"Make a 5-Unit Block"
Ink RGB(255,255,255), RGB(255,255,255)
Center Text 81,74,"Make a Gold Coin"
Ink RGB(255,255,255), RGB(255,255,255)
Center Text 81,94,"Make a Power-Up"
MX=MouseX() : MY= MouseY() : MC=MouseClick()
`Invert text when mouse is hovering over options and do selected options when the user clicks on them
IF MX=>2 And MY=>26 And MX=<162 And MY=<46
Ink RGB(0,0,0), RGB(0,0,0)
Center Text 81,34,"Make a 1-Unit Block"
CubePress=1
Else
CubePress=0
EndIf
If MC=1 And CubePress=1 Then CreateCube() : Play Sound pop : Exit : CubePress=0
If MX=>2 And MY=>56 And MX=<162 And MY=<76
Ink RGB(0,0,0,), RGB(0,0,0)
Center Text 81,54,"Make a 5-Unit Block"
StripPress=1
Else
StripPress=0
EndIf
If MC=1 And StripPress=1 Then CreateStrip() : Play Sound pop : Exit : StripPress=0
If MX=>2 And MY=>76 And MX=<162 And MY=<96
Ink RGB(0,0,0), RGB(0,0,0)
Center Text 81,74,"Make a Gold Coin"
CoinPress=1
Else
CoinPress=0
EndIf
If MC=1 And CoinPress=1 Then CreateCoin() : Play Sound pop : Exit : CoinPress=0
If MC=2 Then Exit : MC=0
Sync
Loop
Return
I still haven't added in the functions of the new GUI code, but you have to admit it's a lot neater in the second version and will be MUCH easier to maintain.