Skip to content

Commit

Permalink
option for mod name on title screen
Browse files Browse the repository at this point in the history
  • Loading branch information
HailSanta authored and HailSanta committed Jan 27, 2024
1 parent cbcb0af commit 6a85bc4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dx/config.h
Original file line number Diff line number Diff line change
@@ -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

Expand Down
10 changes: 10 additions & 0 deletions src/filemenu/filemenu_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 6a85bc4

Please sign in to comment.