i've added so much and idek anymore
This commit is contained in:
parent
c120871293
commit
51ff181659
19 changed files with 1573 additions and 10 deletions
|
@ -4,6 +4,8 @@
|
|||
#include <functional>
|
||||
#include <unordered_map>
|
||||
|
||||
class ParticleManager;
|
||||
|
||||
enum class EventType {
|
||||
Quit,
|
||||
KeyDown,
|
||||
|
@ -33,6 +35,9 @@ public:
|
|||
using EventCallback = std::function<void(const EventData&)>;
|
||||
void registerCallback(EventType type, EventCallback callback);
|
||||
void unregisterCallback(EventType type);
|
||||
|
||||
// Particle management
|
||||
void setParticleManager(ParticleManager* manager);
|
||||
|
||||
// Event processing
|
||||
void processEvent(const SDL_Event& event);
|
||||
|
@ -40,9 +45,12 @@ public:
|
|||
private:
|
||||
bool running_;
|
||||
std::unordered_map<EventType, EventCallback> callbacks_;
|
||||
|
||||
ParticleManager* particleManager_;
|
||||
void handleQuitEvent();
|
||||
void handleKeyEvent(const SDL_Event& event);
|
||||
void handleMouseEvent(const SDL_Event& event);
|
||||
void handleWindowEvent(const SDL_Event& event);
|
||||
void onMouseButtonDown(const EventData& event);
|
||||
void onMouseButtonUp(const EventData& event);
|
||||
void onMouseMove(const EventData& event);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue