simulation/Window.h

33 lines
537 B
C
Raw Permalink Normal View History

2022-10-30 23:44:30 +01:00
#ifndef WINDOW_H
#define WINDOW_H
#include <SDL2/SDL.h>
#include <string>
#include <functional>
class Window
{
private:
SDL_Window* win;
SDL_Renderer* ren;
2022-11-02 07:44:57 +01:00
SDL_Event e;
2022-10-30 23:44:30 +01:00
bool Running;
public:
2022-11-02 07:44:57 +01:00
bool step = false;
2022-10-30 23:44:30 +01:00
Window(std::string title, int width, int height);
virtual ~Window();
2022-11-02 07:44:57 +01:00
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);
2022-10-30 23:44:30 +01:00
SDL_Renderer* GetRenderer();
};
#endif /* WINDOW_H */