pub trait SystemEventExt {
const Init: SystemEvent = SystemEvent::kEventInit;
const InitLua: SystemEvent = SystemEvent::kEventInitLua;
const Lock: SystemEvent = SystemEvent::kEventLock;
const Unlock: SystemEvent = SystemEvent::kEventUnlock;
const Pause: SystemEvent = SystemEvent::kEventPause;
const Resume: SystemEvent = SystemEvent::kEventResume;
const Terminate: SystemEvent = SystemEvent::kEventTerminate;
const KeyPressed: SystemEvent = SystemEvent::kEventKeyPressed;
const KeyReleased: SystemEvent = SystemEvent::kEventKeyReleased;
const LowPower: SystemEvent = SystemEvent::kEventLowPower;
}Provided Associated Constants§
Sourceconst Init: SystemEvent = SystemEvent::kEventInit
const Init: SystemEvent = SystemEvent::kEventInit
Program initialization.
After loading pdex.bin into memory, the system calls your event handler with this event.
Then you can supply your own run loop update function
by calling System::set_update_callback
or Update::set_update_handler here.
If you don’t provide an update callback, the system initializes a Lua context
and calls your event handler again with event InitLua.
Sourceconst InitLua: SystemEvent = SystemEvent::kEventInitLua
const InitLua: SystemEvent = SystemEvent::kEventInitLua
Program initialization in lua context.
Sourceconst Lock: SystemEvent = SystemEvent::kEventLock
const Lock: SystemEvent = SystemEvent::kEventLock
System going to locked state.
Sourceconst Unlock: SystemEvent = SystemEvent::kEventUnlock
const Unlock: SystemEvent = SystemEvent::kEventUnlock
System has been unlocked by user.
Sourceconst Pause: SystemEvent = SystemEvent::kEventPause
const Pause: SystemEvent = SystemEvent::kEventPause
Program execution paused.
Sourceconst Resume: SystemEvent = SystemEvent::kEventResume
const Resume: SystemEvent = SystemEvent::kEventResume
Program execution resumed after pause.
Sourceconst Terminate: SystemEvent = SystemEvent::kEventTerminate
const Terminate: SystemEvent = SystemEvent::kEventTerminate
Program termination.
Sourceconst KeyPressed: SystemEvent = SystemEvent::kEventKeyPressed
const KeyPressed: SystemEvent = SystemEvent::kEventKeyPressed
Simulator key is pressed.
When an arbitrary key is pressed in the Simulator your event handler is called with this event and the keycode of the key in the last argument.
See also KeyReleased.
Sourceconst KeyReleased: SystemEvent = SystemEvent::kEventKeyReleased
const KeyReleased: SystemEvent = SystemEvent::kEventKeyReleased
Simulator key is released.
When an arbitrary key is released in the Simulator your event handler is called with this event and the keycode of the key in the last argument.
See also KeyPressed.
Sourceconst LowPower: SystemEvent = SystemEvent::kEventLowPower
const LowPower: SystemEvent = SystemEvent::kEventLowPower
Low power warning by system.
At this point, it’s a good idea to persistently save anything you need, such as a save-game.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.