need some help with the creation of a simple menu:
Code: Select all
; Create the Menu
@MENU 1, {
{"File", {
{"About", ID = "about"},
{""},
{"Quit", ID = "quit"}}},
}
/* You're the chosen one */
@DISPLAY {Menu = 1}
/* Handle menu selections */
Function p_MenuFunc(msg)
Print("function triggered")
Switch msg.action
Case "OnMenuSelect":
Switch msg.item
Case "about":
SystemRequest("", "This is a test!", "OK", #REQICON_INFORMATION)
Case "quit":
End
EndSwitch
EndSwitch
EndFunction
; listen to "OnMenuSelect" event handler
InstallEventHandler({OnMenuSelect = p_MenuFunc})