specialisation of Inputdevice for gamepad type devices
More...
#include <gamepad_device.hpp>
|
void | resetAxisDirection (const int axis, Input::AxisDirection direction) |
|
|
std::vector< bool > | m_button_pressed |
|
std::vector< Input::AxisDirection > | m_prev_axis_directions |
|
int | m_irr_index |
| Irrlicht index of this gamepad. More...
|
|
specialisation of Inputdevice for gamepad type devices
◆ GamePadDevice()
GamePadDevice::GamePadDevice |
( |
const int |
irr_index, |
|
|
const std::string & |
name, |
|
|
const int |
axis_count, |
|
|
const int |
button_count, |
|
|
GamepadConfig * |
configuration |
|
) |
| |
Constructor for GamePadDevice from a connected gamepad for which no configuration existed (defaults will be used)
- Parameters
-
irrIndex | Index of stick as given by irrLicht. |
◆ getIrrIndex()
int GamePadDevice::getIrrIndex |
( |
| ) |
const |
|
inline |
Returns the irrlicht index of this gamepad.
◆ getNumberOfButtons()
int GamePadDevice::getNumberOfButtons |
( |
| ) |
const |
Returns the number of buttons of this gamepad.
◆ moved()
bool GamePadDevice::moved |
( |
int |
value | ) |
const |
Returns if the specified value is larger than the deadzone.
◆ processAndMapInput()
bool GamePadDevice::processAndMapInput |
( |
Input::InputType |
type, |
|
|
const int |
id, |
|
|
InputManager::InputDriverMode |
mode, |
|
|
PlayerAction * |
action, |
|
|
int * |
value = NULL |
|
) |
| |
|
virtual |
Invoked when this device it used.
Verifies if the key/button that was pressed is associated with a binding. If yes, sets action and returns true; otherwise returns false. It can also modify the value used.
- Parameters
-
| type | Type of input (e.g. IT_STICKMOTION, ...). |
| id | ID of the key that was pressed or of the axis that was triggered (depending on the value of the 'type' parameter). |
| mode | Used to determine whether to map menu actions or game actions |
[out] | action | The action associated to this input (only check this value if method returned true) |
[in,out] | value | The value associated with this type (typically how far a gamepad axis is moved). |
- Returns
- Whether the pressed key/button is bound with an action
Implements InputDevice.
◆ m_irr_index
int GamePadDevice::m_irr_index |
|
private |
Irrlicht index of this gamepad.
The documentation for this class was generated from the following files: