From 52693d68f7181d707e1a192d67a617145b358394 Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 28 Jul 2018 22:10:27 +0800 Subject: *update --- src/libjin/Graphics/Window.h | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'src/libjin/Graphics/Window.h') 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 + class Window : public Subsystem { 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; -- cgit v1.1-26-g67d0