restructure project for dynamic linking
This commit is contained in:
33
modules/gui/events/mouseEvent.h
Executable file
33
modules/gui/events/mouseEvent.h
Executable 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; }
|
||||
};
|
||||
Reference in New Issue
Block a user