From 256539a925c63f8d35b98e7f229b7d2bd3656b79 Mon Sep 17 00:00:00 2001 From: Agent X <44549182+AgentXLP@users.noreply.github.com> Date: Sat, 31 Aug 2024 22:26:33 -0400 Subject: [PATCH] Fix Mod Menu panel height bug --- src/pc/djui/djui_panel_info.c | 2 +- src/pc/djui/djui_panel_mod_menu.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pc/djui/djui_panel_info.c b/src/pc/djui/djui_panel_info.c index b978657a..e4fd9b68 100644 --- a/src/pc/djui/djui_panel_info.c +++ b/src/pc/djui/djui_panel_info.c @@ -3,7 +3,7 @@ #include "djui_panel_menu.h" #include "pc/lua/utils/smlua_misc_utils.h" -static char sInfo[512]; +static char sInfo[512] = { 0 }; void djui_panel_info_create(struct DjuiBase *caller) { struct DjuiThreePanel *panel = djui_panel_menu_create(DLANG(INFORMATION, INFORMATION_TITLE), false); diff --git a/src/pc/djui/djui_panel_mod_menu.c b/src/pc/djui/djui_panel_mod_menu.c index 2b447f6d..9f29a341 100644 --- a/src/pc/djui/djui_panel_mod_menu.c +++ b/src/pc/djui/djui_panel_mod_menu.c @@ -105,12 +105,17 @@ void djui_panel_mod_menu_mod_create(struct DjuiBase* caller) { { struct DjuiPaginated* paginated = djui_paginated_create(body, 8); struct DjuiBase* layoutBase = &paginated->layout->base; + s32 count = 0; for (int i = 0; i < gHookedModMenuElementsCount; i++) { if (gHookedModMenuElements[i].mod == mod) { djui_panel_mod_menu_mod_create_element(layoutBase, i); + count++; } } djui_paginated_calculate_height(paginated); + if (count == 8) { + djui_base_set_size(layoutBase, layoutBase->width.value, layoutBase->height.value + 16); + } djui_button_create(body, DLANG(MENU, BACK), DJUI_BUTTON_STYLE_BACK, djui_panel_menu_back); }