aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Event.h
blob: 701ecdf71a578c8736068b862eef62ac6a1f366f (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
#pragma once
#include "KeyCodes.h"
#include <iostream>
#include <string>
#include <typeindex>

class Event {
public:
};

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 = MouseButton::NONE;
};

class MouseClickEvent : public Event {
public:
	int mouse_x = 0;
	int mouse_y = 0;
	MouseButton button = MouseButton::NONE;
};
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:
};