From 5c8b9961978f2039d04ebc7e54fda37ffc9e43a1 Mon Sep 17 00:00:00 2001 From: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com> Date: Wed, 22 Nov 2023 18:03:11 +1000 Subject: [PATCH] hide player list when on main menu properly (#535) --- src/pc/djui/djui_panel_playerlist.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pc/djui/djui_panel_playerlist.c b/src/pc/djui/djui_panel_playerlist.c index 6ace8d6f..64be25be 100644 --- a/src/pc/djui/djui_panel_playerlist.c +++ b/src/pc/djui/djui_panel_playerlist.c @@ -3,6 +3,7 @@ #include "djui.h" #include "djui_panel_menu.h" #include "djui_panel_playerlist.h" +#include "djui_panel_modlist.h" #include "game/level_info.h" #include "game/mario_misc.h" #include "pc/configfile.h" @@ -57,9 +58,15 @@ static void playerlist_update_row(u8 i, struct NetworkPlayer *np) { } void djui_panel_playerlist_on_render_pre(UNUSED struct DjuiBase* base, UNUSED bool* skipRender) { + if (gDjuiInMainMenu || gNetworkType == NT_NONE) { + djui_base_set_visible(&gDjuiPlayerList->base, false); + djui_base_set_visible(&gDjuiModList->base, false); + return; + } + s32 j = 0; p = 0; - + for (s32 i = 0; i < MAX_PLAYERS; i++) { struct NetworkPlayer *np = &gNetworkPlayers[i]; if (!np->connected) { continue; }