Nameplate Overhaul (#38)

* ElvUI/NamePlates: initial nameplate conversions

* More nameplate work

* Modules/Cooldowns: various CD fixes, nameplates cant show 'swipe' texture

* ElvUI/NamePlates: final nameplate polish

* Modules/Misc: add space before interrupted announcement
This commit is contained in:
Andrew
2023-05-22 19:18:59 -07:00
committed by GitHub
parent 5d51f92ed3
commit 8edf2d7f8a
75 changed files with 8870 additions and 8088 deletions
@@ -0,0 +1,41 @@
local E, L, V, P, G = unpack(ElvUI)
local NP = E:GetModule('NamePlates')
local GetRaidTargetIndex = GetRaidTargetIndex
local SetRaidTargetIconTexture = SetRaidTargetIconTexture
function NP:RaidTargetIndicator_Override()
local element = self.RaidTargetIndicator
local index = self.unit and GetRaidTargetIndex(self.unit)
if index then
SetRaidTargetIconTexture(element, index)
element:Show()
else
element:Hide()
end
end
function NP:Construct_RaidTargetIndicator(nameplate)
local RaidTargetIndicator = nameplate:CreateTexture(nil, 'OVERLAY', nil, 7)
RaidTargetIndicator.Override = NP.RaidTargetIndicator_Override
RaidTargetIndicator:Hide()
return RaidTargetIndicator
end
function NP:Update_RaidTargetIndicator(nameplate)
local db = NP:PlateDB(nameplate)
if db.raidTargetIndicator and db.raidTargetIndicator.enable then
if not nameplate:IsElementEnabled('RaidTargetIndicator') then
nameplate:EnableElement('RaidTargetIndicator')
end
nameplate.RaidTargetIndicator:ClearAllPoints()
nameplate.RaidTargetIndicator:Point(E.InversePoints[db.raidTargetIndicator.position], nameplate, db.raidTargetIndicator.position, db.raidTargetIndicator.xOffset, db.raidTargetIndicator.yOffset)
nameplate.RaidTargetIndicator:Size(db.raidTargetIndicator.size)
elseif nameplate:IsElementEnabled('RaidTargetIndicator') then
nameplate:DisableElement('RaidTargetIndicator')
end
end