# HG changeset patch # User nemo # Date 1341769781 14400 # Node ID 20448801e86a0e54ce72d11cfaa4ba17fbb0b4bf # Parent e5a0856708dc2e30d0eda40e62e81daf6c5bb766 A bit more convoluted, but more attractive visually diff -r e5a0856708dc -r 20448801e86a hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Sun Jul 08 12:00:27 2012 -0400 +++ b/hedgewars/uWorld.pas Sun Jul 08 13:49:41 2012 -0400 @@ -1365,6 +1365,19 @@ r.w:= TeamHealthBarWidth + 1; r.h:= HealthTex^.h - 4; DrawTextureFromRect(16, cScreenHeight + DrawHealthY + smallScreenOffset + 2, @r, HealthTex); + if not hasGone and (TeamHealth > 1) then + begin + Tint(Clan^.Color shl 8 or $FF); + for i:= 0 to cMaxHHIndex do + if Hedgehogs[i].Gear <> nil then + begin + inc(h,Hedgehogs[i].Gear^.Health); + if h < TeamHealth then DrawTexture(15 + h*TeamHealthBarWidth div TeamHealth, cScreenHeight + DrawHealthY + smallScreenOffset + 1, SpritesData[sprSlider].Texture); + end; + if TeamsCount * 20 > Longword(cScreenHeight) div 5 then + Tint($FF,$FF,$FF,$80) + else Tint($FF, $FF, $FF, $FF); + end; end; end; if smallScreenOffset <> 0 then