aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Event.h
blob: 87c60681090706e008d01583502e622aadd0c507 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#pragma once
#include <typeindex>
#include <iostream>
#include <string>
#include "KeyCodes.h"

class Event {
public:
	bool handled = false;
};

class KeyPressEvent : public Event {
public:
	int repeat = 0;
	Keycode key = Keycode::None;
};

class KeyReleaseEvent : public Event {
public:
	Keycode key = Keycode::None;
};

class MousePressEvent : public Event {
public:
	int mouse_x = 0;
	int mouse_y = 0;
	MouseButton button;
};

class MouseClickEvent : public Event {
public:
	int mouse_x = 0;
	int mouse_y = 0;
	MouseButton button;
};
class MouseReleaseEvent : public Event {
public:
	int mouse_x = 0;
	int mouse_y = 0;
	MouseButton button = MouseButton::None;
};
class MouseMoveEvent : public Event {
public:
	int mouse_x = 0;
	int mouse_y = 0;
};
class CollisionEvent : public Event {
public:
	//Collision collisionData;
};
class TextSubmitEvent : public Event {
public:
	std::string text;
};
class ShutDownEvent : public Event {
public:
};