diff options
Diffstat (limited to 'src/gui/Page.cpp')
-rw-r--r-- | src/gui/Page.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/Page.cpp b/src/gui/Page.cpp index 817c7fd..813c2bd 100644 --- a/src/gui/Page.cpp +++ b/src/gui/Page.cpp @@ -16,6 +16,14 @@ namespace gsr { void Page::draw(mgl::Window &window) { for(auto &widget : widgets) { + if(widget->move_to_top) { + widget->move_to_top = false; + std::swap(widget, widgets.back()); + } + widget->draw(window); + } + + for(auto &widget : widgets) { widget->draw(window); } } |