I'm wondering why OnEvent returns a value. In my event handler I need to take care of keyboard, mouse, and gui ... and I put them in that order when processing them also. It seems if I return true when finished anything gui will stop working or mouse, or keyboard will stop working. However, if i just always return false, everything works perfectly fine.
I'm conufsed here. What part of the irrlicht engine uses the value returned from OnEvent? How should I be organizing my code within the OnEvent method?
Thank you for any help in advance.
OnEvent question ...
The meaning of the return value of OnEvent is "absorbed". If you return true, then you "absorb" the event and no other event receiver (like gui elements, or fps cam etc.) will receive it.
The default return value should be false. You return true in at least two cases:
1. You handle the event and know that the event will not be used by the engine (this also removes some overhead).
2. You handle the event and don't want the engine to further process the event.
Normally you return true if you do something with a specific event (e.g. button pressed). Sometimes you return false (e.g. read mouse position).
The default return value should be false. You return true in at least two cases:
1. You handle the event and know that the event will not be used by the engine (this also removes some overhead).
2. You handle the event and don't want the engine to further process the event.
Normally you return true if you do something with a specific event (e.g. button pressed). Sometimes you return false (e.g. read mouse position).
It is like it is. And because it is like it is, things are like they are.