Move to settings page on settings button pressed

This commit is contained in:
dec05eba
2024-08-01 20:55:16 +02:00
parent 27255cdb64
commit 67216467d4
4 changed files with 36 additions and 11 deletions

View File

@@ -15,6 +15,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);
}