From 9ed0f2368686935783996e5596c24a968b9a8a80 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Mon, 19 Feb 2024 02:00:51 -0600 Subject: [PATCH] Emscripten and Linux window position/size functions filled in. --- Adventures in Lestoria/olcPixelGameEngine.h | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Adventures in Lestoria/olcPixelGameEngine.h b/Adventures in Lestoria/olcPixelGameEngine.h index fb7807ef..2f650610 100644 --- a/Adventures in Lestoria/olcPixelGameEngine.h +++ b/Adventures in Lestoria/olcPixelGameEngine.h @@ -6697,6 +6697,19 @@ namespace olc return olc::OK; } + virtual void SetWindowPos(vi2d pos)override{ + if(!ptrPGE->IsFullscreen()){ + XMapWindow(olc_Display, olc_Window); + XMoveWindow(olc_Display, olc_Window, pos.x, pos.y); + } + } + virtual void SetWindowSize(vi2d size)override{ + if(!ptrPGE->IsFullscreen()){ + XMapWindow(olc_Display, olc_Window); + XResizeWindow(olc_Display, olc_Window, size.x, size.y); + } + } + virtual olc::rcode SetWindowTitle(const std::string& s) override { X11::XStoreName(olc_Display, olc_Window, s.c_str()); @@ -7372,6 +7385,16 @@ namespace olc return olc::rcode::OK; } + virtual olc::rcode SetFullscreen(const bool bFullscreen, const vi2d windowPos)override{ + return olc::rcode::OK; + } + virtual void SetWindowPos(vi2d pos)override{ + + } + virtual void SetWindowSize(vi2d size)override{ + + } + // Interface PGE's UpdateWindowSize, for use in Javascript void UpdateWindowSize(int width, int height) {