restructure project for dynamic linking
This commit is contained in:
27
modules/gui/events/windowEvent.h
Executable file
27
modules/gui/events/windowEvent.h
Executable file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include "engine.h"
|
||||
#include "event.h"
|
||||
|
||||
|
||||
class WindowEvent : public Event {
|
||||
const int windowID, event;
|
||||
public:
|
||||
WindowEvent(int, int);
|
||||
|
||||
inline int getWindowID() const { return windowID; }
|
||||
|
||||
EventType getType() const {
|
||||
switch(event) {
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
return EventType::WindowClose;
|
||||
case SDL_WINDOWEVENT_RESIZED:
|
||||
return EventType::WindowResize;
|
||||
case SDL_WINDOWEVENT_FOCUS_GAINED:
|
||||
return EventType::WindowFocus;
|
||||
case SDL_WINDOWEVENT_FOCUS_LOST:
|
||||
return EventType::WindowLostFocus;
|
||||
}
|
||||
return EventType::None;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user