mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
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.
This commit is contained in:
parent
4e6b8062ec
commit
e369eb1a9b
@ -565,7 +565,7 @@ void TouchScreenGUI::init(ISimpleTextureSource *tsrc)
|
|||||||
m_screensize.Y - (3 * button_size)),
|
m_screensize.Y - (3 * button_size)),
|
||||||
L"z", false);
|
L"z", false);
|
||||||
|
|
||||||
// init special1 button
|
// init special1/aux button
|
||||||
if (!m_joystick_triggers_special1)
|
if (!m_joystick_triggers_special1)
|
||||||
initButton(special1_id,
|
initButton(special1_id,
|
||||||
rect<s32>(m_screensize.X - (1.25 * button_size),
|
rect<s32>(m_screensize.X - (1.25 * button_size),
|
||||||
@ -575,13 +575,13 @@ void TouchScreenGUI::init(ISimpleTextureSource *tsrc)
|
|||||||
L"spc1", false);
|
L"spc1", false);
|
||||||
|
|
||||||
m_settingsbar.init(m_texturesource, "gear_icon.png", settings_starter_id,
|
m_settingsbar.init(m_texturesource, "gear_icon.png", settings_starter_id,
|
||||||
v2s32(m_screensize.X - (button_size / 2),
|
v2s32(m_screensize.X - (1.25 * button_size),
|
||||||
m_screensize.Y - ((SETTINGS_BAR_Y_OFFSET + 1) * button_size)
|
m_screensize.Y - ((SETTINGS_BAR_Y_OFFSET + 1.0) * button_size)
|
||||||
+ (button_size * 0.5)),
|
+ (0.5 * button_size)),
|
||||||
v2s32(m_screensize.X,
|
v2s32(m_screensize.X - (0.25 * button_size),
|
||||||
m_screensize.Y - (SETTINGS_BAR_Y_OFFSET * button_size)
|
m_screensize.Y - (SETTINGS_BAR_Y_OFFSET * button_size)
|
||||||
+ (button_size * 0.5)), AHBB_Dir_Right_Left,
|
+ (0.5 * button_size)),
|
||||||
3.0);
|
AHBB_Dir_Right_Left, 3.0);
|
||||||
|
|
||||||
m_settingsbar.addButton(fly_id, L"fly", "fly_btn.png");
|
m_settingsbar.addButton(fly_id, L"fly", "fly_btn.png");
|
||||||
m_settingsbar.addButton(noclip_id, L"noclip", "noclip_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");
|
"chat_hide_btn.png", "chat_show_btn.png");
|
||||||
|
|
||||||
m_rarecontrolsbar.init(m_texturesource, "rare_controls.png",
|
m_rarecontrolsbar.init(m_texturesource, "rare_controls.png",
|
||||||
rare_controls_starter_id,
|
rare_controls_starter_id,
|
||||||
v2s32(0,
|
v2s32(0.25 * button_size,
|
||||||
m_screensize.Y
|
m_screensize.Y - ((RARE_CONTROLS_BAR_Y_OFFSET + 1.0) * button_size)
|
||||||
- ((RARE_CONTROLS_BAR_Y_OFFSET + 1) * button_size)
|
+ (0.5 * button_size)),
|
||||||
+ (button_size * 0.5)),
|
v2s32(0.75 * button_size,
|
||||||
v2s32(button_size / 2,
|
m_screensize.Y - (RARE_CONTROLS_BAR_Y_OFFSET * button_size)
|
||||||
m_screensize.Y - (RARE_CONTROLS_BAR_Y_OFFSET * button_size)
|
+ (0.5 * button_size)),
|
||||||
+ (button_size * 0.5)), AHBB_Dir_Left_Right,
|
AHBB_Dir_Left_Right, 2.0);
|
||||||
2);
|
|
||||||
|
|
||||||
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(inventory_id, L"inv", "inventory_btn.png");
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1005 B After Width: | Height: | Size: 3.8 KiB |
Loading…
Reference in New Issue
Block a user