diff options
Diffstat (limited to 'src/libjin/Graphics/Window.h')
-rw-r--r-- | src/libjin/Graphics/Window.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/libjin/Graphics/Window.h b/src/libjin/Graphics/Window.h index e4939f6..4617ef8 100644 --- a/src/libjin/Graphics/Window.h +++ b/src/libjin/Graphics/Window.h @@ -5,6 +5,7 @@ #include "SDL2/SDL.h" #include "../utils/utils.h" +#include "../math/Vector.h" #include "../common/Subsystem.hpp" namespace jin @@ -15,7 +16,6 @@ namespace graphics class Window : public Subsystem<Window> { public: - struct Setting : SettingBase { public: @@ -27,25 +27,23 @@ namespace graphics bool resizable; // resize }; - inline int getW(){ return width; } - inline int getH(){ return height; } + inline int getW(){ return size.x; } + inline int getH(){ return size.y; } inline int getFPS(){ return fps; } inline void swapBuffers(); private: - + SINGLETON(Window); Window() {}; virtual ~Window() {}; - SINGLETON(Window); + bool initSystem(const SettingBase* setting) override; + void quitSystem() override; SDL_Window* wnd; - - int width, height; + jin::math::Vector2 size; int fps; - /*call only once*/ bool initSystem(const SettingBase* setting) override; - /*call only once*/ void quitSystem() override; }; } // render |