SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
MouseKeyEventManager.h
1#ifndef MouseKeyEventManager_H
2#define MouseKeyEventManager_H
3
4#include "AzulCore.h"
5#include <list>
6#include "../EventType.h"
7
8class Inputable;
9
17class MouseKeyEventManager
18{
19private:
23 using InputableCollection = std::list<Inputable*>;
24
28 using CollectionIterator = InputableCollection::iterator;
29
30
34 AZUL_MOUSE key;
35
40
45
50
55
60
61public:
62 MouseKeyEventManager() = default;
63 MouseKeyEventManager(const MouseKeyEventManager&) = delete;
64 MouseKeyEventManager& operator=(const MouseKeyEventManager&) = delete;
65 ~MouseKeyEventManager() = default;
66
71 MouseKeyEventManager(AZUL_MOUSE k);
72
78 void Register(Inputable* in, EventType e);
79
85 void Deregister(Inputable* in, EventType e);
86
91
96 bool IsEmpty();
97};
98
99#endif
Defines the event types for input handling.
EventType
Enum class representing the types of input events.
Definition EventType.h:19
Base class for objects that can handle keyboard input events.
Definition Inputable.h:23
InputableCollection keyPressCol
Collection of GameObjects for key press events.
Definition MouseKeyEventManager.h:44
InputableCollection keyReleaseCol
Collection of GameObjects for key release events.
Definition MouseKeyEventManager.h:54
InputableCollection keyHeldCol
Collection of GameObjects for key held events.
Definition MouseKeyEventManager.h:49
EventType eventState
The current event state of the key.
Definition MouseKeyEventManager.h:59
void ProcessMouseKeyEvent()
Processes all registered mouse key events.
Definition MouseKeyEventManager.cpp:54
InputableCollection::iterator CollectionIterator
Type alias for the collection iterator.
Definition MouseKeyEventManager.h:28
void Register(Inputable *in, EventType e)
Registers a GameObject for a specific event type.
Definition MouseKeyEventManager.cpp:16
std::list< Inputable * > InputableCollection
Type alias for the collection of inputable GameObjects.
Definition MouseKeyEventManager.h:23
InputableCollection keyInactiveCol
Collection of GameObjects for key inactive events.
Definition MouseKeyEventManager.h:39
AZUL_MOUSE key
The key associated with this manager.
Definition MouseKeyEventManager.h:34
bool IsEmpty()
Checks if the collection of GameObjects is empty.
Definition MouseKeyEventManager.cpp:100
void Deregister(Inputable *in, EventType e)
Deregisters a GameObject for a specific event type.
Definition MouseKeyEventManager.cpp:35