The 4-arrow movement circle on mobile should always position itself to be slightly above inventory hotbar, instead of at a hardcoded offset from bottom of game

This commit is contained in:
UnknownShadow200 2020-10-28 23:28:59 +11:00
parent b3e82c214b
commit 04f4818e53

View File

@ -2058,6 +2058,7 @@ static void TouchScreen_Layout(void* screen) {
const struct TouchBindDesc* desc;
int i, height;
/* Need to align these relative to the hotbar */
HUDScreen_Layout(Gui_HUD);
height = Gui_HUD->hotbar.height;
@ -2068,7 +2069,9 @@ static void TouchScreen_Layout(void* screen) {
Widget_Layout(&s->btns[i]);
}
Widget_SetLocation(&s->thumbstick, ANCHOR_MIN, ANCHOR_MAX, 30, 50);
Widget_SetLocation(&s->thumbstick, ANCHOR_MIN, ANCHOR_MAX, 30, 5);
s->thumbstick.yOffset += height;
Widget_Layout(&s->thumbstick);
}
static void TouchScreen_Free(void* s) {