-
Notifications
You must be signed in to change notification settings - Fork 0
/
window.hpp
46 lines (36 loc) · 979 Bytes
/
window.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef WINDOW_H
#define WINDOW
#ifndef DEBUG
#include <SDL.h>
#include <SDL_image.h>
#include <SDL_ttf.h>
#endif // DEBUG
#include "font.hpp"
inline extern const unsigned int SCREEN_WIDTH = 640;
inline extern const unsigned int SCREEN_HEIGHT = 320;
class Window {
private:
static Window* instance;
unsigned int _height;
unsigned int _width;
bool _mouseFocus;
bool _keyboardFocus;
bool _fullScreen;
bool _minimized;
bool _quit;
public:
SDL_Window* _window;
SDL_Renderer* _renderer;
const unsigned int& getWidth() const;
const unsigned int& getHeight() const;
const bool& getMouseFocus() const;
const bool& getKeyboardFocus() const;
const bool& getFullscreen() const;
const bool& getMinimized() const;
const bool& getQuit() const;
Window(const unsigned width = SCREEN_WIDTH, const unsigned height = SCREEN_HEIGHT);
~Window();
static Window* getWindow();
void handleWindowEvent(SDL_Event& e);
};
#endif