mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-05 19:31:04 +00:00
Add allow_close[]
element to formspecs (#15971)
This commit is contained in:
parent
04e82749db
commit
fd85737460
9 changed files with 71 additions and 44 deletions
|
@ -1050,10 +1050,6 @@ void Game::shutdown()
|
|||
if (g_touchcontrols)
|
||||
g_touchcontrols->hide();
|
||||
|
||||
// only if the shutdown progress bar isn't shown yet
|
||||
if (m_shutdown_progress == 0.0f)
|
||||
showOverlayMessage(N_("Shutting down..."), 0, 0);
|
||||
|
||||
clouds.reset();
|
||||
|
||||
gui_chat_console.reset();
|
||||
|
@ -1065,6 +1061,10 @@ void Game::shutdown()
|
|||
g_menumgr.deleteFront();
|
||||
}
|
||||
|
||||
// only if the shutdown progress bar isn't shown yet
|
||||
if (m_shutdown_progress == 0.0f)
|
||||
showOverlayMessage(N_("Shutting down..."), 0, 0);
|
||||
|
||||
chat_backend->addMessage(L"", L"# Disconnected.");
|
||||
chat_backend->addMessage(L"", L"");
|
||||
|
||||
|
|
|
@ -205,6 +205,9 @@ void GameFormSpec::init(Client *client, RenderingEngine *rendering_engine, Input
|
|||
m_input = input;
|
||||
m_pause_script = std::make_unique<PauseMenuScripting>(client);
|
||||
m_pause_script->loadBuiltin();
|
||||
|
||||
// Make sure any remaining game callback requests are cleared out.
|
||||
*g_gamecallback = MainGameCallback();
|
||||
}
|
||||
|
||||
void GameFormSpec::deleteFormspec()
|
||||
|
|
|
@ -148,6 +148,10 @@ bool MyEventReceiver::OnEvent(const SEvent &event)
|
|||
}
|
||||
fullscreen_is_down = event.KeyInput.PressedDown;
|
||||
return true;
|
||||
} else if (keyCode == EscapeKey &&
|
||||
event.KeyInput.PressedDown && event.KeyInput.Control) {
|
||||
g_gamecallback->disconnect();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue