/branches/preview/Aloft/AloftHealthBar
insets = { left = 0, right = 0, top = 0, bottom = 0 }, |
} |
-- local backdropTable = |
-- { |
-- edgeSize = 16, |
-- insets = { left = 4, right = 4, top = 4, bottom = 4 }, |
-- |
-- edgeFile = [[Interface\Addons\Aloft\Textures\krsnik]], |
-- bgFile = [[Interface\Addons\SharedMedia\statusbar\Minimalist]], |
-- } |
-- |
-- frame:SetBackdrop(backdropTable) |
-- frame:SetBackdropBorderColor(R, G, B, A) |
----------------------------------------------------------------------------- |
local CreateFrame = CreateFrame |
backdropTable.edgeSize = self.db.profile.borderEdgeSize |
backdropTable.bgFile = texture |
-- ChatFrame7:AddMessage("AloftHealthBar:SetupFrame(): " .. tostring(inset) .. "/" .. tostring(texture) .. "/" .. tostring(edgeFile)) |
-- ChatFrame7:AddMessage("AloftHealthBar:SetupFrame(): " .. tostring(inset) .. "/" .. tostring(backdropTable.bgFile) .. "/" .. tostring(backdropTable.edgeFile).. "/" .. tostring(backdropTable.tile).. "/" .. tostring(backdropTable.tileSize)) |
-- NOTE: this dead code is relevant to various #132 crash experiments |
-- healthFrame:SetBackdrop( { insets = { left = inset, right = inset, top = inset, bottom = inset, }, edgeFile = edgeFile, edgeSize = 16, bgFile = texture, } ) |
self:SetHealthBarColor(aloftData, self.db.profile.colors.hostilePlayer) |
-- ChatFrame7:AddMessage("AloftHealthBar:ColourHostile(): " .. class hostile " .. tostring(aloftData.name) .. "/" .. tostring(aloftData.class)) |
end |
elseif Aloft:IsTotem(aloftData) and Aloft.GetTotemExceptionColor then |
local color = Aloft:GetTotemExceptionColor(aloftData) or self.db.profile.colors.hostileNPC |
elseif Aloft:IsTotem(aloftData) then |
local color = (Aloft.GetTotemExceptionColor and Aloft:GetTotemExceptionColor(aloftData)) or self.db.profile.colors.hostileNPC |
-- ChatFrame7:AddMessage("AloftHealthBar:ColourHostile(): " .. tostring(aloftData.name) .. "/" ..("|cff%02x%02x%02xcolor|r"):format(floor(255*color[1]), floor(255*color[2]), floor(255*color[3]))) |
self:SetHealthBarColor(aloftData, color) |
elseif aloftData.isPet or aloftData.petOwnersName then |
self:SetHealthBarColor(aloftData, self.db.profile.colors.hostilePlayer) |
-- ChatFrame7:AddMessage("AloftHealthBar:ColourNeutral(): " .. class hostile " .. tostring(aloftData.name) .. "/" .. tostring(aloftData.class)) |
end |
elseif Aloft:IsTotem(aloftData) and Aloft.GetTotemExceptionColor then |
local color = Aloft:GetTotemExceptionColor(aloftData) or self.db.profile.colors.neutral |
elseif Aloft:IsTotem(aloftData) then |
local color = (Aloft.GetTotemExceptionColor and Aloft:GetTotemExceptionColor(aloftData)) or self.db.profile.colors.neutral |
-- ChatFrame7:AddMessage("AloftHealthBar:ColourHostile(): " .. tostring(aloftData.name) .. "/" ..("|cff%02x%02x%02xcolor|r"):format(floor(255*color[1]), floor(255*color[2]), floor(255*color[3]))) |
self:SetHealthBarColor(aloftData, color) |
else |