A virtual derived class of GameObject that allows the GameObject to register and test input keys. More...
#include <Inputable.h>
Detailed Description
A virtual derived class of GameObject that allows the GameObject to register and test input keys.
A class that inherits from Inputable gains access to the KeyPressed() and KeyReleased() functions. These allow the user to execute code every time a registered key is pressed or released.
Public Attributes | |
| std::map< KeyEventPair, RegistrationData > | RegMap |
Protected Member Functions | |
| virtual void | KeyPressed (const ION_KEY &key_in)=0 |
| Function which is called every time a registered key is pressed. More... | |
| virtual void | KeyReleased (const ION_KEY &key_in)=0 |
| Function which is called every time a registered key is released. More... | |
| void | RegisterKey (const ION_KEY &key_in, const INPUT_EVENT &event_type) |
| Function to register a specific key and it's event type (pressed or released) More... | |
| void | DeregisterKey (const ION_KEY &key_in, const INPUT_EVENT &event_type) |
| Function to deregister a specific key and it's event type (pressed or released) More... | |
Protected Member Functions inherited from GameObject | |
| virtual void | SceneEntry ()=0 |
| Function which is called upon a registered scene entry. More... | |
| virtual void | SceneExit ()=0 |
| Function which is called upon a registered scene exit. More... | |
Additional Inherited Members | |
Public Member Functions inherited from GameObject | |
| void | SubmitEntry () |
| Public Function to register a call for the GameObject's SceneEntry() function. More... | |
| void | SubmitExit () |
| Public Function to register a call for the GameObject's SceneEntry() function. More... | |
Member Function Documentation
|
protected |
Function to deregister a specific key and it's event type (pressed or released)
This function deregisters the specified key and it's event type from being checked every frame for this Inputable GameObject. Each key can be deregistered twice from the SingleKeyEventManager; once for pressed and once for released. These can be specified by the folowing INPUT_EVENT enum types:
- Pressed: INPUT_EVENT::KEY_PRESSED
- Released: INPUT_EVENT::KEY_RELEASED
- Parameters
-
key_in The ION_KEY to be deregistered. event_type The INPUT_EVENT of the key to be deregistered.
|
protectedpure virtual |
Function which is called every time a registered key is pressed.
This is a pure virtual function to be overriden by the user. The KeyPressed() function will be called by the SingleKeyEventManager every time a registered key is pressed (See the RegisterKey() and DeregisterKey() functions).
- Parameters
-
key_in The ION_KEY type that is calling the event.
|
protectedpure virtual |
Function which is called every time a registered key is released.
This is a pure virtual function to be overriden by the user. The KeyReleased() function will be called by the SingleKeyEventManager every time a registered key is released (See the RegisterKey() and DeregisterKey() functions).
- Parameters
-
key_in The ION_KEY type that is calling the event.
|
protected |
Function to register a specific key and it's event type (pressed or released)
This function registers the specified key and it's event type to be checked every frame for this Inputable GameObject. Each key can be registered twice to the SingleKeyEventManager; once for pressed and once for released. These can be specified by the folowing INPUT_EVENT enum types:
- Pressed: INPUT_EVENT::KEY_PRESSED
- Released: INPUT_EVENT::KEY_RELEASED
- Parameters
-
key_in The ION_KEY to be registered. event_type The INPUT_EVENT of the key to be registered.
Member Data Documentation
| std::map<KeyEventPair, RegistrationData> Inputable::RegMap |
Map of data used for registering to the scene

Protected Member Functions inherited from
1.8.11