diff options
Diffstat (limited to 'src/libjin/Graphics/Window.h')
-rw-r--r-- | src/libjin/Graphics/Window.h | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/libjin/Graphics/Window.h b/src/libjin/Graphics/Window.h index 6213cee..e09e9f9 100644 --- a/src/libjin/Graphics/Window.h +++ b/src/libjin/Graphics/Window.h @@ -12,40 +12,37 @@ namespace jin namespace graphics { - class WindowSystem : public Subsystem<WindowSystem> + class Window : public Subsystem<Window> { public: struct Setting : SettingBase { public: + const char* title; // + bool fullscreen; // ȫ int width, height; // ڴС bool vsync; // ֱͬ - const char* title; // + int fps; // FPS + bool resizable; // resize }; - inline int getW() - { - return width; - } - - inline int getH() - { - return height; - } - + inline int getW(){ return width; } + inline int getH(){ return height; } + inline int getFPS(){ return fps; } inline void swapBuffers(); private: - WindowSystem() {}; - virtual ~WindowSystem() {}; + Window() {}; + virtual ~Window() {}; - SINGLETON(WindowSystem); + SINGLETON(Window); SDL_Window* wnd; int width, height; + int fps; onlyonce bool initSystem(const SettingBase* setting) override; onlyonce void quitSystem() override; |