Code: Select all
Repeat
event = WaitWindowEvent(10)
If event = #PB_Event_CloseWindow
Break
ElseIf event = #PB_Event_Menu
If EventMenu() = #Shortcut_Escape: Break: EndIf
ElseIf event = #PB_Event_Gadget
Select EventGadget()
Case #gadget_1
Select EventType()
Case #PB_EventType_LeftClick
;Do something
Case #PB_EventType_RightClick
;Do something
EndSelect
Case #gadget_2
;Do something
EndSelect
ElseIf #customEvent_1
;Do something
ElseIf #customEvent_2
;Do something
EndIf
ForEverWould this be a case of trying to squeeze too much out of these functions? Or would it result in something that would break in a future PB version? If so I will have to make do with custom_events for the custom_gadgets involved. It just wouldn't make much sense to have to check for events from gadgets in more than one place (if I can avoid it).


