ArPiRobot-CoreLib C++
C++ library for ArPiRobot robots
Public Member Functions | List of all members
arpirobot::ButtonReleasedTrigger Class Reference

#include <arpirobot/devices/gamepad/ButtonReleasedTrigger.hpp>

Inheritance diagram for arpirobot::ButtonReleasedTrigger:
arpirobot::BaseActionTrigger

Public Member Functions

 ButtonReleasedTrigger (Gamepad &gamepad, int buttonNum, Action &targetAction, bool doRestart=true)
 
 ButtonReleasedTrigger (Gamepad &gamepad, int buttonNum, std::shared_ptr< Action > targetAction, bool doRestart=true)
 
 ButtonReleasedTrigger (std::shared_ptr< Gamepad > gamepad, int buttonNum, Action &targetAction, bool doRestart=true)
 
 ButtonReleasedTrigger (std::shared_ptr< Gamepad > gamepad, int buttonNum, std::shared_ptr< Action > targetAction, bool doRestart=true)
 
bool shouldRun () override
 
- Public Member Functions inherited from arpirobot::BaseActionTrigger
 BaseActionTrigger (Action &targetAction, bool doRestart=true)
 
 BaseActionTrigger (std::shared_ptr< Action > targetAction, bool doRestart=true)
 

Additional Inherited Members

Detailed Description

Action trigger for when a button on a gamepad is pressed

Constructor & Destructor Documentation

◆ ButtonReleasedTrigger() [1/4]

arpirobot::ButtonReleasedTrigger::ButtonReleasedTrigger ( Gamepad gamepad,
int  buttonNum,
Action targetAction,
bool  doRestart = true 
)
Parameters
gamepadThe gamepad to check for button presses on. Referenced gamepad must remain in scope
buttonNumThe button number
targetActionThe action to run when this occurs. Referenced action must remain in scope
doRestartIf true this will restart the action if it is running when this occurs

◆ ButtonReleasedTrigger() [2/4]

arpirobot::ButtonReleasedTrigger::ButtonReleasedTrigger ( Gamepad gamepad,
int  buttonNum,
std::shared_ptr< Action targetAction,
bool  doRestart = true 
)
Parameters
gamepadThe gamepad to check for button presses on. Referenced gamepad must remain in scope
buttonNumThe button number
targetActionThe action to run when this occurs. Referenced action must remain in scope
doRestartIf true this will restart the action if it is running when this occurs

◆ ButtonReleasedTrigger() [3/4]

arpirobot::ButtonReleasedTrigger::ButtonReleasedTrigger ( std::shared_ptr< Gamepad gamepad,
int  buttonNum,
Action targetAction,
bool  doRestart = true 
)
Parameters
gamepadThe gamepad to check for button presses on
buttonNumThe button number
targetActionThe action to run when this occurs
doRestartIf true this will restart the action if it is running when this occurs

◆ ButtonReleasedTrigger() [4/4]

arpirobot::ButtonReleasedTrigger::ButtonReleasedTrigger ( std::shared_ptr< Gamepad gamepad,
int  buttonNum,
std::shared_ptr< Action targetAction,
bool  doRestart = true 
)
Parameters
gamepadThe gamepad to check for button presses on
buttonNumThe button number
targetActionThe action to run when this occurs
doRestartIf true this will restart the action if it is running when this occurs

The documentation for this class was generated from the following file: