From 6a85bc4dba9d413e7669f21d4ede82f71d5b2aaa Mon Sep 17 00:00:00 2001 From: HailSanta Date: Sat, 27 Jan 2024 18:11:45 -0500 Subject: [PATCH] option for mod name on title screen --- src/dx/config.h | 3 +++ src/filemenu/filemenu_main.c | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/dx/config.h b/src/dx/config.h index eda9c48ce8..cf8dba621d 100644 --- a/src/dx/config.h +++ b/src/dx/config.h @@ -1,6 +1,9 @@ #ifndef DX #define DX +/// Set the version string that appears on the file select menu. +#define DX_MOD_VERSION_STRING "??? ?.?.?" + /// Enables the debug menu. #define DX_DEBUG_MENU 1 diff --git a/src/filemenu/filemenu_main.c b/src/filemenu/filemenu_main.c index 4dc2a2a824..9466ce6358 100644 --- a/src/filemenu/filemenu_main.c +++ b/src/filemenu/filemenu_main.c @@ -4,6 +4,8 @@ #include "audio/public.h" #include "fio.h" #include "game_modes.h" +#include "dx/config.h" +#include "dx/debug_menu.h" extern HudScript HES_Spirit1; extern HudScript HES_Spirit2; @@ -345,6 +347,8 @@ void filemenu_draw_contents_title( s32 width, s32 height, s32 opacity, s32 darkening ) { + u8 msgBuf[64]; + s32 msgWidth; s32 msgIdx; s32 xOffset; s32 yOffset; @@ -381,6 +385,12 @@ void filemenu_draw_contents_title( } filemenu_draw_message(filemenu_get_menu_message(msgIdx), baseX + xOffset, baseY + yOffset, 255, 0, 0); + + #ifdef DX_MOD_VERSION_STRING + msgWidth = get_msg_width(msgBuf, 0); + dx_string_to_msg(msgBuf, DX_MOD_VERSION_STRING); + filemenu_draw_message(msgBuf, (SCREEN_WIDTH - msgWidth) / 2, 245 - baseY, 255, 0, 0); + #endif } void filemenu_draw_contents_stereo(