SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
MouseKeyEventManager Class Reference

Manages the registration and processing of mouse key events for GameObjects. More...

#include <MouseKeyEventManager.h>

Public Member Functions

 MouseKeyEventManager (const MouseKeyEventManager &)=delete
 
MouseKeyEventManageroperator= (const MouseKeyEventManager &)=delete
 
 MouseKeyEventManager (AZUL_MOUSE k)
 Constructor for MouseKeyEventManager.
 
void Register (Inputable *in, EventType e)
 Registers a GameObject for a specific event type.
 
void Deregister (Inputable *in, EventType e)
 Deregisters a GameObject for a specific event type.
 
void ProcessMouseKeyEvent ()
 Processes all registered mouse key events.
 
bool IsEmpty ()
 Checks if the collection of GameObjects is empty.
 

Private Types

using InputableCollection = std::list<Inputable*>
 Type alias for the collection of inputable GameObjects.
 
using CollectionIterator = InputableCollection::iterator
 Type alias for the collection iterator.
 

Private Attributes

AZUL_MOUSE key
 The key associated with this manager.
 
InputableCollection keyInactiveCol
 Collection of GameObjects for key inactive events.
 
InputableCollection keyPressCol
 Collection of GameObjects for key press events.
 
InputableCollection keyHeldCol
 Collection of GameObjects for key held events.
 
InputableCollection keyReleaseCol
 Collection of GameObjects for key release events.
 
EventType eventState
 The current event state of the key.
 

Detailed Description

Manages the registration and processing of mouse key events for GameObjects.

The MouseKeyEventManager class is responsible for managing the registration and processing of mouse key events for GameObjects. It provides methods to register, deregister, and process mouse key events.

Constructor & Destructor Documentation

◆ MouseKeyEventManager()

MouseKeyEventManager::MouseKeyEventManager ( AZUL_MOUSE k)

Constructor for MouseKeyEventManager.

Parameters
kThe mouse key associated with this manager.

Member Function Documentation

◆ Deregister()

void MouseKeyEventManager::Deregister ( Inputable * in,
EventType e )

Deregisters a GameObject for a specific event type.

Parameters
inPointer to the GameObject.
eThe event type to deregister.

◆ IsEmpty()

bool MouseKeyEventManager::IsEmpty ( )

Checks if the collection of GameObjects is empty.

Returns
True if the collection is empty, false otherwise.

◆ Register()

void MouseKeyEventManager::Register ( Inputable * in,
EventType e )

Registers a GameObject for a specific event type.

Parameters
inPointer to the GameObject.
eThe event type to register.
Here is the caller graph for this function:

The documentation for this class was generated from the following files: