Hi -
I'm modifying Freeb's awesome oUF layout to my liking and would like to hide the *player only* hp text information on max hp (and have it appear when hp is lost). This is the chunk I was going for in Freeb's ftags.lua:
Code:
oUF.Tags['freeb:hp'] = function(u)
local min, max = UnitHealth(u), UnitHealthMax(u)
if(unit == "player") then
if(min < max) then
return siValue(min).."."..math.floor(min/max*100+.5).."%"
else
return bar.value:SetText(" ")
end
else
return siValue(min).."."..math.floor(min/max*100+.5).."%"
end
end
No errors, but it doesn't hide the hp info on max health. Any ideas? Thanks.