Grindstone Game Engine
v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
MouseEvent.hpp
1
#pragma once
2
3
#include "BaseEvent.hpp"
4
#include "MouseButtonCode.hpp"
5
6
namespace
Grindstone {
7
namespace
Events {
8
struct
MousePressEvent
:
public
BaseEvent
{
9
MousePressEvent
(MouseButtonCode code,
bool
isPressed)
10
: code(code), isPressed(isPressed) {}
11
MouseButtonCode code = MouseButtonCode::Invalid;
12
bool
isPressed =
false
;
13
14
SETUP_EVENT(MouseButton)
15
};
// struct MousePressEvent
16
17
struct
MouseMovedEvent
:
public
BaseEvent
{
18
MouseMovedEvent
(
int
mouseX,
int
mouseY)
19
: mouseX(mouseX), mouseY(mouseY) {}
20
int
mouseX;
21
int
mouseY;
22
23
SETUP_EVENT(MouseMoved)
24
};
// struct MouseMovedEvent
25
26
struct
MouseScrolledEvent
:
public
BaseEvent
{
27
MouseScrolledEvent
(
float
scrollX,
float
scrollY)
28
: scrollX(scrollX), scrollY(scrollY) {}
29
float
scrollX;
30
float
scrollY;
31
32
SETUP_EVENT(MouseScrolled)
33
};
// struct MouseScrolledEvent
34
}
// namespace Events
35
}
// namespace Grindstone
Grindstone::Events::BaseEvent
Definition
BaseEvent.hpp:7
Grindstone::Events::MouseMovedEvent
Definition
MouseEvent.hpp:17
Grindstone::Events::MousePressEvent
Definition
MouseEvent.hpp:8
Grindstone::Events::MouseScrolledEvent
Definition
MouseEvent.hpp:26
sources
code
Common
Event
MouseEvent.hpp
Generated by
1.12.0