restructure project for dynamic linking

This commit is contained in:
2025-02-26 12:12:31 -06:00
parent ca683b50e7
commit 1922896a1a
40 changed files with 11 additions and 0 deletions

28
modules/gui/events/keyEvent.h Executable file
View File

@@ -0,0 +1,28 @@
#include "engine.h"
#include "event.h"
class KeyEvent : public Event {
const int key;
const int scancode;
const int mod;
const int repeat;
const bool pressed;
public:
KeyEvent(int, int, int, int, bool);
inline int getKey() const { return key; }
inline int getScancode() const { return scancode; }
inline int getMod() const { return mod; }
inline bool getPressed() const { return pressed; }
EventType getType() const { return pressed ? EventType::KeyPressed : EventType::KeyReleased; }
};
class KeyTypedEvent : public Event {
const std::string text;
const int windowID;
public:
KeyTypedEvent(int, char*);
inline int getWindowID() const { return windowID; }
inline const char* getText() const { return text.c_str(); }
EventType getType() const { return EventType::KeyTyped; }
};