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

33
modules/gui/events/mouseEvent.h Executable file
View File

@@ -0,0 +1,33 @@
#include "engine.h"
#include "event.h"
class MouseButtonEvent : public Event {
const int button;
const bool pressed;
public:
MouseButtonEvent(int, bool);
inline int getButton() const { return button; }
inline bool getPressed() const { return pressed; }
EventType getType() const { return pressed ? EventType::MouseButtonPressed : EventType::MouseButtonReleased; }
};
class MouseMovedEvent : public Event {
const int x, y;
const double dx, dy;
public:
MouseMovedEvent(int, int, double, double);
inline int getX() const { return x; }
inline int getY() const { return y; }
inline double getDeltaX() const { return dx; }
inline double getDeltaY() const { return dy; }
EventType getType() const { return EventType::MouseMoved; }
};
class MouseScrolledEvent : public Event {
const int x, y;
public:
MouseScrolledEvent(int, int);
inline int getX() const { return x; }
inline int getY() const { return y; }
EventType getType() const { return EventType::MouseScrolled; }
};