From 39bc04200e9cc7673e32f09a8cae4eaf6f219f82 Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 3 Mar 2024 18:28:30 -0800 Subject: [PATCH 1/2] Time Attack: staff ghost time uses speedometer font --- src/k_hud.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/k_hud.cpp b/src/k_hud.cpp index e7b2f2c6b..ce963c9dc 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -1987,8 +1987,13 @@ void K_drawKartTimestamp(tic_t drawtime, INT32 TX, INT32 TY, INT32 splitflags, U } } - workx -= V_ThinStringWidth(stickermedalinfo.targettext, splitflags); - V_DrawThinString(workx, worky, splitflags, stickermedalinfo.targettext); + using srb2::Draw; + Draw::TextElement text(stickermedalinfo.targettext); + text.flags(splitflags); + text.font(Draw::Font::kZVote); + + workx -= text.width(); + Draw(workx, worky).text(text); } workx -= (6 + (i*5)); From 9950a8210c05d6ec2335c2e18c5eb15b571bd753 Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 3 Mar 2024 18:28:51 -0800 Subject: [PATCH 2/2] Time Attack: display Y button prompt above timestamp --- src/k_hud.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/k_hud.cpp b/src/k_hud.cpp index ce963c9dc..683763c0d 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -5958,11 +5958,19 @@ void K_drawKartHUD(void) { // Draw the timestamp if (LUA_HudEnabled(hud_time)) - K_drawKartTimestamp(stplyr->realtime, - TIME_X, - TIME_Y, - V_HUDTRANS|V_SLIDEIN|V_SNAPTOTOP|V_SNAPTORIGHT, - 0); + { + bool ta = modeattacking && !demo.playback; + INT32 flags = V_HUDTRANS|V_SLIDEIN|V_SNAPTOTOP|V_SNAPTORIGHT; + K_drawKartTimestamp(stplyr->realtime, TIME_X, TIME_Y + (ta ? 2 : 0), flags, 0); + if (ta) + { + using srb2::Draw; + Draw(BASEVIDWIDTH - 19, 2) + .flags(flags | V_YELLOWMAP) + .align(Draw::Align::kRight) + .text("\xBE Restart"); + } + } islonesome = K_drawKartPositionFaces(); }