diff --git a/engine/gui/Window.cpp b/engine/gui/Window.cpp index 9a09282..f6251ae 100644 --- a/engine/gui/Window.cpp +++ b/engine/gui/Window.cpp @@ -18,6 +18,7 @@ void Window::addButton(int x, int y, int w, int h, std::function click, void Window::update() { + _screen->pushGLStates(); _screen->setTitle(_name); _screen->drawSprite(_back); @@ -45,6 +46,7 @@ void Window::update() { _screen->drawText(button.text()); } } + _screen->popGLStates(); } void Window::setBackgroundTexture(const std::string &texture, double sx, double sy, int w, int h) {