/branches/preview/Aloft/AloftBossIcon
self:RegisterMessage("Aloft:SetupFrame", "SetupFrame") |
self:RegisterMessage("Aloft:OnNameplateShow", "OnNameplateShow") |
self:RegisterMessage("Aloft:OnIsTargetDataChanged", "OnIsTargetDataChanged") |
self:RegisterMessage("Aloft:OnConfigModeChanged", "OnConfigModeChanged") |
self:UpdateAll() |
end |
self:PlaceFrame(bossIconRegion, layoutFrame, self.db.profile, 0, 0) |
bossIconRegion:SetDrawLayer("OVERLAY") |
bossIconRegion:SetBlendMode("BLEND") |
if Aloft:IsConfigModeEnabled() and (aloftData.isTarget or aloftData:IsTarget()) and not bossIconRegion:IsVisible() then |
bossIconRegion:Show() |
aloftData.configMode = true |
elseif aloftData.configMode then |
bossIconRegion:Hide() |
end |
end |
end |
self:ScheduleTimer(function(aloftData) AloftBossIcon:SetupFrame("AloftBossIcon:OnIsTargetDataChanged", aloftData) end, 0.0, aloftData) -- next frame |
end |
function AloftBossIcon:OnConfigModeChanged(message) |
local aloftData = Aloft:GetTargetNameplate() |
if aloftData then |
self:SetupFrame("AloftBossIcon:OnIsTargetDataChanged", aloftData) |
end |
end |
----------------------------------------------------------------------------- |