From 50781ded69cb65530c6038ad842a2e931b982a58 Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 28 Jan 2024 17:31:06 -0800 Subject: [PATCH 1/4] Menus/Replay: correctly adjust position of quit button in Time Attack --- src/k_menu.h | 1 + src/menus/transient/pause-replay.c | 13 +++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/k_menu.h b/src/k_menu.h index 344c43430..da1b68f61 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -524,6 +524,7 @@ typedef enum playback_view2, playback_view3, playback_view4, + playback_freecam, playback_quit } playback_e; diff --git a/src/menus/transient/pause-replay.c b/src/menus/transient/pause-replay.c index 410d2118a..f3277de9e 100644 --- a/src/menus/transient/pause-replay.c +++ b/src/menus/transient/pause-replay.c @@ -108,12 +108,10 @@ static void M_PlaybackTick(void) for (i = playback_viewcount; i <= playback_view4; i++) PAUSE_PlaybackMenu[i].status = IT_DISABLED; - //PAUSE_PlaybackMenu[playback_moreoptions].mvar1 = 72; - //PAUSE_PlaybackMenu[playback_quit].mvar1 = 88; - PAUSE_PlaybackMenu[playback_quit].mvar1 = 72; + PAUSE_PlaybackMenu[playback_freecam].mvar1 = 72; + PAUSE_PlaybackMenu[playback_quit].mvar1 = 88; - //currentMenu->x = BASEVIDWIDTH/2 - 52; - currentMenu->x = BASEVIDWIDTH/2 - 44; + currentMenu->x = BASEVIDWIDTH/2 - 52; } else { @@ -124,9 +122,8 @@ static void M_PlaybackTick(void) for (i = r_splitscreen+1; i < 4; i++) PAUSE_PlaybackMenu[playback_view1+i].status = IT_DISABLED; - //PAUSE_PlaybackMenu[playback_moreoptions].mvar1 = 156; - //PAUSE_PlaybackMenu[playback_quit].mvar1 = 172; - PAUSE_PlaybackMenu[playback_quit].mvar1 = 156; + PAUSE_PlaybackMenu[playback_freecam].mvar1 = 156; + PAUSE_PlaybackMenu[playback_quit].mvar1 = 172; //currentMenu->x = BASEVIDWIDTH/2 - 94; currentMenu->x = BASEVIDWIDTH/2 - 88; From e0583a19b3f88e67ad5eb679464c144996fef2b5 Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 28 Jan 2024 17:41:23 -0800 Subject: [PATCH 2/4] Menus/Replay: do not draw border in non-green resolutions The border draws over the buttons, which makes the menu practically unusable. Not drawing the border is the simplest thing I could do to fix this. --- src/k_menudraw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/k_menudraw.c b/src/k_menudraw.c index da532c564..ad2071e02 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -472,7 +472,8 @@ void M_DrawMenuForeground(void) } // draw non-green resolution border - if ((vid.width % BASEVIDWIDTH != 0) || (vid.height % BASEVIDHEIGHT != 0)) + if (currentMenu != &PAUSE_PlaybackMenuDef && // this obscures replay menu and I want to put in minimal effort to fix that + ((vid.width % BASEVIDWIDTH != 0) || (vid.height % BASEVIDHEIGHT != 0))) { V_DrawFixedPatch(0, 0, FRACUNIT, 0, W_CachePatchName("WEIRDRES", PU_CACHE), NULL); } From 4adadb01679c4d8dbce0a8c3921e4b52733f6deb Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 28 Jan 2024 17:47:50 -0800 Subject: [PATCH 3/4] Menus/Replay: use menu font --- src/k_menudraw.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/k_menudraw.c b/src/k_menudraw.c index ad2071e02..8a1102665 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -5721,22 +5721,22 @@ void M_DrawPlaybackMenu(void) if (i == itemOn) { - V_DrawCharacter(currentMenu->x + currentMenu->menuitems[i].mvar1 + 4, currentMenu->y + 14, - '\x1A' | V_SNAPTOTOP|highlightflags, false); + V_DrawMenuString(currentMenu->x + currentMenu->menuitems[i].mvar1 + 4, currentMenu->y + 14, + V_SNAPTOTOP|highlightflags, "\x1A"); - V_DrawCenteredString(BASEVIDWIDTH/2, currentMenu->y + 18, V_SNAPTOTOP, currentMenu->menuitems[i].text); + V_DrawCenteredMenuString(BASEVIDWIDTH/2, currentMenu->y + 19, V_SNAPTOTOP, currentMenu->menuitems[i].text); if ((currentMenu->menuitems[i].status & IT_TYPE) == IT_ARROWS) { char *str; if (!(i == playback_viewcount && r_splitscreen == 3)) - V_DrawCharacter(BASEVIDWIDTH/2 - 4, currentMenu->y + 28 - (skullAnimCounter/5), - '\x1A' | V_SNAPTOTOP|highlightflags, false); // up arrow + V_DrawMenuString(BASEVIDWIDTH/2 - 4, currentMenu->y + 28 - (skullAnimCounter/5), + V_SNAPTOTOP|highlightflags, "\x1A"); // up arrow if (!(i == playback_viewcount && r_splitscreen == 0)) - V_DrawCharacter(BASEVIDWIDTH/2 - 4, currentMenu->y + 48 + (skullAnimCounter/5), - '\x1B' | V_SNAPTOTOP|highlightflags, false); // down arrow + V_DrawMenuString(BASEVIDWIDTH/2 - 4, currentMenu->y + 48 + (skullAnimCounter/5), + V_SNAPTOTOP|highlightflags, "\x1B"); // down arrow switch (i) { @@ -5755,7 +5755,7 @@ void M_DrawPlaybackMenu(void) continue; } - V_DrawCenteredString(BASEVIDWIDTH/2, currentMenu->y + 38, V_SNAPTOTOP|highlightflags, str); + V_DrawCenteredMenuString(BASEVIDWIDTH/2, currentMenu->y + 38, V_SNAPTOTOP|highlightflags, str); } } } From b732d7bd43e77621d4b89c83addf0c551b73a5ea Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 28 Jan 2024 17:55:23 -0800 Subject: [PATCH 4/4] Menus/Replay: replace rewind button with restart button - Restarts the replay from the beginning - New button graphic --- src/menus/transient/pause-replay.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/menus/transient/pause-replay.c b/src/menus/transient/pause-replay.c index f3277de9e..67dfd37e3 100644 --- a/src/menus/transient/pause-replay.c +++ b/src/menus/transient/pause-replay.c @@ -16,7 +16,7 @@ menuitem_t PAUSE_PlaybackMenu[] = { {IT_CALL | IT_STRING, "Hide Menu", NULL, "M_PHIDE", {.routine = M_SelectableClearMenus}, 0, 0}, - {IT_CALL | IT_STRING, "Rewind", NULL, "M_PREW", {.routine = M_PlaybackRewind}, 20, 0}, + {IT_CALL | IT_STRING, "Restart", NULL, "M_PRSTRT", {.routine = M_PlaybackRewind}, 20, 0}, {IT_CALL | IT_STRING, "Pause", NULL, "M_PPAUSE", {.routine = M_PlaybackPause}, 36, 0}, {IT_CALL | IT_STRING, "Fast-Forward", NULL, "M_PFFWD", {.routine = M_PlaybackFastForward}, 52, 0}, {IT_CALL | IT_STRING, "Backup Frame", NULL, "M_PSTEPB", {.routine = M_PlaybackRewind}, 20, 0}, @@ -137,6 +137,7 @@ void M_SetPlaybackMenuPointer(void) void M_PlaybackRewind(INT32 choice) { +#if 0 static tic_t lastconfirmtime; (void)choice; @@ -159,6 +160,11 @@ void M_PlaybackRewind(INT32 choice) } CV_SetValue(&cv_playbackspeed, 1); +#else + (void)choice; + G_DoPlayDemo(NULL); // Restart the current demo + M_ClearMenus(true); +#endif } void M_PlaybackPause(INT32 choice)