import GUI in "%oot/lib/GUI"
var w : int := Window.Open ("fullscreen")
%%MENU PROCEDURES
var typespace : string
procedure mydocs
put "x"
end mydocs
procedure notepad
get typespace
end notepad
%%MENU CREATION
var menu : int
var items : array 1 .. 5 of int
var names : array 1 .. 5 of string := init ("My Documents", "Notepad",
"Paint", "Calculator", "Shut Down")
process menu_run
loop
menu := GUI.CreateMenu ("START")
items (1) := GUI.CreateMenuItem (names (1), mydocs)
items (2) := GUI.CreateMenuItem (names (2), notepad)
loop
exit when GUI.ProcessEvent
end loop
end loop
end menu_run
fork menu_run
|