From 1b9962dfc2b65134bf46cbe027cfc4a106ee898a Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Fri, 20 Jan 2023 21:48:17 -0500 Subject: Enhancement: Adds Slider for Duration of Sequence Names on the Overlay (#2375) * New function: overlay text duration in seconds. `Overlay_DisplayText` took a float as an argument, with no clear indication of what that float represented. That float also evaluates to different durations given different frame rates. However, since we know what the frame rate should be at any given time (since it's stored in a CVar) we can calculate what this duration should be based on the number of seconds we want the overlay to be displayed. That's what `Overlay_DisplayText_Seconds` does. * Adds Slider for Overlay Sequence Name Durations --- soh/src/code/audio_load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'soh/src/code') diff --git a/soh/src/code/audio_load.c b/soh/src/code/audio_load.c index 03542f84f..4b4b027f3 100644 --- a/soh/src/code/audio_load.c +++ b/soh/src/code/audio_load.c @@ -615,7 +615,7 @@ s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) { if (CVarGetInteger("gSeqNameOverlay", 0) && playerIdx == SEQ_PLAYER_BGM_MAIN) { const char* sequenceName = SfxEditor_GetSequenceName(seqId); if (sequenceName != NULL) { - Overlay_DisplayText(5.0f, sequenceName); + Overlay_DisplayText_Seconds(CVarGetInteger("gSeqNameOverlayDuration", 5), sequenceName); } } } -- cgit v1.2.3