From 4b0c0241e03234793f380a268c543fdc0d222921 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sat, 12 Mar 2022 16:10:03 -0800 Subject: [PATCH] Fixed mod list incompatibility issue --- src/pc/djui/djui_panel_display.c | 2 +- src/pc/djui/djui_panel_host_mods.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pc/djui/djui_panel_display.c b/src/pc/djui/djui_panel_display.c index d9d3df256..4feb1867d 100644 --- a/src/pc/djui/djui_panel_display.c +++ b/src/pc/djui/djui_panel_display.c @@ -7,7 +7,7 @@ static void djui_panel_display_apply(UNUSED struct DjuiBase* caller) { } void djui_panel_display_create(struct DjuiBase* caller) { - f32 bodyHeight = 32 * 7 + 64 * 2 + 32 * 7; + f32 bodyHeight = 32 * 7 + 64 * 2 + 16 * 8; struct DjuiBase* defaultBase = NULL; struct DjuiThreePanel* panel = djui_panel_menu_create(bodyHeight, "\\#ff0800\\D\\#1be700\\I\\#00b3ff\\S\\#ffef00\\P\\#ff0800\\L\\#1be700\\A\\#00b3ff\\Y"); diff --git a/src/pc/djui/djui_panel_host_mods.c b/src/pc/djui/djui_panel_host_mods.c index 1f240b9c1..0e7baace9 100644 --- a/src/pc/djui/djui_panel_host_mods.c +++ b/src/pc/djui/djui_panel_host_mods.c @@ -7,7 +7,7 @@ #include "pc/cheats.h" #include "pc/mod_list.h" -static struct DjuiFlowLayout* sModPanelBody = NULL; +static struct DjuiFlowLayout* sModLayout = NULL; static struct DjuiThreePanel* sDescriptionPanel = NULL; static struct DjuiText* sTooltip = NULL; @@ -60,7 +60,7 @@ static void djui_mod_checkbox_on_value_change(UNUSED struct DjuiBase* base) { mod_list_update_selectable(); u16 index = 0; - struct DjuiBaseChild* node = sModPanelBody->base.child; + struct DjuiBaseChild* node = sModLayout->base.child; while (node != NULL) { if (index >= gModTableLocal.entryCount) { break; } struct ModListEntry* entry = &gModTableLocal.entries[index]; @@ -91,9 +91,9 @@ void djui_panel_host_mods_create(struct DjuiBase* caller) { struct DjuiBase* defaultBase = NULL; struct DjuiThreePanel* panel = djui_panel_menu_create(bodyHeight, "\\#ff0800\\M\\#1be700\\O\\#00b3ff\\D\\#ffef00\\S"); struct DjuiFlowLayout* body = (struct DjuiFlowLayout*)djui_three_panel_get_body(panel); - sModPanelBody = body; { struct DjuiPaginated* paginated = djui_paginated_create(&body->base, 8); + sModLayout = paginated->layout; struct DjuiBase* layoutBase = &paginated->layout->base; for (int i = 0; i < gModTableLocal.entryCount; i++) { struct ModListEntry* entry = &gModTableLocal.entries[i];