From 0dcf4d65002411769a7271164c8666941e4663ef Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Sat, 24 Mar 2012 12:58:44 +0000
Subject: [PATCH] Negative health is correctly hidden in the new UI

git-svn-id: http://svn.net-core.org/repos/t-engine4@4991 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/class/uiset/Minimalist.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/game/modules/tome/class/uiset/Minimalist.lua b/game/modules/tome/class/uiset/Minimalist.lua
index c3e52c43be..61291f7fcd 100644
--- a/game/modules/tome/class/uiset/Minimalist.lua
+++ b/game/modules/tome/class/uiset/Minimalist.lua
@@ -575,7 +575,7 @@ function _M:displayResources(scale, bx, by, a)
 		if not self.res.life or self.res.life.vc ~= player.life or self.res.life.vm ~= player.max_life or self.res.life.vr ~= life_regen then
 			self.res.life = {
 				vc = player.life, vm = player.max_life, vr = life_regen,
-				cur = {core.display.drawStringBlendedNewSurface(font_sha, ("%d/%d"):format(player.life, player.max_life), 255, 255, 255):glTexture()},
+				cur = {core.display.drawStringBlendedNewSurface(font_sha, (player.life < 0) and "???" or ("%d/%d"):format(player.life, player.max_life), 255, 255, 255):glTexture()},
 				regen={core.display.drawStringBlendedNewSurface(sfont_sha, ("%+0.2f"):format(life_regen), 255, 255, 255):glTexture()},
 			}
 		end
-- 
GitLab