Oficina Framework  1.3
Games Framework
OficinaFramework::InputSystem::State Struct Reference

Represents a state for the input. More...

#include <InputSystem.hpp>

Public Member Functions

 State ()
 Constructor for the struct. Initializes all values to default. More...
 
Stateoperator= (const State)
 Receives the values of another State and sets them for itself. More...
 
Stateoperator| (const State)
 

Public Attributes

bool Buttons [17]
 Represents the state of gamepad buttons. More...
 
bool MouseButtons [3]
 Represents the state of mouse buttons. More...
 
vec2dw MousePosition
 A dword vec2 representing mouse pointer position on window. More...
 
vec2w LeftStick
 A word vec2 representing gamepad's left stick position. More...
 
vec2w RightStick
 A word vec2 representing gamepad's right stick position. More...
 
word LeftTrigger
 
word RightTrigger
 
byte KeyboardState [255]
 An array representing keyboard key states. More...
 

Detailed Description

Represents a state for the input.

Constructor & Destructor Documentation

◆ State()

OficinaFramework::InputSystem::State::State ( )

Constructor for the struct. Initializes all values to default.

Member Function Documentation

◆ operator=()

State& OficinaFramework::InputSystem::State::operator= ( const State  )

Receives the values of another State and sets them for itself.

◆ operator|()

State& OficinaFramework::InputSystem::State::operator| ( const State  )

Receives the values of another State and blends them with itself. If a button is not pressed in the current state, but it is in the other state, then the resulting state will contain the button as pressed.

Member Data Documentation

◆ Buttons

bool OficinaFramework::InputSystem::State::Buttons[17]

Represents the state of gamepad buttons.

◆ KeyboardState

byte OficinaFramework::InputSystem::State::KeyboardState[255]

An array representing keyboard key states.

◆ LeftStick

vec2w OficinaFramework::InputSystem::State::LeftStick

A word vec2 representing gamepad's left stick position.

◆ LeftTrigger

word OficinaFramework::InputSystem::State::LeftTrigger

A word representing gamepad's left trigger position. In case it is a button or it is a keyboard key, it'll always assume the values (word)ThumbStickAxisSignal::POSITIVE OR (word)ThumbStickAxisSignal::NEGATIVE.

See also
InputSystem::ThumbStickAxisSignal

◆ MouseButtons

bool OficinaFramework::InputSystem::State::MouseButtons[3]

Represents the state of mouse buttons.

◆ MousePosition

vec2dw OficinaFramework::InputSystem::State::MousePosition

A dword vec2 representing mouse pointer position on window.

◆ RightStick

vec2w OficinaFramework::InputSystem::State::RightStick

A word vec2 representing gamepad's right stick position.

◆ RightTrigger

word OficinaFramework::InputSystem::State::RightTrigger

A word representing gamepad's right trigger position. In case it is a button or it is a keyboard key, it'll always assume the values (word)ThumbStickAxisSignal::POSITIVE OR (word)ThumbStickAxisSignal::NEGATIVE.

See also
InputSystem::ThumbStickAxisSignal

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