diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-04-18 19:43:44 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-04-18 19:43:44 +0100 |
commit | 6036877ac4e92da3185f21d5928bf3ed28d685b2 (patch) | |
tree | 5e5a5f6ad09e196bbecfbfec2a9a3c8f02262ca3 /ui/window.h | |
parent | Merge branch 'openmesh-11' (diff) | |
parent | Remember selected asset id and reload/reselect resource file on change (diff) | |
download | ilt-6036877ac4e92da3185f21d5928bf3ed28d685b2.tar.bz2 ilt-6036877ac4e92da3185f21d5928bf3ed28d685b2.tar.xz ilt-6036877ac4e92da3185f21d5928bf3ed28d685b2.zip |
Diffstat (limited to 'ui/window.h')
-rw-r--r-- | ui/window.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ui/window.h b/ui/window.h index 62c34de..99a977f 100644 --- a/ui/window.h +++ b/ui/window.h @@ -15,7 +15,7 @@ using SDL_GLContextPtr = wrapped_ptrt<GL_Context, SDL_GL_CreateContext, SDL_GL_D class Window { public: - Window(size_t width, size_t height, const std::string & title, Uint32 flags); + Window(ScreenAbsCoord size, const char * title, Uint32 flags); virtual ~Window() = default; NO_COPY(Window); @@ -27,7 +27,7 @@ public: { glm::ivec2 size {}; SDL_GetWindowSizeInPixels(m_window, &size.x, &size.y); - content = std::make_unique<C>(size.x, size.y, std::forward<P>(p)...); + content = std::make_unique<C>(ScreenAbsCoord {size.x, size.y}, std::forward<P>(p)...); } void tick(TickDuration elapsed); @@ -39,7 +39,6 @@ public: protected: void clear(float r, float g, float b, float a) const; - const ScreenAbsCoord size; SDL_WindowPtr m_window; SDL_GLContextPtr glContext; WindowContent::Ptr content; |