diff options
| author | chai <chaifix@163.com> | 2018-07-28 22:10:27 +0800 | 
|---|---|---|
| committer | chai <chaifix@163.com> | 2018-07-28 22:10:27 +0800 | 
| commit | 52693d68f7181d707e1a192d67a617145b358394 (patch) | |
| tree | 5a39bcdf225def306738ead6683cd224e2c5762d /src/libjin/Graphics/Window.h | |
| parent | d033400614e7e2c0ff49e5100c81e937e5818e74 (diff) | |
*update
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; | 
