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

42
window/sdl2Window.h Normal file
View File

@@ -0,0 +1,42 @@
#pragma once
#include "terminal.h"
#include "event.h"
#include "mouseEvent.h"
#include "keyEvent.h"
#include "windowEvent.h"
class WindowSDL2 {
public:
WindowSDL2();
~WindowSDL2();
void init( std::string, int, int);
void shutdown();
void getSize();
const Event* pollEvents();
operator SDL_Window*() { return window; }
//private:
const Event* createEvent();
int x, y;
std::string title;
SDL_Window* window = nullptr;
SDL_Event event;
bool error = false;
};