From 2c50066c160e7b809ad66adc27592269368f4647 Mon Sep 17 00:00:00 2001 From: Desour Date: Mon, 10 Feb 2025 17:27:41 +0100 Subject: [PATCH] Keep the game paused in pause menu settings The button_exit[]s were replaced by regular button[]s, to avoid a very short unpause when you click the btn_settings (probably because it uses ClientEvent stuff). --- src/client/game_formspec.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/client/game_formspec.cpp b/src/client/game_formspec.cpp index 40c004289d053..f573a1543ffbf 100644 --- a/src/client/game_formspec.cpp +++ b/src/client/game_formspec.cpp @@ -283,9 +283,7 @@ void GameFormSpec::showPauseMenuFormSpec(const std::string &formspec, const std: &m_input->joystick, fs_src, txt_dst, "", m_client->getSoundManager()); - // FIXME: can't enable this for now because "fps_max_unfocused" also applies - // when the game is paused, making the settings menu much less enjoyable. - // m_formspec->doPause = true; + m_formspec->doPause = true; } void GameFormSpec::showNodeFormspec(const std::string &formspec, const v3s16 &nodepos) @@ -376,18 +374,18 @@ void GameFormSpec::showPauseMenu() << strgettext("Continue") << "]"; if (!simple_singleplayer_mode) { - os << "button_exit[4," << (ypos++) << ";3,0.5;btn_change_password;" + os << "button[4," << (ypos++) << ";3,0.5;btn_change_password;" << strgettext("Change Password") << "]"; } else { os << "field[4.95,0;5,1.5;;" << strgettext("Game paused") << ";]"; } - os << "button_exit[4," << (ypos++) << ";3,0.5;btn_settings;" + os << "button[4," << (ypos++) << ";3,0.5;btn_settings;" << strgettext("Settings") << "]"; #ifndef __ANDROID__ #if USE_SOUND - os << "button_exit[4," << (ypos++) << ";3,0.5;btn_sound;" + os << "button[4," << (ypos++) << ";3,0.5;btn_sound;" << strgettext("Sound Volume") << "]"; #endif #endif