Fix in-course timer HUD

It's just some SetFont() calls come on.
This commit is contained in:
LostTrackpad 2024-06-05 21:06:02 +07:00
parent fa800eb51f
commit 0904f2d072

View file

@ -236,6 +236,7 @@ function CourseHUD()
if incourse then
local text = string.FormattedTime(totaltime, "%02i:%02i:%02i")
local w, _ = surface.GetTextSize(text)
surface.SetFont("BeatrunHUD")
surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.075 + vpz)
surface.DrawText(text)
end
@ -265,6 +266,7 @@ function CourseHUD()
local text = string.FormattedTime(pbtotal, "%02i:%02i:%02i")
local w, h = surface.GetTextSize(text)
surface.SetFont("BeatrunHUD")
surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.075 + h + vpz)
surface.SetTextColor(255, 255, 255, 125)
surface.DrawText(text)
@ -277,6 +279,7 @@ function CourseHUD()
timealpha = math.max(0, timealpha - FrameTime() * 250)
timecolor.a = math.min(255, timealpha)
surface.SetFont("BeatrunHUD")
surface.SetTextPos(ScrW() * 0.5 - w * 0.5 + vpx, ScrH() * 0.3 + vpz)
surface.SetTextColor(timecolor)
surface.DrawText(timetext)