|
|
void | TickAxes () |
| |
| void | ProcessInput (const SDL_Event &, uint32_t windowflags, float scale, int windowWidth, int windowHeight, float dpiScale) |
| |
| void | AddActionMap (const std::string &name, int Id) |
| |
| void | AddAxisMap (const std::string &name, int Id, float scale=1) |
| |
| void | RemoveActionMap (const std::string &name, int Id) |
| |
| void | RemoveAxisMap (const std::string &name, int Id, float scale=1) |
| |
| template<class U , typename T > |
| void | BindAction (const std::string &name, T thisptr, void(U::*f)(), ActionState type, CID controllers) |
| |
| template<typename U , typename T > |
| void | BindAxis (const std::string &name, T thisptr, void(U::*f)(float), CID controllers, float deadZone=0) |
| |
| template<typename U , typename T > |
| void | UnbindAction (const std::string &name, T thisptr, void(U::*f)(), ActionState type, CID controllers) |
| |
| template<typename U , typename T > |
| void | UnbindAxis (const std::string &name, T thisptr, void(U::*f)(float), CID controllers, float deadZone) |
| |
| void | BindAnyAction (Ref< IInputListener > listener) |
| |
| void | UnbindAnyAction (Ref< IInputListener > listener) |
| |
|
|
locked_hashmap< int, locked_hashset< std::string, SpinLock >, SpinLock > | CodeToAction |
| |
|
locked_hashmap< std::string, LinkedList< ActionBinding >, SpinLock > | ActionBindings |
| |
|
locked_hashmap< int, locked_hashset< AxisID, SpinLock, aid_hasher, aid_eq >, SpinLock > | CodeToAxis |
| |
|
UnorderedMap< std::string, AxisData > | AxisBindings |
| |
|
LinkedList< WeakPtrKey< IInputListener > > | AnyEventBindings |
| |
◆ AddActionMap()
| void RavEngine::InputManager::AddActionMap |
( |
const std::string & |
name, |
|
|
int |
Id |
|
) |
| |
|
inline |
Create an action mapping entry. Action mappings correspond to items that have two states: pressed and released.
- Parameters
-
| name | the identifer to use when binding or unbinding actions |
| Id | the button identifier to use. See the SDL key bindings for more information. To bind controllers, see the special bindings at the top of this file. |
◆ AddAxisMap()
| void RavEngine::InputManager::AddAxisMap |
( |
const std::string & |
name, |
|
|
int |
Id, |
|
|
float |
scale = 1 |
|
) |
| |
|
inline |
Create an axis mapping entry. Axis mappings correspond to items that have a range of values, such as the mouse or analog sticks.
- Parameters
-
| name | the identifer to use when binding or unbinding axes |
| Id | the button identifier to use. See the SDL key bindings for more information. To bind controllers, see the special bindings at the top of this file. |
| scale | the scale factor to apply to all bindings mapped to this axis |
◆ BindAction()
| void RavEngine::InputManager::BindAction |
( |
const std::string & |
name, |
|
|
T |
thisptr, |
|
|
void(U::*)() |
f, |
|
|
ActionState |
type, |
|
|
CID |
controllers |
|
) |
| |
|
inline |
Bind an action map to a member function
- Parameters
-
| name | the name of the action map to bind to |
| thisptr | the object to bind to. Use this if within the class you want to bind to |
| f | the method to invoke when the action is triggered. Must take no parameters. Use &Classname::Methodname. |
| type | the required state of the action to invoke the method. |
◆ BindAnyAction()
| void RavEngine::InputManager::BindAnyAction |
( |
Ref< IInputListener > |
listener | ) |
|
|
inline |
Bind an object to recieve AnyEvents. This will invoke its AnyDown and AnyUp virtual methods
◆ BindAxis()
| void RavEngine::InputManager::BindAxis |
( |
const std::string & |
name, |
|
|
T |
thisptr, |
|
|
void(U::*)(float) |
f, |
|
|
CID |
controllers, |
|
|
float |
deadZone = 0 |
|
) |
| |
|
inline |
Bind a function to an Axis mapping
- Parameters
-
| name | the Axis mapping to bind to |
| thisptr | the object to bind to. Use this if within the class you want to bind to |
| f | the method to invoke when the action is triggered. Must take one float parameter. Use &Classname::Methodname. |
| deadZone | the minimum value (+/-) required to activate this binding |
◆ CleanupBindings()
| void InputManager::CleanupBindings |
( |
| ) |
|
|
protected |
Purge invalid bindings from the lists
◆ ProcessActionID()
| void InputManager::ProcessActionID |
( |
int |
ID, |
|
|
ActionState |
state_in, |
|
|
CID |
controller |
|
) |
| |
|
protected |
Process a single action event
- Parameters
-
| ID | the event ID. It may need to be transformed if there is overlap in SDL |
| state_in | the state of the event |
| controller | the source controller |
◆ ProcessAxisID()
| void InputManager::ProcessAxisID |
( |
int |
ID, |
|
|
float |
value, |
|
|
CID |
controller |
|
) |
| |
|
protected |
Buffer an Axis value
- Parameters
-
| ID | the event ID. It may need to be transformed if there is overlap in SDL |
| value | the axis' value |
| controller | the source controller |
◆ ProcessInput()
| void InputManager::ProcessInput |
( |
const SDL_Event & |
event, |
|
|
uint32_t |
windowflags, |
|
|
float |
scale, |
|
|
int |
windowWidth, |
|
|
int |
windowHeight, |
|
|
float |
dpiScale |
|
) |
| |
Prcocess an input from SDL
◆ RemoveActionMap()
| void RavEngine::InputManager::RemoveActionMap |
( |
const std::string & |
name, |
|
|
int |
Id |
|
) |
| |
|
inline |
Remove an action mapping entry. Both the name and ID must match to complete removal.
- Parameters
-
| name | the identifer to look for |
| Id | the button identifier to use. See the SDL key bindings for more information. |
◆ RemoveAxisMap()
| void RavEngine::InputManager::RemoveAxisMap |
( |
const std::string & |
name, |
|
|
int |
Id, |
|
|
float |
scale = 1 |
|
) |
| |
|
inline |
Remove an axis mapping entry. Both the name and ID must match to complete removal.
- Parameters
-
| name | the identifer to look for |
| Id | the button identifier to use. See the SDL key bindings for more information. |
◆ UnbindAction()
| void RavEngine::InputManager::UnbindAction |
( |
const std::string & |
name, |
|
|
T |
thisptr, |
|
|
void(U::*)() |
f, |
|
|
ActionState |
type, |
|
|
CID |
controllers |
|
) |
| |
|
inline |
Bind a function to an Action mapping
- Parameters
-
| name | the Action mapping to unbind |
| thisptr | the object to bind to. Use this if within the class you want to bind to |
| f | the method to invoke when the action is triggered. Must take no parameters. Use &Classname::Methodname. |
| state | the state to use to match the callback |
◆ UnbindAnyAction()
| void RavEngine::InputManager::UnbindAnyAction |
( |
Ref< IInputListener > |
listener | ) |
|
|
inline |
Unbind an object to recieve AnyEvents. This is done automatically when an IInputListener is destructed.
◆ UnbindAxis()
| void RavEngine::InputManager::UnbindAxis |
( |
const std::string & |
name, |
|
|
T |
thisptr, |
|
|
void(U::*)(float) |
f, |
|
|
CID |
controllers, |
|
|
float |
deadZone |
|
) |
| |
|
inline |
Unbind an Axis mapping
- Parameters
-
| thisptr | the object to bind to. Use this if within the class you want to bind to |
| f | the method to invoke when the action is triggered. Must take one float parameter. Use &Classname::Methodname. |
| deadZone | the minimum value (+/-) required to activate this binding |
The documentation for this class was generated from the following files: