CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ButtonPressedInputAction Class Referencefinal

#include <CeresEngine/Input/Action.hpp>

Inheritance diagram for CeresEngine::ButtonPressedInputAction:
CeresEngine::InputAction

Public Member Functions

 ButtonPressedInputAction (ButtonSet buttons, ModifierButton modifiers=ModifierButton::None) noexcept
 Creates a new button action.
 
 ButtonPressedInputAction (Button button, ModifierButton modifiers=ModifierButton::None) noexcept
 Creates a new button action.
 
void update (const InputState &state) final
 Updates the action with the given input state.
 
- Public Member Functions inherited from CeresEngine::InputAction
virtual ~InputAction ()=default
 Defaulted virtual destructor.
 
 operator bool () const noexcept
 A bool conversion operator.
 

Private Attributes

ButtonSet buttons
 The buttons that must be pressed to activate the action.
 
ModifierButton modifiers
 The modifiers that must be pressed with the keys to activate the action.
 

Additional Inherited Members

- Public Attributes inherited from CeresEngine::InputAction
bool value = false
 The action state.
 
- Protected Member Functions inherited from CeresEngine::InputAction
void updateValue (bool value)
 Updates the action value.
 

Constructor & Destructor Documentation

◆ ButtonPressedInputAction() [1/2]

CeresEngine::ButtonPressedInputAction::ButtonPressedInputAction ( ButtonSet  buttons,
ModifierButton  modifiers = ModifierButton::None 
)
explicitnoexcept

Creates a new button action.

Parameters
buttonsThe buttons that must be pressed to activate the action
modifiersThe modifiers that must be pressed with the keys to activate the action

◆ ButtonPressedInputAction() [2/2]

CeresEngine::ButtonPressedInputAction::ButtonPressedInputAction ( Button  button,
ModifierButton  modifiers = ModifierButton::None 
)
explicitnoexcept

Creates a new button action.

Parameters
buttonThe button that must be pressed to activate the action
modifiersThe modifiers that must be pressed with the key to activate the action

Member Function Documentation

◆ update()

void CeresEngine::ButtonPressedInputAction::update ( const InputState state)
finalvirtual

Updates the action with the given input state.

Parameters
stateThe input state to update the action with

Implements CeresEngine::InputAction.

Member Data Documentation

◆ buttons

ButtonSet CeresEngine::ButtonPressedInputAction::buttons
private

The buttons that must be pressed to activate the action.

◆ modifiers

ModifierButton CeresEngine::ButtonPressedInputAction::modifiers
private

The modifiers that must be pressed with the keys to activate the action.


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