mirror of
https://github.com/JonnyBro/beatrun.git
synced 2025-03-01 01:39:37 +05:00
Fix in-course timer HUD
It's just some SetFont() calls come on.
This commit is contained in:
parent
fa800eb51f
commit
0904f2d072
1 changed files with 3 additions and 0 deletions
|
@ -236,6 +236,7 @@ function CourseHUD()
|
||||||
if incourse then
|
if incourse then
|
||||||
local text = string.FormattedTime(totaltime, "%02i:%02i:%02i")
|
local text = string.FormattedTime(totaltime, "%02i:%02i:%02i")
|
||||||
local w, _ = surface.GetTextSize(text)
|
local w, _ = surface.GetTextSize(text)
|
||||||
|
surface.SetFont("BeatrunHUD")
|
||||||
surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.075 + vpz)
|
surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.075 + vpz)
|
||||||
surface.DrawText(text)
|
surface.DrawText(text)
|
||||||
end
|
end
|
||||||
|
@ -265,6 +266,7 @@ function CourseHUD()
|
||||||
local text = string.FormattedTime(pbtotal, "%02i:%02i:%02i")
|
local text = string.FormattedTime(pbtotal, "%02i:%02i:%02i")
|
||||||
local w, h = surface.GetTextSize(text)
|
local w, h = surface.GetTextSize(text)
|
||||||
|
|
||||||
|
surface.SetFont("BeatrunHUD")
|
||||||
surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.075 + h + vpz)
|
surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.075 + h + vpz)
|
||||||
surface.SetTextColor(255, 255, 255, 125)
|
surface.SetTextColor(255, 255, 255, 125)
|
||||||
surface.DrawText(text)
|
surface.DrawText(text)
|
||||||
|
@ -277,6 +279,7 @@ function CourseHUD()
|
||||||
timealpha = math.max(0, timealpha - FrameTime() * 250)
|
timealpha = math.max(0, timealpha - FrameTime() * 250)
|
||||||
timecolor.a = math.min(255, timealpha)
|
timecolor.a = math.min(255, timealpha)
|
||||||
|
|
||||||
|
surface.SetFont("BeatrunHUD")
|
||||||
surface.SetTextPos(ScrW() * 0.5 - w * 0.5 + vpx, ScrH() * 0.3 + vpz)
|
surface.SetTextPos(ScrW() * 0.5 - w * 0.5 + vpx, ScrH() * 0.3 + vpz)
|
||||||
surface.SetTextColor(timecolor)
|
surface.SetTextColor(timecolor)
|
||||||
surface.DrawText(timetext)
|
surface.DrawText(timetext)
|
||||||
|
|
Loading…
Reference in a new issue