aboutsummaryrefslogtreecommitdiffstats
path: root/include/events.hpp
diff options
context:
space:
mode:
authorAndy <drumsetmonkey@gmail.com>2017-01-20 10:37:21 -0500
committerAndy <drumsetmonkey@gmail.com>2017-01-20 10:37:21 -0500
commit4d8f9974156068e4595bf219cacfd9fcd2fd7174 (patch)
treef3e938c0e49537a9dea661f46eed6ee74950b48a /include/events.hpp
parent1894e311bdeb098c3bef9bd342e0eaf78d197a9b (diff)
parent1ac412a5496fb6c63c47f199dfc7facd5f4c080a (diff)
Merge branch 'master' of https://github.com/tcsullivan/gamedev
Diffstat (limited to 'include/events.hpp')
-rw-r--r--include/events.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/events.hpp b/include/events.hpp
index 1f06544..6251fac 100644
--- a/include/events.hpp
+++ b/include/events.hpp
@@ -8,7 +8,9 @@
#include <SDL2/SDL.h>
#include <string>
-#include <common.hpp>
+
+#include <config.hpp>
+#include <vector2.hpp>
class World;
@@ -38,6 +40,14 @@ struct MouseClickEvent {
int button;
};
+struct MouseReleaseEvent {
+ MouseReleaseEvent(vec2 pos, int b)
+ : position(pos), button(b) {}
+
+ vec2 position;
+ int button;
+};
+
struct KeyDownEvent {
KeyDownEvent(SDL_Keycode kc = 0)
: keycode(kc) {}