blob: 3431f29ebfba209b845fb5ec445a49b1ac8e96da (
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
58
59
60
|
#pragma once
#include "KeyCodes.h"
#include <iostream>
#include <string>
#include <typeindex>
#include "system/CollisionSystem.h"
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:
crepe::CollisionSystem::CollisionInfo info;
CollisionEvent(const crepe::CollisionSystem::CollisionInfo& collisionInfo)
: info(collisionInfo) {}
};
class TextSubmitEvent : public Event {
public:
std::string text = "";
};
class ShutDownEvent : public Event {
public:
};
|