Emscripten and Linux window position/size functions filled in.

pull/35/head
sigonasr2 9 months ago
parent 0408250088
commit 9ed0f23686
  1. 23
      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)
{

Loading…
Cancel
Save