Why doesn't this work?
(You will need Blue GUI PLugin and the menu plugin to run this)
sync off
Rem ------------------------------ Declare Variables ------------------------------
gosub DecWndVar
Rem ------------------------------ Assign Variables ------------------------------
gosub AssWndVar
Rem ------------------------------ Window Setup ------------------------------
gosub WndSetup
Rem ------------------------------ Interface Setup ------------------------------
gosub MnuSetup
gosub InterfaceSetup
Rem ------------------------------ Main Source File ------------------------------
do
loop
Rem ------------------------------ SubRoutines ------------------------------
DecWndVar:
global GuiCode$ as string
global WndTitle$ as string
return
AssWndVar:
GuiCode$ = ""
WndTitle$ = "Level Maker"
return
WndSetup:
set window on
set window title WndTitle$
setup GUI WndTitle$, GuiCode$
SetWndSizeMax( 1)
return
MnuSetup:
create menu WndTitle$
add main menu "&File"
add menu item 0, "&New"
add menu item 0, "-"
add menu item 0, "&Open..."
add menu item 0, "&Save"
add menu item 0, "&Save As..."
add menu item 0, "&Close"
add menu item 0, "-"
add menu item 0, "&Exit"
return
InterfaceSetup:
create gadget panel 1, 0
resize gadget 1, screen width(), 40
return
Rem ------------------------------ Functions ------------------------------
function SetWndSizeMax( Maxim)
maximize window
Width = DBP window width()
Height = DBP window height()
set window size Width, Height
set display mode Width, Height, 16
if Maxim < 0 then restore window
endfunction
It's the basics of my program and on my machine the menu is there but the panel is on for only a second.
Can anyone explain this to me?
Thanx.
hello moto