Ankush's Garage
A collection of stuff made by Ankush Roy
Loading...
Searching...
No Matches
Core::EventHandlerStruct Class Reference

flowchart LR A["IDLE"] --> B["Pressed?"] B --> C(("Yes")) & D(("No")) D --> A C --> E["PRESSED"] E --> F["Next Frame"] F --> G["HELD"] G --> H["Next Frame"] H --> Z["Pressed?"] Z --> J(("No")) & I(("Yes")) I --> G J --> K["RELEASED"] K --> L["Next Frame"] L --> A A@{ shape: paper-tape} B@{ shape: hex} E@{ shape: paper-tape} G@{ shape: paper-tape} Z@{ shape: hex} K@{ shape: paper-tape}
More...

#include <EventHandler.h>

Public Member Functions

 EventHandlerStruct ()
 
bool GetEventHeld (KEY p_Key)
 
bool GetEventPressed (KEY p_Key)
 
void UpdateKey (KEY p_Action, bool p_Pressed)
 
void EndFrame ()
 
SDL_AppResult HandleEvents (SDL_Event *p_Event)
 

Public Attributes

std::array< KEY_STATE, Core::KEY::COUNTKeys {}
 

Detailed Description

flowchart LR A["IDLE"] --> B["Pressed?"] B --> C(("Yes")) & D(("No")) D --> A C --> E["PRESSED"] E --> F["Next Frame"] F --> G["HELD"] G --> H["Next Frame"] H --> Z["Pressed?"] Z --> J(("No")) & I(("Yes")) I --> G J --> K["RELEASED"] K --> L["Next Frame"] L --> A A@{ shape: paper-tape} B@{ shape: hex} E@{ shape: paper-tape} G@{ shape: paper-tape} Z@{ shape: hex} K@{ shape: paper-tape}

Constructor & Destructor Documentation

◆ EventHandlerStruct()

Core::EventHandlerStruct::EventHandlerStruct ( )

Member Function Documentation

◆ EndFrame()

void Core::EventHandlerStruct::EndFrame ( )

◆ GetEventHeld()

bool Core::EventHandlerStruct::GetEventHeld ( KEY p_Key)

◆ GetEventPressed()

bool Core::EventHandlerStruct::GetEventPressed ( KEY p_Key)

◆ HandleEvents()

SDL_AppResult Core::EventHandlerStruct::HandleEvents ( SDL_Event * p_Event)

◆ UpdateKey()

void Core::EventHandlerStruct::UpdateKey ( KEY p_Action,
bool p_Pressed )

Member Data Documentation

◆ Keys

std::array<KEY_STATE, Core::KEY::COUNT> Core::EventHandlerStruct::Keys {}

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