- Blood: display the charge meter for the dynamite also on the alternative HUD.

This commit is contained in:
Christoph Oelckers 2023-04-15 09:33:46 +02:00
parent 8de44573b0
commit 812b9d76d6
3 changed files with 15 additions and 0 deletions

View file

@ -202,6 +202,11 @@ void UpdateStatusBar(SummaryInfo* info)
if (hud_size == Hud_Althud)
{
DrawAltHUD(info);
IFVIRTUALPTRNAME(StatusBar, NAME_RazeStatusBar, AltHUDOverlay)
{
VMValue params[] = { StatusBar, info };
VMCall(func, params, 2, nullptr, 0);
}
return;
}
IFVIRTUALPTRNAME(StatusBar, NAME_RazeStatusBar, UpdateStatusBar)

View file

@ -770,6 +770,14 @@ class BloodStatusBar : RazeStatusBar
drawMultiHUD(pPlayer, nGameType);
}
override void AltHUDOverlay(SummaryInfo summary)
{
BeginStatusBar(false, 320, 200, 28);
let pPlayer = Blood.GetViewPlayer();
if (pPlayer.throwPower)
TileHGauge("ThrowGauge", 124, 175, pPlayer.throwPower, 1);
}
//---------------------------------------------------------------------------
//
//

View file

@ -31,6 +31,8 @@ class RazeStatusBar : StatusBarCore
virtual void Tick() {}
virtual void Reset() {}
virtual void UpdateStatusBar(SummaryInfo info) {}
virtual void AltHUDOverlay(SummaryInfo summary) {}
void drawStatText(Font statFont, double x, double y, String text, double scale)
{