hedgewars/uGearsRender.pas
changeset 14754 533ac9774279
parent 14741 8563cc40fc1e
child 14755 ab7bf5036314
--- a/hedgewars/uGearsRender.pas	Wed Apr 03 13:00:05 2019 +0200
+++ b/hedgewars/uGearsRender.pas	Sun Apr 07 18:21:14 2019 +0200
@@ -37,6 +37,7 @@
          end;
 procedure RenderGear(Gear: PGear; x, y: LongInt);
 procedure RenderGearTimer(Gear: PGear; x, y: LongInt);
+procedure RenderGearHealth(Gear: PGear; x, y: LongInt);
 procedure RenderHHGuiExtras(Gear: PGear; ox, oy: LongInt);
 procedure DrawHHOrder();
 
@@ -1648,4 +1649,15 @@
     DrawTextureCentered(x + 8, y + 8, Gear^.Tex);
 end;
 
+procedure RenderGearHealth(Gear: PGear; x, y: LongInt);
+begin
+if isShowGearInfo and (Gear^.RenderHealth) and (Gear^.Tex <> nil) then
+    begin
+    if (Gear^.Kind = gtCase) and ((Gear^.Pos and $02) <> 0) then
+        DrawTextureCentered(x, y - 38, Gear^.Tex);
+    if (Gear^.Kind = gtExplosives) then
+        DrawTextureCentered(x, y - 38, Gear^.Tex);
+    end;
+end;
+
 end.