1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00: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:
SmallJoker 2019-06-10 13:01:07 +02:00 committed by GitHub
parent e40be619f2
commit e2f8f4da83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 85 additions and 39 deletions

View file

@ -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();
}