From e369eb1a9b2d65629d444fb305925e0d1b859b6f Mon Sep 17 00:00:00 2001 From: Paramat Date: Fri, 19 Oct 2018 04:52:47 +0100 Subject: [PATCH] Android buttons: Inset 'rare controls', inset and resize 'gear icon' (#7792) Previously these were both inconsistently close to the screen edge. 'gear icon' has been enlarged to match the width of 'zoom' and 'aux' buttons. --- src/gui/touchscreengui.cpp | 33 +++++++++++++++---------------- textures/base/pack/gear_icon.png | Bin 1005 -> 3906 bytes 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/gui/touchscreengui.cpp b/src/gui/touchscreengui.cpp index 6d07a4742..a2d62c8b7 100644 --- a/src/gui/touchscreengui.cpp +++ b/src/gui/touchscreengui.cpp @@ -565,7 +565,7 @@ void TouchScreenGUI::init(ISimpleTextureSource *tsrc) m_screensize.Y - (3 * button_size)), L"z", false); - // init special1 button + // init special1/aux button if (!m_joystick_triggers_special1) initButton(special1_id, rect(m_screensize.X - (1.25 * button_size), @@ -575,13 +575,13 @@ void TouchScreenGUI::init(ISimpleTextureSource *tsrc) L"spc1", false); m_settingsbar.init(m_texturesource, "gear_icon.png", settings_starter_id, - v2s32(m_screensize.X - (button_size / 2), - m_screensize.Y - ((SETTINGS_BAR_Y_OFFSET + 1) * button_size) - + (button_size * 0.5)), - v2s32(m_screensize.X, - m_screensize.Y - (SETTINGS_BAR_Y_OFFSET * button_size) - + (button_size * 0.5)), AHBB_Dir_Right_Left, - 3.0); + v2s32(m_screensize.X - (1.25 * button_size), + m_screensize.Y - ((SETTINGS_BAR_Y_OFFSET + 1.0) * button_size) + + (0.5 * button_size)), + v2s32(m_screensize.X - (0.25 * button_size), + m_screensize.Y - (SETTINGS_BAR_Y_OFFSET * button_size) + + (0.5 * button_size)), + AHBB_Dir_Right_Left, 3.0); m_settingsbar.addButton(fly_id, L"fly", "fly_btn.png"); m_settingsbar.addButton(noclip_id, L"noclip", "noclip_btn.png"); @@ -596,15 +596,14 @@ void TouchScreenGUI::init(ISimpleTextureSource *tsrc) "chat_hide_btn.png", "chat_show_btn.png"); m_rarecontrolsbar.init(m_texturesource, "rare_controls.png", - rare_controls_starter_id, - v2s32(0, - m_screensize.Y - - ((RARE_CONTROLS_BAR_Y_OFFSET + 1) * button_size) - + (button_size * 0.5)), - v2s32(button_size / 2, - m_screensize.Y - (RARE_CONTROLS_BAR_Y_OFFSET * button_size) - + (button_size * 0.5)), AHBB_Dir_Left_Right, - 2); + rare_controls_starter_id, + v2s32(0.25 * button_size, + m_screensize.Y - ((RARE_CONTROLS_BAR_Y_OFFSET + 1.0) * button_size) + + (0.5 * button_size)), + v2s32(0.75 * button_size, + m_screensize.Y - (RARE_CONTROLS_BAR_Y_OFFSET * button_size) + + (0.5 * button_size)), + AHBB_Dir_Left_Right, 2.0); m_rarecontrolsbar.addButton(chat_id, L"Chat", "chat_btn.png"); m_rarecontrolsbar.addButton(inventory_id, L"inv", "inventory_btn.png"); diff --git a/textures/base/pack/gear_icon.png b/textures/base/pack/gear_icon.png index 71825eb8df3dd9bbf2d2512649f16c20397e5198..c8c67491234c12f227238857e5b19c536b7eb90c 100644 GIT binary patch literal 3906 zcma)2oJMNOf^T2X{=6@K5>SLd zDQ43L7;A@^wT-%={)54_wdptvDSX3VXD)ouVA;dsf8mxe&JT6sYy?bW#gKp#MLs?A5XzK&?A*mNx?C8VYV>&+PQUOsu|zUvQ9i1J`5of}ny(DIE? zIEkWzF;B%msGr7N)Tw9w8ZKk9{*HjyzuKz9dOuVD9Ns<~XaJfJD6fx5gbD^vx+ zA8T_Ow*Y$)1W^R&?YHxVj;M>6*Z1Fbgw$ThLU4l(WQvbO^nJ^a1#>xt*^Ym;FD)!9#&+>R?`TY*RZQ z&m?#avMtj7X!YItPriMXP?OJJ94%Lm^MA|}?urS39CJAmWjFGGQnE8@Z-(-gW3O_^ zb$>)x`K%09>bQ;idPI%RvcTJ{AYFRF<ndpTcUs=1u0pxoaGq==yM}PX z)GfM-M9Z%Kv`$2}c#jx5N$%~>1rTqfQ_m5v5jkZ1d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