diff --git a/builtin/mainmenu/settings/dlg_settings.lua b/builtin/mainmenu/settings/dlg_settings.lua index 01ff2dcb0..320b3dfc3 100644 --- a/builtin/mainmenu/settings/dlg_settings.lua +++ b/builtin/mainmenu/settings/dlg_settings.lua @@ -47,13 +47,13 @@ end local change_keys = { - query_text = "Change Keys", + query_text = "Controls", requires = { keyboard_mouse = true, }, get_formspec = function(self, avail_w) local btn_w = math.min(avail_w, 3) - return ("button[0,0;%f,0.8;btn_change_keys;%s]"):format(btn_w, fgettext("Change Keys")), 0.8 + return ("button[0,0;%f,0.8;btn_change_keys;%s]"):format(btn_w, fgettext("Controls")), 0.8 end, on_submit = function(self, fields) if fields.btn_change_keys then diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index fbc18e318..09bde2a4e 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -90,7 +90,7 @@ # Smooths rotation of camera, also called look or mouse smoothing. 0 to disable. camera_smoothing (Camera smoothing) float 0.0 0.0 0.99 -# Smooths rotation of camera when in cinematic mode, 0 to disable. Enter cinematic mode by using the key set in Change Keys. +# Smooths rotation of camera when in cinematic mode, 0 to disable. Enter cinematic mode by using the key set in Controls. # # Requires: keyboard_mouse cinematic_camera_smoothing (Camera smoothing in cinematic mode) float 0.7 0.0 0.99 diff --git a/minetest.conf.example b/minetest.conf.example index d88abe92a..72b3d2046 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -22,7 +22,7 @@ # type: float min: 0 max: 0.99 # camera_smoothing = 0.0 -# Smooths rotation of camera when in cinematic mode, 0 to disable. Enter cinematic mode by using the key set in Change Keys. +# Smooths rotation of camera when in cinematic mode, 0 to disable. Enter cinematic mode by using the key set in Controls. # type: float min: 0 max: 0.99 # cinematic_camera_smoothing = 0.7 @@ -3636,4 +3636,3 @@ # See https://github.com/minetest/irrlicht/blob/master/include/Keycodes.h # type: key # keymap_decrease_viewing_range_min = - - diff --git a/src/client/game.cpp b/src/client/game.cpp index 1a538a7f5..622e8bb07 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -4457,41 +4457,6 @@ void Game::showPauseMenu() "- touch&drag, tap 2nd finger\n" " --> place single item to slot\n" ); -#else - static const std::string control_text_template = strgettext("Controls:\n" - "- %s: move forwards\n" - "- %s: move backwards\n" - "- %s: move left\n" - "- %s: move right\n" - "- %s: jump/climb up\n" - "- %s: dig/punch/use\n" - "- %s: place/use\n" - "- %s: sneak/climb down\n" - "- %s: drop item\n" - "- %s: inventory\n" - "- Mouse: turn/look\n" - "- Mouse wheel: select item\n" - "- %s: chat\n" - ); - - char control_text_buf[600]; - - porting::mt_snprintf(control_text_buf, sizeof(control_text_buf), control_text_template.c_str(), - GET_KEY_NAME(keymap_forward), - GET_KEY_NAME(keymap_backward), - GET_KEY_NAME(keymap_left), - GET_KEY_NAME(keymap_right), - GET_KEY_NAME(keymap_jump), - GET_KEY_NAME(keymap_dig), - GET_KEY_NAME(keymap_place), - GET_KEY_NAME(keymap_sneak), - GET_KEY_NAME(keymap_drop), - GET_KEY_NAME(keymap_inventory), - GET_KEY_NAME(keymap_chat) - ); - - std::string control_text = std::string(control_text_buf); - str_formspec_escape(control_text); #endif float ypos = simple_singleplayer_mode ? 0.7f : 0.1f; @@ -4516,14 +4481,16 @@ void Game::showPauseMenu() } #endif os << "button_exit[4," << (ypos++) << ";3,0.5;btn_key_config;" - << strgettext("Change Keys") << "]"; + << strgettext("Controls") << "]"; #endif os << "button_exit[4," << (ypos++) << ";3,0.5;btn_exit_menu;" << strgettext("Exit to Menu") << "]"; os << "button_exit[4," << (ypos++) << ";3,0.5;btn_exit_os;" - << strgettext("Exit to OS") << "]" - << "textarea[7.5,0.25;3.9,6.25;;" << control_text << ";]" - << "textarea[0.4,0.25;3.9,6.25;;" << PROJECT_NAME_C " " VERSION_STRING "\n" + << strgettext("Exit to OS") << "]"; +#ifdef HAVE_TOUCHSCREENGUI + os << "textarea[7.5,0.25;3.9,6.25;;" << control_text << ";]"; +#endif + os << "textarea[0.4,0.25;3.9,6.25;;" << PROJECT_NAME_C " " VERSION_STRING "\n" << "\n" << strgettext("Game info:") << "\n"; const std::string &address = client->getAddressName(); diff --git a/src/settings_translation_file.cpp b/src/settings_translation_file.cpp index adcac066b..409cd7061 100644 --- a/src/settings_translation_file.cpp +++ b/src/settings_translation_file.cpp @@ -8,7 +8,7 @@ fake_function() { gettext("Camera smoothing"); gettext("Smooths rotation of camera, also called look or mouse smoothing. 0 to disable."); gettext("Camera smoothing in cinematic mode"); - gettext("Smooths rotation of camera when in cinematic mode, 0 to disable. Enter cinematic mode by using the key set in Change Keys."); + gettext("Smooths rotation of camera when in cinematic mode, 0 to disable. Enter cinematic mode by using the key set in Controls."); gettext("Build inside player"); gettext("If enabled, you can place nodes at the position (feet + eye level) where you stand.\nThis is helpful when working with nodeboxes in small areas."); gettext("Aux1 key for climbing/descending");