48 _buttons.push_back(std::move(button));
100 auto isBindingPressed = [
this](
int binding) {
101 if (binding == KEY_NULL) {
107 for (
int gp = 0; gp < 4; ++gp) {
118 auto isActionPressed = [&bindings, &isBindingPressed](
Input::GameAction action) {
119 int primary = bindings.GetPrimaryKey(action);
120 int secondary = bindings.GetSecondaryKey(action);
121 return isBindingPressed(primary) || isBindingPressed(secondary);
158 int buttonsCount =
static_cast<int>(
_buttons.size());
186 int buttonsCount =
static_cast<int>(
_buttons.size());
226 if (index >= 0 && index <
static_cast<int>(
_buttons.size())) {
Abstract interface for graphics rendering operations.
virtual bool IsKeyPressed(int key) const =0
Check if a key was pressed (triggered once when key goes down)
virtual bool IsGamepadAvailable(int gamepad) const =0
Check if a gamepad is available/connected.
virtual bool IsGamepadButtonPressed(int gamepad, int button) const =0
Check if a gamepad button was pressed this frame.
virtual bool IsKeyDown(int key) const =0
Check if a key is currently being held down.