Begin Repo

This commit is contained in:
2024-08-10 21:20:28 -05:00
commit 08115f90ce
41 changed files with 19581 additions and 0 deletions

27
events/windowEvent.h Normal file
View File

@@ -0,0 +1,27 @@
#pragma once
#include "terminal.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;
}
};