From af01a9577e488d17e4f2f9145db723f3902446c9 Mon Sep 17 00:00:00 2001 From: sapier Date: Mon, 31 Mar 2014 22:50:03 +0200 Subject: [PATCH] Fix lost change password button --- src/game.cpp | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index 761f65f83..a13f1393c 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -154,6 +154,11 @@ struct LocalFormspecHandler : public TextDest return; } + if (fields.find("btn_change_password") != fields.end()) { + g_gamecallback->changePassword(); + return; + } + if (fields.find("quit") != fields.end()) { return; } @@ -1000,7 +1005,7 @@ static void show_chat_menu(FormspecFormSource* current_formspec, /******************************************************************************/ static void show_pause_menu(FormspecFormSource* current_formspec, TextDest* current_textdest, IWritableTextureSource* tsrc, - IrrlichtDevice * device) + IrrlichtDevice * device, bool singleplayermode) { std::string control_text = wide_to_narrow(wstrgettext("Default Controls:\n" @@ -1016,25 +1021,34 @@ static void show_pause_menu(FormspecFormSource* current_formspec, "- T: chat\n" )); + float ypos = singleplayermode ? 1.0 : 0.5; std::ostringstream os; - os<<"Minetest\n"; - os<wasKeyDown(EscapeKey)) { - show_pause_menu(current_formspec, current_textdest, tsrc, device); + show_pause_menu(current_formspec, current_textdest, tsrc, device, + simple_singleplayer_mode); } else if(input->wasKeyDown(getKeySetting("keymap_chat"))) {