mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Formspecs: Close on metadata removal (#8348)
Formspecs will now close as soon the formspec string in the node metadata turns invalid.
This commit is contained in:
@@ -302,3 +302,15 @@ void GameUI::toggleProfiler()
|
||||
showTranslatedStatusText("Profiler hidden");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GameUI::deleteFormspec()
|
||||
{
|
||||
if (m_formspec)
|
||||
m_formspec->quitMenu();
|
||||
|
||||
delete m_formspec;
|
||||
m_formspec = nullptr;
|
||||
|
||||
m_formname.clear();
|
||||
}
|
||||
|
Reference in New Issue
Block a user