Helper class used by Controllers to handle the logic of knowing when a button is pressed down or not.
More...
#include <ControllerButton.h>
|
| unsigned char | lastFrameState = false |
| | char for tracking what the state of the button on the previous frame was. 1 = pushed, 0 = not pushed
|
| bool | currentlyPressed = false |
| | Bool shared with the outside world to indicate whether the button is currently pressed down or not.
|
Helper class used by Controllers to handle the logic of knowing when a button is pressed down or not.
@ControllerButton.h
◆ ControllerButton()
| ControllerButton::ControllerButton |
( |
| ) |
|
|
default |
◆ ~ControllerButton()
| virtual ControllerButton::~ControllerButton |
( |
| ) |
|
|
virtualdefault |
◆ clone()
◆ isPressed()
| auto ControllerButton::isPressed |
( |
| ) |
const->bool |
Whether the button is pressed down or not currently.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ resetButton()
| auto ControllerButton::resetButton |
( |
| ) |
->void |
|
virtual |
◆ update()
| auto ControllerButton::update |
( |
float | dt, |
|
|
unsigned char | buttonState )->void |
|
virtual |
Upda.
- Parameters
-
| dt | How much time has passed since the last state |
| buttonState | The current state of a physical controller button |
- Returns
- If the button is pressed down or not
Reimplemented in ControllerHoldButton.
◆ currentlyPressed
| bool ControllerButton::currentlyPressed = false |
|
protected |
Bool shared with the outside world to indicate whether the button is currently pressed down or not.
◆ lastFrameState
| unsigned char ControllerButton::lastFrameState = false |
|
protected |
char for tracking what the state of the button on the previous frame was. 1 = pushed, 0 = not pushed
The documentation for this class was generated from the following files: