#include <arpirobot/devices/gamepad/ButtonPressedTrigger.hpp>
|
| ButtonPressedTrigger (Gamepad &gamepad, int buttonNum, Action &targetAction, bool doRestart=true) |
|
| ButtonPressedTrigger (Gamepad &gamepad, int buttonNum, std::shared_ptr< Action > targetAction, bool doRestart=true) |
|
| ButtonPressedTrigger (std::shared_ptr< Gamepad > gamepad, int buttonNum, Action &targetAction, bool doRestart=true) |
|
| ButtonPressedTrigger (std::shared_ptr< Gamepad > gamepad, int buttonNum, std::shared_ptr< Action > targetAction, bool doRestart=true) |
|
bool | shouldRun () override |
|
| BaseActionTrigger (Action &targetAction, bool doRestart=true) |
|
| BaseActionTrigger (std::shared_ptr< Action > targetAction, bool doRestart=true) |
|
Action trigger for when a button on a gamepad is pressed
◆ ButtonPressedTrigger() [1/4]
arpirobot::ButtonPressedTrigger::ButtonPressedTrigger |
( |
Gamepad & |
gamepad, |
|
|
int |
buttonNum, |
|
|
Action & |
targetAction, |
|
|
bool |
doRestart = true |
|
) |
| |
- Parameters
-
gamepad | The gamepad to check for button presses on. Referenced gamepad must remain in scope |
buttonNum | The button number |
targetAction | The action to run when this occurs. Referenced action must remain in scope |
doRestart | If true this will restart the action if it is running when this occurs |
◆ ButtonPressedTrigger() [2/4]
arpirobot::ButtonPressedTrigger::ButtonPressedTrigger |
( |
Gamepad & |
gamepad, |
|
|
int |
buttonNum, |
|
|
std::shared_ptr< Action > |
targetAction, |
|
|
bool |
doRestart = true |
|
) |
| |
- Parameters
-
gamepad | The gamepad to check for button presses on. Referenced gamepad must remain in scope |
buttonNum | The button number |
targetAction | The action to run when this occurs. Referenced action must remain in scope |
doRestart | If true this will restart the action if it is running when this occurs |
◆ ButtonPressedTrigger() [3/4]
arpirobot::ButtonPressedTrigger::ButtonPressedTrigger |
( |
std::shared_ptr< Gamepad > |
gamepad, |
|
|
int |
buttonNum, |
|
|
Action & |
targetAction, |
|
|
bool |
doRestart = true |
|
) |
| |
- Parameters
-
gamepad | The gamepad to check for button presses on |
buttonNum | The button number |
targetAction | The action to run when this occurs |
doRestart | If true this will restart the action if it is running when this occurs |
◆ ButtonPressedTrigger() [4/4]
arpirobot::ButtonPressedTrigger::ButtonPressedTrigger |
( |
std::shared_ptr< Gamepad > |
gamepad, |
|
|
int |
buttonNum, |
|
|
std::shared_ptr< Action > |
targetAction, |
|
|
bool |
doRestart = true |
|
) |
| |
- Parameters
-
gamepad | The gamepad to check for button presses on |
buttonNum | The button number |
targetAction | The action to run when this occurs |
doRestart | If true this will restart the action if it is running when this occurs |
The documentation for this class was generated from the following file: