Fix chat still screwing up when only resizing vertically on the OpenGL build

This commit is contained in:
UnknownShadow200 2020-02-02 09:36:25 +11:00
parent 3c06b1e333
commit e181c3ef84

View File

@ -377,6 +377,11 @@ static struct ChatScreen {
static void ChatScreen_UpdateChatYOffsets(struct ChatScreen* s) {
int pad, y;
/* Determining chat Y requires us to know hotbar's position */
/* But HUD is lower priority, so it gets laid out AFTER chat */
/* Hence use this hack to resize HUD first */
HUDScreen_Layout(Gui_HUD);
y = min(s->input.base.y, Gui_HUD->hotbar.y);
y -= s->input.base.yOffset; /* add some padding */