Ankush's Garage
A collection of stuff made by Ankush Roy
Loading...
Searching...
No Matches
EventHandler.h
Go to the documentation of this file.
1#ifndef INCLUDE_EVENT_EVENTHANDLER_H_
2#define INCLUDE_EVENT_EVENTHANDLER_H_
3
4#include "Core/Common/pch.h"
5
6namespace Core
7{
8
34
42
47{
48 public:
49 std::array<KEY_STATE, Core::KEY::COUNT> Keys {};
50
52 bool GetEventHeld(KEY p_Key);
53 bool GetEventPressed(KEY p_Key);
54 void UpdateKey(KEY p_Action, bool p_Pressed);
55 void EndFrame();
56 SDL_AppResult HandleEvents(SDL_Event *p_Event);
57};
58
59} // namespace Core
60
61#endif // INCLUDE_EVENT_EVENTHANDLER_H_
void EndFrame()
Definition EventHandler.cpp:46
bool GetEventHeld(KEY p_Key)
Definition EventHandler.cpp:13
bool GetEventPressed(KEY p_Key)
Definition EventHandler.cpp:19
SDL_AppResult HandleEvents(SDL_Event *p_Event)
Definition EventHandler.cpp:61
EventHandlerStruct()
Definition EventHandler.cpp:8
std::array< KEY_STATE, Core::KEY::COUNT > Keys
Definition EventHandler.h:49
void UpdateKey(KEY p_Action, bool p_Pressed)
Definition EventHandler.cpp:25
Definition Console.cpp:4
KEY
Definition EventHandler.h:10
@ MOUSE_MIDDLE_CLICK
Definition EventHandler.h:16
@ ESC
Definition EventHandler.h:22
@ COUNT
Definition EventHandler.h:32
@ MOUSE_LEFT_CLICK
Definition EventHandler.h:18
@ A
Definition EventHandler.h:28
@ RIGHT
Definition EventHandler.h:23
@ MOUSE_RIGHT_CLICK
Definition EventHandler.h:17
@ LEFT
Definition EventHandler.h:24
@ D
Definition EventHandler.h:30
@ MOUSE_ROLL
Definition EventHandler.h:15
@ DOWN
Definition EventHandler.h:26
@ UP
Definition EventHandler.h:25
@ RESIZE_PROJECT_WINDOW
Definition EventHandler.h:12
@ MOUSE_MOVE
Definition EventHandler.h:19
@ W
Definition EventHandler.h:27
@ S
Definition EventHandler.h:29
KEY_STATE
Definition EventHandler.h:36
@ HELD
Definition EventHandler.h:39
@ PRESSED
Definition EventHandler.h:38
@ IDLE
Definition EventHandler.h:37
@ RELEASED
Definition EventHandler.h:40