Remove in-game changelog panel

This commit is contained in:
Agent X 2024-06-30 17:51:35 -04:00
parent c144ff6780
commit f93aeb3c72
6 changed files with 1 additions and 54 deletions

View file

@ -183,7 +183,6 @@ bool configDjuiThemeCenter = true;
unsigned int configDjuiThemeFont = FONT_NORMAL; unsigned int configDjuiThemeFont = FONT_NORMAL;
unsigned int configDjuiScale = 0; unsigned int configDjuiScale = 0;
// other // other
char configLastVersion[MAX_CONFIG_STRING] = "";
unsigned int configRulesVersion = 0; unsigned int configRulesVersion = 0;
static const struct ConfigOption options[] = { static const struct ConfigOption options[] = {
@ -308,7 +307,6 @@ static const struct ConfigOption options[] = {
{.name = "djui_theme_font", .type = CONFIG_TYPE_UINT, .uintValue = &configDjuiThemeFont}, {.name = "djui_theme_font", .type = CONFIG_TYPE_UINT, .uintValue = &configDjuiThemeFont},
{.name = "djui_scale", .type = CONFIG_TYPE_UINT, .uintValue = &configDjuiScale}, {.name = "djui_scale", .type = CONFIG_TYPE_UINT, .uintValue = &configDjuiScale},
// other // other
{.name = "last_version", .type = CONFIG_TYPE_STRING, .stringValue = (char*)&configLastVersion, .maxStringLength = MAX_CONFIG_STRING},
{.name = "rules_version", .type = CONFIG_TYPE_UINT, .uintValue = &configRulesVersion} {.name = "rules_version", .type = CONFIG_TYPE_UINT, .uintValue = &configRulesVersion}
}; };
@ -687,8 +685,6 @@ NEXT_OPTION:
if (configDjuiTheme >= DJUI_THEME_MAX) { configDjuiTheme = 0; } if (configDjuiTheme >= DJUI_THEME_MAX) { configDjuiTheme = 0; }
if (configDjuiScale >= 5) { configDjuiScale = 0; } if (configDjuiScale >= 5) { configDjuiScale = 0; }
if (!strcmp(configLastVersion, "")) { snprintf(configLastVersion, MAX_CONFIG_STRING, "%s", get_version()); }
#ifndef COOPNET #ifndef COOPNET
configNetworkSystem = NS_SOCKET; configNetworkSystem = NS_SOCKET;
#endif #endif

View file

@ -134,7 +134,6 @@ extern bool configDjuiThemeCenter;
extern unsigned int configDjuiThemeFont; extern unsigned int configDjuiThemeFont;
extern unsigned int configDjuiScale; extern unsigned int configDjuiScale;
// other // other
extern char configLastVersion[MAX_CONFIG_STRING];
extern unsigned int configRulesVersion; extern unsigned int configRulesVersion;
void enable_queued_mods(void); void enable_queued_mods(void);

View file

@ -5,7 +5,6 @@
#include "djui_panel_pause.h" #include "djui_panel_pause.h"
#include "djui_panel_join.h" #include "djui_panel_join.h"
#include "djui_panel_join_message.h" #include "djui_panel_join_message.h"
#include "djui_panel_changelog.h"
#include "djui_fps_display.h" #include "djui_fps_display.h"
#include "../debuglog.h" #include "../debuglog.h"
#include "pc/cliopts.h" #include "pc/cliopts.h"
@ -108,10 +107,6 @@ void djui_init_late(void) {
gPanelLanguageOnStartup = true; gPanelLanguageOnStartup = true;
djui_panel_language_create(NULL); djui_panel_language_create(NULL);
} }
if (strcmp(configLastVersion, get_version())) {
snprintf(configLastVersion, MAX_CONFIG_STRING, "%s", get_version());
djui_panel_changelog_create(NULL);
}
// djui_panel_debug_create(); // djui_panel_debug_create();
djui_cursor_create(); djui_cursor_create();

View file

@ -1,34 +0,0 @@
#include "djui.h"
#include "djui_panel.h"
#include "djui_panel_menu.h"
#define PAGE_COUNT 1
static char sChangelog[PAGE_COUNT][1024];
void djui_panel_changelog_create(struct DjuiBase* caller) {
struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(CHANGELOG, CHANGELOG_TITLE));
struct DjuiBase* body = djui_three_panel_get_body(panel);
{
struct DjuiPaginated* paginated = djui_paginated_create(body, 1);
struct DjuiBase* layoutBase = &paginated->layout->base;
snprintf(sChangelog[0], 1024, "Hi! This is Gabe Newell, welcome to sm64coopdx %s. If you have downloaded this build and do not come from the sm64coopdx v1.0 Testing Thread, please delete it and inform agentxlp.", SM64COOPDX_VERSION);
for (int i = 0; i < PAGE_COUNT; i++) {
struct DjuiText* text = djui_text_create(layoutBase, sChangelog[i]);
djui_base_set_location(&text->base, 0, 0);
djui_base_set_size(&text->base, (DJUI_DEFAULT_PANEL_WIDTH * (configDjuiThemeCenter ? DJUI_THEME_CENTERED_WIDTH : 1)) - 64, 360);
djui_base_set_color(&text->base, 220, 220, 220, 255);
djui_text_set_drop_shadow(text, 64, 64, 64, 100);
djui_text_set_alignment(text, DJUI_HALIGN_LEFT, DJUI_VALIGN_TOP);
}
djui_paginated_calculate_height(paginated);
djui_button_create(body, DLANG(MENU, BACK), DJUI_BUTTON_STYLE_BACK, djui_panel_menu_back);
}
djui_panel_add(caller, panel, NULL);
}

View file

@ -1,4 +0,0 @@
#pragma once
#include "djui.h"
void djui_panel_changelog_create(struct DjuiBase* caller);

View file

@ -1,7 +1,6 @@
#include "djui.h" #include "djui.h"
#include "djui_panel.h" #include "djui_panel.h"
#include "djui_panel_menu.h" #include "djui_panel_menu.h"
#include "djui_panel_changelog.h"
#include "pc/lua/utils/smlua_misc_utils.h" #include "pc/lua/utils/smlua_misc_utils.h"
static char sInfo[512]; static char sInfo[512];
@ -22,11 +21,7 @@ More features, customization, and power to the Lua API allow modders and players
djui_text_set_drop_shadow(text, 64, 64, 64, 100); djui_text_set_drop_shadow(text, 64, 64, 64, 100);
djui_text_set_alignment(text, DJUI_HALIGN_CENTER, DJUI_VALIGN_CENTER); djui_text_set_alignment(text, DJUI_HALIGN_CENTER, DJUI_VALIGN_CENTER);
struct DjuiRect* rect1 = djui_rect_container_create(body, 64); djui_button_create(body, DLANG(MENU, BACK), DJUI_BUTTON_STYLE_BACK, djui_panel_menu_back);
{
djui_button_left_create(&rect1->base, DLANG(MENU, BACK), DJUI_BUTTON_STYLE_BACK, djui_panel_menu_back);
djui_button_right_create(&rect1->base, DLANG(INFORMATION, CHANGELOG), DJUI_BUTTON_STYLE_NORMAL, djui_panel_changelog_create);
}
} }
djui_panel_add(caller, panel, NULL); djui_panel_add(caller, panel, NULL);