2#include "EventSystem.hpp"
4#include <SDL_keycode.h>
10 class EngineStartEvent :
public Event {
13 const std::string
GetEventType()
const override {
return GetStaticEventType(); };
14 static const std::string GetStaticEventType() {
return "EngineStartEvent"; }
20 class EngineQuitEvent :
public Event {
23 const std::string
GetEventType()
const override {
return GetStaticEventType(); };
24 static const std::string GetStaticEventType() {
return "EngineQuitEvent"; }
30 class PreUpdateEvent :
public Event {
33 const std::string
GetEventType()
const override {
return GetStaticEventType(); };
34 static const std::string GetStaticEventType() {
return "PreUpdateEvent"; }
47 const std::string
GetEventType()
const override {
return GetStaticEventType(); };
48 static const std::string GetStaticEventType() {
return "UpdateEvent"; }
52 #ifdef StevEngine_SHOW_WINDOW
56 class EngineDrawEvent :
public Event {
59 const std::string
GetEventType()
const override {
return GetStaticEventType(); };
60 static const std::string GetStaticEventType() {
return "EngineDrawEvent"; }
74 const std::string
GetEventType()
const override {
return GetStaticEventType(); };
75 static const std::string GetStaticEventType() {
return "SDLEvent"; }
80 #ifdef StevEngine_SHOW_WINDOW
92 const std::string
GetEventType()
const override {
return GetStaticEventType(); };
93 static const std::string GetStaticEventType() {
return "WindowResizeEvent"; }
108 const std::string
GetEventType()
const override {
return GetStaticEventType(); };
109 static const std::string GetStaticEventType() {
return "WindowMoveEvent"; }
123 const std::string
GetEventType()
const override {
return GetStaticEventType(); };
124 static const std::string GetStaticEventType() {
return "WindowFullscreenEvent"; }
138 const std::string
GetEventType()
const override {
return GetStaticEventType(); };
139 static const std::string GetStaticEventType() {
return "WindowVSyncEvent"; }
const std::string GetEventType() const override
Get type identifier for this event.
Definition EngineEvents.hpp:59
const std::string GetEventType() const override
Get type identifier for this event.
Definition EngineEvents.hpp:23
const std::string GetEventType() const override
Get type identifier for this event.
Definition EngineEvents.hpp:13
Base class for all engine events.
Definition EventSystem.hpp:12
const std::string GetEventType() const override
Get type identifier for this event.
Definition EngineEvents.hpp:33
SDL_Event event
Raw SDL event data.
Definition EngineEvents.hpp:76
const std::string GetEventType() const override
Get type identifier for this event.
Definition EngineEvents.hpp:74
SDLEvent(SDL_Event event)
Create SDL event wrapper.
Definition EngineEvents.hpp:73
double deltaTime
Time since last update in seconds.
Definition EngineEvents.hpp:49
UpdateEvent(double deltaTime)
Create update event.
Definition EngineEvents.hpp:46
const std::string GetEventType() const override
Get type identifier for this event.
Definition EngineEvents.hpp:47
const std::string GetEventType() const override
Get type identifier for this event.
Definition EngineEvents.hpp:123
WindowFullscreenEvent(bool value)
Create fullscreen change event.
Definition EngineEvents.hpp:122
bool value
Whether fullscreen is enabled.
Definition EngineEvents.hpp:125
WindowMoveEvent(int x, int y)
Create window move event.
Definition EngineEvents.hpp:107
int y
New window position.
Definition EngineEvents.hpp:110
const std::string GetEventType() const override
Get type identifier for this event.
Definition EngineEvents.hpp:108
const std::string GetEventType() const override
Get type identifier for this event.
Definition EngineEvents.hpp:92
uint32_t height
New window dimensions.
Definition EngineEvents.hpp:94
WindowResizeEvent(uint32_t width, uint32_t height)
Create window resize event.
Definition EngineEvents.hpp:91
WindowVSyncEvent(bool value)
Create vsync change event.
Definition EngineEvents.hpp:137
bool value
Whether vsync is enabled.
Definition EngineEvents.hpp:140
const std::string GetEventType() const override
Get type identifier for this event.
Definition EngineEvents.hpp:138