Midnight Graphics
Create Fast and Simple Graphics in C++
Event.hpp
1
#pragma once
2
3
#include <variant>
4
5
namespace
mn::Graphics
6
{
7
struct
Event
8
{
9
enum class
ButtonType { Press, Release };
10
11
struct
None
{ };
12
struct
Quit
{ };
13
struct
Key
14
{
15
char
key;
16
ButtonType type;
17
};
18
19
struct
MouseMove
20
{
21
Math::Vec2f
delta;
22
};
23
24
struct
Wheel
25
{
26
float
amount;
27
};
28
29
struct
MouseScroll
30
{
31
float
delta;
32
};
33
34
struct
WindowSize
35
{
36
uint32_t new_width, new_height;
37
};
38
39
std::variant<None, Quit, Key, WindowSize, MouseMove, MouseScroll, Wheel> event;
40
};
41
}
mn::Graphics::Event::Key
Definition:
Event.hpp:14
mn::Graphics::Event::MouseMove
Definition:
Event.hpp:20
mn::Graphics::Event::MouseScroll
Definition:
Event.hpp:30
mn::Graphics::Event::None
Definition:
Event.hpp:11
mn::Graphics::Event::Quit
Definition:
Event.hpp:12
mn::Graphics::Event::Wheel
Definition:
Event.hpp:25
mn::Graphics::Event::WindowSize
Definition:
Event.hpp:35
mn::Graphics::Event
Definition:
Event.hpp:8
mn::Math::Vec
Definition:
Vector.hpp:12
include
midnight
Graphics
Event.hpp
Generated by
1.9.1