CheeseEngine
A 2D Game Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
InputEvent Struct Reference

Fired when input from the OS/hardware is received. More...

#include <Events.hpp>

Inheritance diagram for InputEvent:
[legend]
Collaboration diagram for InputEvent:
[legend]

Public Member Functions

 InputEvent ()=default
 Default constructor.
 
 InputEvent (int k, int a)
 Initializes an input event directly from OS callbacks.
 
- Public Member Functions inherited from Event
virtual ~Event ()=default
 Virtual destructor to ensure proper polymorphic cleanup.
 

Public Attributes

int key
 GLFW key code (e.g., GLFW_KEY_E)
 
int action
 State of the key (INPUT_PRESS, INPUT_HOLD, or INPUT_RELEASE)
 

Detailed Description

Fired when input from the OS/hardware is received.

Constructor & Destructor Documentation

◆ InputEvent() [1/2]

InputEvent::InputEvent ( )
default

Default constructor.

Parameters
None
Return values
None

◆ InputEvent() [2/2]

InputEvent::InputEvent ( int  k,
int  a 
)
inline

Initializes an input event directly from OS callbacks.

Parameters
k: GLFW key code
a: State of the key
Return values
None

Member Data Documentation

◆ action

int InputEvent::action

State of the key (INPUT_PRESS, INPUT_HOLD, or INPUT_RELEASE)

◆ key

int InputEvent::key

GLFW key code (e.g., GLFW_KEY_E)


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