Make main menu version number always DX

This commit is contained in:
Agent X 2024-02-23 10:20:14 -05:00
parent d4fe80d4a6
commit 6f740403f9
5 changed files with 5 additions and 21 deletions

View file

@ -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) {

View file

@ -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

View file

@ -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);

View file

@ -1,8 +1,6 @@
#pragma once
#include "djui.h"
extern struct DjuiText* gVersionText;
extern bool gDjuiPanelMainCreated;
void djui_panel_main_create(struct DjuiBase* caller);

View file

@ -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