diff options
author | chai <chaifix@163.com> | 2018-09-02 10:47:18 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-09-02 10:47:18 +0800 |
commit | 6d67345bd5ddea7a4ce37e6bbeda15d341b1ee82 (patch) | |
tree | 2d41b1ba3bd68ced24e11cb801a61d5417357229 /src/libjin/Graphics/Window.h | |
parent | bbecfee3b69fd2d2015305f3d04c02f87d4924b0 (diff) |
*update
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 |