Events in BlitzMax

BlitzMax Forums/BlitzMax Programming/Events in BlitzMax

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I am trying to migrate my BlitzPlus app to BlitzMax. I don't see any of the routines to handle system events in BlitzMax. In particular I have the following that works well in BlitzPlus, but cannot see how to do it in Max:

<codebox>
Repeat
event = WaitEvent()

Select event
Case EVENT_KeyDown
gKeyPressed = EventData()
Select gKeyPressed
Case KEY_Escape
GameShutDown()

Case KEY_F
If gFullScreen=MODE_FullScreen Then
gFullScreen = MODE_Windowed
Else
gFullScreen = MODE_FullScreen
EndIf
SetupDisplay()

End Select

Case EVENT_MouseDown
Select EventData()
Case 1
gLeftMouseDown = True

Case 2
gRightMouseDown = True
End Select

Case EVENT_MouseUp
Select EventData()
Case 1
gLeftMouseDown = False

Case 2
gRightMouseDown = False
End Select

Case EVENT_Close
GameShutDown()

End Select

Until event = EVENT_Timer
</codebox>

I guess I can do this by programming directly in Windows, but that won't help me when I try and get this running on the Mac.

Thanks,

- Ken