33 lines
537 B
C++
33 lines
537 B
C++
#ifndef WINDOW_H
|
|
#define WINDOW_H
|
|
|
|
#include <SDL2/SDL.h>
|
|
#include <string>
|
|
#include <functional>
|
|
|
|
class Window
|
|
{
|
|
private:
|
|
SDL_Window* win;
|
|
SDL_Renderer* ren;
|
|
SDL_Event e;
|
|
|
|
bool Running;
|
|
|
|
public:
|
|
|
|
bool step = false;
|
|
|
|
Window(std::string title, int width, int height);
|
|
virtual ~Window();
|
|
|
|
void Draw(std::function<bool(Window*)> setup, std::function<bool(Window*)> draw);
|
|
void Events(std::function<bool(Window*)> draw);
|
|
|
|
void DrawCircle(SDL_Renderer*, int, int, int, bool);
|
|
|
|
SDL_Renderer* GetRenderer();
|
|
|
|
};
|
|
#endif /* WINDOW_H */
|