|
template<typename EventType , class ButtonTypeParam > |
void | buttonEvent (unsigned int device, ButtonTypeParam button) |
| Generic function that distributes all 9 button events. More...
|
|
template<typename EventType , class ButtonTypeParam > |
ORX_FORCEINLINE void | buttonEvent (unsigned int device, ButtonTypeParam button) |
|
void | entered () |
| Called when the state is being activated (even if it doesn't get any events afterwards!) More...
|
|
tribool | getMouseExclusive () const |
|
const std::string & | getName () const |
| Returns the name of the state (which is unique!) More...
|
|
int | getPriority () const |
| Returns the priority of the state (which is unique if != 0) More...
|
|
bool | hasExpired () |
| Returns true if the handler situation has changed. More...
|
|
bool | isInputDeviceEnabled (unsigned int device) |
| Tells whether there a handler installed for a specific device. More...
|
|
void | joyStickAxisMoved (unsigned int device, unsigned int axis, float value) |
| Event handler. More...
|
|
void | left () |
| Called upon deactivation of the state. More...
|
|
void | mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize) |
| Event handler. More...
|
|
void | mouseScrolled (int abs, int rel) |
| Event handler. More...
|
|
void | resetExpiration () |
| Call this if you have applied the changes resulting from changed handlers. More...
|
|
void | setEnterFunctor (const FunctorPtr &functor) |
| Sets a functor to be called upon activation of the state. More...
|
|
void | setHandler (InputHandler *handler) |
| Sets an InputHandler to be used for all devices. More...
|
|
bool | setJoyStickHandler (InputHandler *handler, unsigned int joyStick) |
| Sets the joy stick event handler for one specific joy stick (overwrites if there already was one!) More...
|
|
void | setJoyStickHandler (InputHandler *handler) |
| Sets the joy stick event handler for all joy sticks (overwrites if there already was one!) More...
|
|
void | setKeyHandler (InputHandler *handler) |
| Sets the keyboard event handler (overwrites if there already was one!) More...
|
|
void | setLeaveFunctor (const FunctorPtr &functor) |
| Sets a functor to be called upon deactivation of the state. More...
|
|
void | setMouseExclusive (tribool value) |
|
void | setMouseHandler (InputHandler *handler) |
| Sets the mouse event handler (overwrites if there already was one!) More...
|
|
void | update (float dt, unsigned int device) |
| Updates one specific device handler with deviceUpdated. More...
|
|
void | update (float dt) |
| Updates all handlers with allDevicesUpdated. More...
|
|
| Listable () |
| Constructor: Allocates space in the element list. More...
|
|
| Listable (Context *context) |
| Constructor: Allocates space in the element list and assigns the context. More...
|
|
virtual | ~Listable () |
| Destructor: Removes the object from the object-lists. More...
|
|
Context * | getContext () const |
|
void | setContext (Context *context) |
| Changes the context. More...
|
|
void | unregisterObject () |
| Removes this object from the object-lists. More...
|
|
| Identifiable () |
| Constructor: Sets the default values. More...
|
|
virtual | ~Identifiable () |
|
ORX_FORCEINLINE void * | getDerivedPointer (unsigned int classID) |
| Returns a valid pointer of any derived type that is registered in the class hierarchy. More...
|
|
template<class T > |
ORX_FORCEINLINE T * | getDerivedPointer (unsigned int classID) |
| Version of getDerivedPointer with template. More...
|
|
template<class T > |
ORX_FORCEINLINE const T * | getDerivedPointer (unsigned int classID) const |
| Const version of getDerivedPointer with template. More...
|
|
Identifier * | getIdentifier () const |
| Returns the Identifier of the object. More...
|
|
bool | isA (const Identifier *identifier) |
| Returns true if the object's class is of the given type or a derivative. More...
|
|
template<class B > |
bool | isA (const SubclassIdentifier< B > *identifier) |
| Returns true if the object's class is of the given type or a derivative. More...
|
|
bool | isA (const Identifiable *object) |
| Returns true if the object's class is of the given type or a derivative. More...
|
|
bool | isChildOf (const Identifier *identifier) |
| Returns true if the object's class is a child of the given type. More...
|
|
template<class B > |
bool | isChildOf (const SubclassIdentifier< B > *identifier) |
| Returns true if the object's class is a child of the given type. More...
|
|
bool | isChildOf (const Identifiable *object) |
| Returns true if the object's class is a child of the given type. More...
|
|
bool | isDirectChildOf (const Identifier *identifier) |
| Returns true if the object's class is a direct child of the given type. More...
|
|
template<class B > |
bool | isDirectChildOf (const SubclassIdentifier< B > *identifier) |
| Returns true if the object's class is a direct child of the given type. More...
|
|
bool | isDirectChildOf (const Identifiable *object) |
| Returns true if the object's class is a direct child of the given type. More...
|
|
bool | isDirectParentOf (const Identifier *identifier) |
| Returns true if the object's class is a direct parent of the given type. More...
|
|
template<class B > |
bool | isDirectParentOf (const SubclassIdentifier< B > *identifier) |
| Returns true if the object's class is a direct parent of the given type. More...
|
|
bool | isDirectParentOf (const Identifiable *object) |
| Returns true if the object's class is a direct child of the given type. More...
|
|
bool | isExactlyA (const Identifier *identifier) |
| Returns true if the object's class is exactly of the given type. More...
|
|
template<class B > |
bool | isExactlyA (const SubclassIdentifier< B > *identifier) |
| Returns true if the object's class is exactly of the given type. More...
|
|
bool | isExactlyA (const Identifiable *object) |
| Returns true if the object's class is exactly of the given type. More...
|
|
bool | isParentOf (const Identifier *identifier) |
| Returns true if the object's class is a parent of the given type. More...
|
|
template<class B > |
bool | isParentOf (const SubclassIdentifier< B > *identifier) |
| Returns true if the object's class is a parent of the given type. More...
|
|
bool | isParentOf (const Identifiable *object) |
| Returns true if the object's class is a parent of the given type. More...
|
|
InputStates allow you to customise the input event targets at runtime.
The general idea is a stack: Every activated InputState will be pushed on that stack and only the top one gets the input events. This is done for every device (keyboard, mouse, all joy sticks) separately to allow for instance keyboard input capturing for the console while you can still steer a ship with the mouse. There are two exceptions to this behaviour though:
- If an InputState is created with the 'Transparent' parameter on, the state will not prevent input from getting to the state below it on the stack. This can be useful for instance if you need to deploy input to multiple handlers: Simply create two InputStates and make the high priority one transparent.
- If an InputState is created with the 'AlwaysGetsInput' parameter on, then the state will always receive input as long as it is activated.
- Note: If you mark an InputState with both parameters on, then it will not influence only other InputState at all.
- Priorities
- Every InputState has a priority when on the stack, but mostly this priority is dynamic (InputStatePriority::Dynamic) which means that a state pushed onto the stack will simply have a higher priority than the top one. This behaviour really only applies to normal states that don't have a high priority (InputStatePriority::HighPriority). These 'special' ones are used for features like the KeyDetector or the console. Use with care!
- Exclusive/Non-Exclusive mouse Mode
- You can select a specific mouse mode that tells whether the application should have exclusive access to it or not. When in non-exclusive mode, you can move the mouse out of the window like with any other normal window (only for windowed mode!). The setting is dictated by the topmost InputState that gets mouse events.