WoWInterface SVN Aloft

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches/preview/Aloft/AloftRecentlyDamaged
    from Rev 1822 to Rev 1914
    Reverse comparison

Rev 1822 → Rev 1914

AloftRecentlyDamagedIcon.lua
74,6 → 74,8
self:RegisterMessage("Aloft:OnNameplateShow", "OnNameplateShow")
self:RegisterMessage("Aloft:OnNameplateHide", "OnNameplateHide")
self:RegisterMessage("Aloft:OnRecentlyDamagedChanged", "OnRecentlyDamagedChanged")
self:RegisterMessage("Aloft:OnIsTargetDataChanged", "OnIsTargetDataChanged")
self:RegisterMessage("Aloft:OnConfigModeChanged", "OnConfigModeChanged")
end
end
 
115,19 → 117,30
recentlyDamagedIconRegion:SetTexture("Interface\\CharacterFrame\\UI-StateIcon")
recentlyDamagedIconRegion:SetTexCoord(0.5, 1, 0, 0.5)
 
-- this is done in aloftData:CreateTexture()
-- recentlyDamagedIconRegion:SetDrawLayer("OVERLAY")
-- recentlyDamagedIconRegion:SetBlendMode("BLEND")
 
layoutFrame.recentlyDamagedIconRegion = recentlyDamagedIconRegion
end
 
-- ChatFrame7:AddMessage("AloftRecentlyDamagedIcon:SetupFrame(): " .. tostring(layoutFrame.aloftData and layoutFrame.aloftData.name) .. "/" .. tostring(self.db.profile.point) .. "/" .. tostring(self.db.profile.relativeToPoint) .. "/" .. tostring(self.db.profile.offsetX) .. "/" .. tostring(self.db.profile.offsetY) .. "/" .. tostring(self.db.profile.size))
self:PlaceFrame(recentlyDamagedIconRegion, layoutFrame, self.db.profile)
 
if Aloft:IsConfigModeEnabled() and (aloftData.isTarget or aloftData:IsTarget()) then
recentlyDamagedIconRegion:Show()
aloftData.configMode = true
elseif aloftData.configMode then
recentlyDamagedIconRegion:Hide()
end
 
return recentlyDamagedIconRegion
end
 
function AloftRecentlyDamagedIcon:Update(aloftData)
local recentlyDamagedIconRegion = self:SetupFrame("AloftRecentlyDamagedIcon:Update", aloftData)
 
if recentlyDamagedIconRegion and aloftData.recentlyDamaged then
if recentlyDamagedIconRegion and (aloftData.recentlyDamaged or (Aloft:IsConfigModeEnabled() and (aloftData.isTarget or aloftData:IsTarget()))) then
recentlyDamagedIconRegion:Show()
else
self:OnNameplateHide("AloftRecentlyDamagedIcon:Update", aloftData)
153,6 → 166,18
end
end
 
function AloftRecentlyDamagedIcon:OnIsTargetDataChanged(message, aloftData)
-- ChatFrame7:AddMessage("AloftRecentlyDamagedIcon:OnIsTargetDataChanged(): enter " .. tostring(aloftData.name) .. "/" .. tostring(aloftData.isTarget))
self:ScheduleTimer(function(aloftData) AloftRecentlyDamagedIcon:SetupFrame("AloftRecentlyDamagedIcon:OnIsTargetDataChanged", aloftData) end, 0.0, aloftData) -- next frame
end
 
function AloftRecentlyDamagedIcon:OnConfigModeChanged(message)
local aloftData = Aloft:GetTargetNameplate()
if aloftData then
self:SetupFrame("AloftRecentlyDamagedIcon:OnConfigModeChanged", aloftData)
end
end
 
-----------------------------------------------------------------------------
 
end)