From: sapier Date: Mon, 31 Mar 2014 20:50:03 +0000 (+0200) Subject: Fix lost change password button X-Git-Tag: 0.4.10~203 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=refs%2Fpull%2F1192%2Fhead;p=oweals%2Fminetest.git Fix lost change password button --- 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"))) {