/trunk/oUF_Ruben
local flat = [=[Interface\ChatFrame\ChatFrameBackground]=] |
local statbaralpha = 0.6 |
local smooth = mediaPath .. 'oRA3' |
local gradient = mediaPath .. 'Ish14' |
local smooth = mediaPath .. 'pHishTex34' |
local gradient = mediaPath .. 'pHishTex10' |
--[[ |
In patch 3.3.3 Blizzard added a way to tile statusbar textures horizontally |
pixels wide or longer. |
]] |
local fixbartext = false |
local fixbartex = false |
ns.fonts = {} |
ns.fonts.silk = mediaPath.."slkscr.ttf" |
return oUF.Tags['[dead]'](u) or CoolNumber(oUF.Tags['[curhp]'](u)) |
end |
oUF.TagEvents['[ruben_hp]'] = 'UNIT_HEALTH' |
do |
local UnitHealthMax = UnitHealthMax |
local UnitHealth = UnitHealth |
oUF.Tags["[ruben_perhp]"] = function(u) |
local m = UnitHealthMax(u) |
local p = UnitHealth(u)/m*100+0.5 |
return not oUF.Tags['[dead]'](u) and p < 100 and round(p, 1)..'%' |
end |
oUF.TagEvents['[ruben_perhp]'] = oUF.TagEvents['[perhp]'] |
end |
oUF.Tags['[ruben_pp]'] = function(u) |
local pp =oUF.Tags['[curpp]'](u) |
hp.value = value |
local percent = hp:CreateFontString() |
percent:SetFontObject(font) |
value.frequentUpdates = 1/12 |
self:Tag(percent, '[ruben_perhp]') |
percent:SetPoint'RIGHT' |
hp.percent = percent |
end |
self.Health = hp |