mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 05:43:43 +00:00
18 lines
481 B
C++
18 lines
481 B
C++
#pragma once
|
|
|
|
#include "EventListener.h"
|
|
|
|
#include <initializer_list>
|
|
#include <map>
|
|
#include <vector>
|
|
|
|
#include "SDL3/SDL_events.h"
|
|
#include "SDL3/SDL_init.h"
|
|
|
|
class EventManager {
|
|
public:
|
|
void registerListener(EventListener* listener, std::initializer_list<SDL_EventType> eventTypes);
|
|
SDL_AppResult handleEvent(SDL_Event* event);
|
|
private:
|
|
std::map<SDL_EventType, std::vector<EventListener*>> eventListeners = std::map<SDL_EventType, std::vector<EventListener*>>();
|
|
}; |