diff --git a/LICENSE.txt b/LICENSE.txt index d7316a0bf..a171e4052 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -87,6 +87,9 @@ DS: games/devtest/mods/soundstuff/sounds/soundstuff_sinus.ogg games/devtest/mods/testtools/textures/testtools_branding_iron.png +grorp: + textures/base/pack/exit_btn.png + License of Minetest source code ------------------------------- diff --git a/android/icons/exit_btn.svg b/android/icons/exit_btn.svg new file mode 100644 index 000000000..5dd642e83 --- /dev/null +++ b/android/icons/exit_btn.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/doc/texture_packs.md b/doc/texture_packs.md index 2e595449e..c1bd1dd86 100644 --- a/doc/texture_packs.md +++ b/doc/texture_packs.md @@ -152,6 +152,7 @@ are placeholders intended to be overwritten by the game. * `debug_btn.png` * `gear_icon.png` * `rare_controls.png` +* `exit_btn.png` Texture Overrides ----------------- diff --git a/src/gui/touchscreengui.cpp b/src/gui/touchscreengui.cpp index b16bcc820..531b7708e 100644 --- a/src/gui/touchscreengui.cpp +++ b/src/gui/touchscreengui.cpp @@ -50,6 +50,11 @@ const char **joystick_imagenames = (const char *[]) { static irr::EKEY_CODE id2keycode(touch_gui_button_id id) { + // ESC isn't part of the keymap. + if (id == exit_id) { + return KEY_ESCAPE; + } + std::string key = ""; switch (id) { case inventory_id: @@ -548,9 +553,10 @@ void TouchScreenGUI::init(ISimpleTextureSource *tsrc) + (0.5 * button_size)), AHBB_Dir_Left_Right, 2.0); - m_rarecontrolsbar.addButton(chat_id, L"Chat", "chat_btn.png"); + m_rarecontrolsbar.addButton(chat_id, L"chat", "chat_btn.png"); m_rarecontrolsbar.addButton(inventory_id, L"inv", "inventory_btn.png"); m_rarecontrolsbar.addButton(drop_id, L"drop", "drop_btn.png"); + m_rarecontrolsbar.addButton(exit_id, L"exit", "exit_btn.png"); m_initialized = true; } diff --git a/src/gui/touchscreengui.h b/src/gui/touchscreengui.h index 2b00744c3..b91aca9dd 100644 --- a/src/gui/touchscreengui.h +++ b/src/gui/touchscreengui.h @@ -54,6 +54,7 @@ typedef enum chat_id, inventory_id, drop_id, + exit_id, joystick_off_id, joystick_bg_id, joystick_center_id diff --git a/textures/base/pack/exit_btn.png b/textures/base/pack/exit_btn.png new file mode 100644 index 000000000..9769a18d4 Binary files /dev/null and b/textures/base/pack/exit_btn.png differ