1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Get rid of guiroot

The guienvironment already provides a root gui element, we don't need to add another one.
(For CGUIEnvironment, the env itself is the root element.)
This commit is contained in:
Desour 2023-08-09 02:21:29 +02:00 committed by sfan5
parent 7e7aceb8c1
commit 45e7a80057
5 changed files with 12 additions and 18 deletions

View file

@ -1806,19 +1806,19 @@ inline bool Game::handleCallbacks()
}
if (g_gamecallback->changepassword_requested) {
(new GUIPasswordChange(guienv, guiroot, -1,
(new GUIPasswordChange(guienv, guienv->getRootGUIElement(), -1,
&g_menumgr, client, texture_src))->drop();
g_gamecallback->changepassword_requested = false;
}
if (g_gamecallback->changevolume_requested) {
(new GUIVolumeChange(guienv, guiroot, -1,
(new GUIVolumeChange(guienv, guienv->getRootGUIElement(), -1,
&g_menumgr, texture_src))->drop();
g_gamecallback->changevolume_requested = false;
}
if (g_gamecallback->keyconfig_requested) {
(new GUIKeyChangeMenu(guienv, guiroot, -1,
(new GUIKeyChangeMenu(guienv, guienv->getRootGUIElement(), -1,
&g_menumgr, texture_src))->drop();
g_gamecallback->keyconfig_requested = false;
}
@ -4142,7 +4142,7 @@ void Game::updateFrame(ProfilerGraph *graph, RunStats *stats, f32 dtime,
}
if (isMenuActive())
guiroot->bringToFront(formspec);
m_rendering_engine->get_gui_env()->getRootGUIElement()->bringToFront(formspec);
} while (false);
/*