diff --git a/src/pc/djui/djui_panel_join.c b/src/pc/djui/djui_panel_join.c index 4c5f8c03..56795a1f 100644 --- a/src/pc/djui/djui_panel_join.c +++ b/src/pc/djui/djui_panel_join.c @@ -4,7 +4,6 @@ #include "djui_panel_join_lobbies.h" #include "djui_panel_join_private.h" #include "djui_panel_join_direct.h" -#include "djui_panel_main.h" #include "pc/network/network.h" #include "pc/utils/misc.h" #ifdef DISCORD_SDK @@ -16,9 +15,6 @@ static void djui_panel_compatibility_checkbox_on_value_change(UNUSED struct Djui #ifdef DISCORD_SDK gDiscordInitialized = false; #endif - if (gVersionText != NULL) { - djui_text_set_text(gVersionText, get_version_local()); - } } static void djui_panel_join_public_lobbies(struct DjuiBase* caller) { diff --git a/src/pc/djui/djui_panel_join_direct.c b/src/pc/djui/djui_panel_join_direct.c index f72e999b..485b2e1f 100644 --- a/src/pc/djui/djui_panel_join_direct.c +++ b/src/pc/djui/djui_panel_join_direct.c @@ -5,7 +5,6 @@ #include "djui_panel_modlist.h" #include "djui_panel_join_message.h" #include "djui_lobby_entry.h" -#include "djui_panel_main.h" #include "pc/network/network.h" #include "pc/network/socket/socket.h" #include "pc/network/coopnet/coopnet.h" @@ -24,9 +23,6 @@ static void djui_panel_compatibility_checkbox_on_value_change(UNUSED struct Djui #ifdef DISCORD_SDK gDiscordInitialized = false; #endif - if (gVersionText != NULL) { - djui_text_set_text(gVersionText, get_version_local()); - } } #endif diff --git a/src/pc/djui/djui_panel_main.c b/src/pc/djui/djui_panel_main.c index 553dfd08..b8b9d4be 100644 --- a/src/pc/djui/djui_panel_main.c +++ b/src/pc/djui/djui_panel_main.c @@ -10,8 +10,6 @@ extern ALIGNED8 u8 texture_coopdx_logo[]; -struct DjuiText* gVersionText = NULL; - bool gDjuiPanelMainCreated = false; static void djui_panel_main_quit_yes(UNUSED struct DjuiBase* caller) { @@ -48,11 +46,11 @@ void djui_panel_main_create(struct DjuiBase* caller) { djui_base_set_location(&button4->base, 0, -30.0f); } - gVersionText = djui_text_create(&panel->base, get_version_local()); - djui_base_set_size_type(&gVersionText->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE); - djui_base_set_size(&gVersionText->base, 1.0f, 1.0f); - djui_base_set_color(&gVersionText->base, 50, 50, 50, 255); - djui_text_set_alignment(gVersionText, DJUI_HALIGN_RIGHT, DJUI_VALIGN_BOTTOM); + struct DjuiText* version = djui_text_create(&panel->base, SM64COOPDX_VERSION); + djui_base_set_size_type(&version->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE); + djui_base_set_size(&version->base, 1.0f, 1.0f); + djui_base_set_color(&version->base, 50, 50, 50, 255); + djui_text_set_alignment(version, DJUI_HALIGN_RIGHT, DJUI_VALIGN_BOTTOM); } djui_panel_add(caller, panel, NULL); diff --git a/src/pc/djui/djui_panel_main.h b/src/pc/djui/djui_panel_main.h index d7061edc..e15eeea6 100644 --- a/src/pc/djui/djui_panel_main.h +++ b/src/pc/djui/djui_panel_main.h @@ -1,8 +1,6 @@ #pragma once #include "djui.h" -extern struct DjuiText* gVersionText; - extern bool gDjuiPanelMainCreated; void djui_panel_main_create(struct DjuiBase* caller); diff --git a/src/pc/djui/djui_panel_misc.c b/src/pc/djui/djui_panel_misc.c index 0e95cd87..efcbce44 100644 --- a/src/pc/djui/djui_panel_misc.c +++ b/src/pc/djui/djui_panel_misc.c @@ -2,7 +2,6 @@ #include "djui_panel.h" #include "djui_panel_menu.h" #include "djui_panel_menu_options.h" -#include "djui_panel_main.h" #include "djui_panel_options.h" #include "djui_panel_language.h" #include "djui_panel_info.h" @@ -18,9 +17,6 @@ static void djui_panel_compatibility_checkbox_on_value_change(UNUSED struct Djui #ifdef DISCORD_SDK gDiscordInitialized = false; #endif - if (gVersionText != NULL) { - djui_text_set_text(gVersionText, get_version_local()); - } } #ifdef DEVELOPMENT