mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 05:25:14 +00:00
Fix refresh on rom hacks going to mods menu
This commit is contained in:
parent
b6df4176f4
commit
273807b2eb
1 changed files with 6 additions and 3 deletions
|
@ -18,6 +18,7 @@ static struct DjuiFlowLayout* sModLayout = NULL;
|
|||
static struct DjuiThreePanel* sDescriptionPanel = NULL;
|
||||
static struct DjuiText* sTooltip = NULL;
|
||||
static bool sWarned = false;
|
||||
static bool sRomHacks = false;
|
||||
|
||||
void djui_panel_host_mods_create(struct DjuiBase* caller);
|
||||
|
||||
|
@ -119,13 +120,15 @@ static void djui_panel_host_mods_destroy(struct DjuiBase* base) {
|
|||
}
|
||||
|
||||
void djui_panel_host_mods_create(struct DjuiBase* caller) {
|
||||
bool isRomHacks = caller != NULL ? caller->tag != 0 : false;
|
||||
if (caller != NULL) {
|
||||
sRomHacks = caller->tag != 0;
|
||||
}
|
||||
|
||||
mods_update_selectable();
|
||||
djui_panel_host_mods_description_create();
|
||||
|
||||
struct DjuiThreePanel* panel = djui_panel_menu_create(
|
||||
isRomHacks ? DLANG(HOST_MODS, ROMHACKS) : DLANG(HOST_MODS, MODS),
|
||||
sRomHacks ? DLANG(HOST_MODS, ROMHACKS) : DLANG(HOST_MODS, MODS),
|
||||
true);
|
||||
|
||||
struct DjuiBase* body = djui_three_panel_get_body(panel);
|
||||
|
@ -135,7 +138,7 @@ void djui_panel_host_mods_create(struct DjuiBase* caller) {
|
|||
struct DjuiBase* layoutBase = &paginated->layout->base;
|
||||
for (int i = 0; i < gLocalMods.entryCount; i++) {
|
||||
struct Mod* mod = gLocalMods.entries[i];
|
||||
if (isRomHacks != (mod->incompatible && strstr(mod->incompatible, "romhack"))) {
|
||||
if (sRomHacks != (mod->incompatible && strstr(mod->incompatible, "romhack"))) {
|
||||
continue;
|
||||
}
|
||||
struct DjuiCheckbox* checkbox = djui_checkbox_create(layoutBase, mod->name, &mod->enabled, djui_mod_checkbox_on_value_change);
|
||||
|
|
Loading…
Reference in a new issue