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
This commit is contained in:
Christopher Leggett 2023-01-20 21:48:17 -05:00 committed by GitHub
commit 1b9962dfc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 1 deletions

View file

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