mirror of
https://github.com/minetest/minetest.git
synced 2024-11-04 23:03:46 +01:00
Fix GameUI text staying visible during shutdown. (#14197)
This commit is contained in:
parent
05a53cd330
commit
34ce86a8f5
@ -1333,6 +1333,9 @@ void Game::shutdown()
|
|||||||
if (formspec)
|
if (formspec)
|
||||||
formspec->quitMenu();
|
formspec->quitMenu();
|
||||||
|
|
||||||
|
// Clear text when exiting.
|
||||||
|
m_game_ui->clearText();
|
||||||
|
|
||||||
#ifdef HAVE_TOUCHSCREENGUI
|
#ifdef HAVE_TOUCHSCREENGUI
|
||||||
g_touchscreengui->hide();
|
g_touchscreengui->hide();
|
||||||
#endif
|
#endif
|
||||||
|
@ -334,3 +334,36 @@ void GameUI::deleteFormspec()
|
|||||||
|
|
||||||
m_formname.clear();
|
m_formname.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GameUI::clearText()
|
||||||
|
{
|
||||||
|
if (m_guitext_chat) {
|
||||||
|
m_guitext_chat->remove();
|
||||||
|
m_guitext_chat = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_guitext) {
|
||||||
|
m_guitext->remove();
|
||||||
|
m_guitext = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_guitext2) {
|
||||||
|
m_guitext2->remove();
|
||||||
|
m_guitext2 = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_guitext_info) {
|
||||||
|
m_guitext_info->remove();
|
||||||
|
m_guitext_info = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_guitext_status) {
|
||||||
|
m_guitext_status->remove();
|
||||||
|
m_guitext_status = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_guitext_profiler) {
|
||||||
|
m_guitext_profiler->remove();
|
||||||
|
m_guitext_profiler = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -106,6 +106,7 @@ public:
|
|||||||
const std::string &getFormspecName() { return m_formname; }
|
const std::string &getFormspecName() { return m_formname; }
|
||||||
GUIFormSpecMenu *&getFormspecGUI() { return m_formspec; }
|
GUIFormSpecMenu *&getFormspecGUI() { return m_formspec; }
|
||||||
void deleteFormspec();
|
void deleteFormspec();
|
||||||
|
void clearText();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Flags m_flags;
|
Flags m_flags;
|
||||||
|
Loading…
Reference in New Issue
Block a user