Skip to content

Commit 1a81aa9

Browse files
committed
feat(icons): upgrade remaining status icons to modern atlases (PR DanderBot#31 set)
Add a legacy-path -> atlas map + DF:SetUpgradedStatusIcon(region, legacyPath): prefers the modern atlas (sharper, matches Blizzard's raid frames) and falls back to the legacy texture when absent, owning texcoord state so callers drop their trailing SetTexCoord. Routed every render site (live + test mode) through it: ready check -> UI-LFG-ReadyMark/DeclineMark/PendingMark-Raid; summon -> RaidFrame-Icon-Summon*; resurrection -> RaidFrame-Icon-Rez; phased -> RaidFrame-Icon-Phasing, LFR eye -> RaidFrame-Icon-LFR; AFK -> characterupdate_clock-icon; vehicle -> RaidFrame-Icon-Vehicle; MT/MA -> RaidFrame-Icon-MainTank/MainAssist. Leader/assistant/master-looter and raid target markers are intentionally left as-is.
1 parent 2fed1b5 commit 1a81aa9

4 files changed

Lines changed: 64 additions & 34 deletions

File tree

Frames/Bars.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2443,10 +2443,10 @@ function DF:UpdateReadyCheckIcon(frame)
24432443
local readyCheckStatus = GetReadyCheckStatus(frame.unit)
24442444

24452445
if readyCheckStatus == "ready" then
2446-
frame.readyCheckIcon.texture:SetTexture("Interface\\RaidFrame\\ReadyCheck-Ready")
2446+
DF:SetUpgradedStatusIcon(frame.readyCheckIcon.texture, "Interface\\RaidFrame\\ReadyCheck-Ready")
24472447
frame.readyCheckIcon:Show()
24482448
elseif readyCheckStatus == "notready" then
2449-
frame.readyCheckIcon.texture:SetTexture("Interface\\RaidFrame\\ReadyCheck-NotReady")
2449+
DF:SetUpgradedStatusIcon(frame.readyCheckIcon.texture, "Interface\\RaidFrame\\ReadyCheck-NotReady")
24502450
frame.readyCheckIcon:Show()
24512451
elseif readyCheckStatus == "waiting" then
24522452
-- Check if player is AFK while waiting (enhanced ready check)
@@ -2460,9 +2460,9 @@ function DF:UpdateReadyCheckIcon(frame)
24602460

24612461
if afkAccessible and isAFK then
24622462
-- AFK state - show not ready icon (they likely won't respond)
2463-
frame.readyCheckIcon.texture:SetTexture("Interface\\RaidFrame\\ReadyCheck-NotReady")
2463+
DF:SetUpgradedStatusIcon(frame.readyCheckIcon.texture, "Interface\\RaidFrame\\ReadyCheck-NotReady")
24642464
else
2465-
frame.readyCheckIcon.texture:SetTexture("Interface\\RaidFrame\\ReadyCheck-Waiting")
2465+
DF:SetUpgradedStatusIcon(frame.readyCheckIcon.texture, "Interface\\RaidFrame\\ReadyCheck-Waiting")
24662466
end
24672467
frame.readyCheckIcon:Show()
24682468
else

Frames/Core.lua

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,3 +715,38 @@ function DF:SetIconTextureOrAtlas(region, value, l, r, t, b)
715715
end
716716
end
717717
end
718+
719+
-- Legacy raid-frame status icon textures → their modern atlas equivalents.
720+
-- The atlas versions (used by Blizzard's own raid frames) are sharper; we keep
721+
-- the legacy path as the lookup key AND the fallback so nothing breaks if an
722+
-- atlas is ever absent.
723+
local LEGACY_STATUS_ICON_ATLAS = {
724+
["Interface\\RaidFrame\\ReadyCheck-Ready"] = "UI-LFG-ReadyMark-Raid",
725+
["Interface\\RaidFrame\\ReadyCheck-NotReady"] = "UI-LFG-DeclineMark-Raid",
726+
["Interface\\RaidFrame\\ReadyCheck-Waiting"] = "UI-LFG-PendingMark-Raid",
727+
["Interface\\RaidFrame\\Raid-Icon-SummonPending"] = "RaidFrame-Icon-SummonPending",
728+
["Interface\\RaidFrame\\Raid-Icon-SummonAccepted"] = "RaidFrame-Icon-SummonAccepted",
729+
["Interface\\RaidFrame\\Raid-Icon-SummonDeclined"] = "RaidFrame-Icon-SummonDeclined",
730+
["Interface\\RaidFrame\\Raid-Icon-Rez"] = "RaidFrame-Icon-Rez",
731+
["Interface\\TargetingFrame\\UI-PhasingIcon"] = "RaidFrame-Icon-Phasing",
732+
["Interface\\LFGFrame\\LFG-Eye"] = "RaidFrame-Icon-LFR",
733+
["Interface\\FriendsFrame\\StatusIcon-Away"] = "characterupdate_clock-icon",
734+
["Interface\\Vehicles\\UI-Vehicles-Raid-Icon"] = "RaidFrame-Icon-Vehicle",
735+
["Interface\\GroupFrame\\UI-Group-MainTankIcon"] = "RaidFrame-Icon-MainTank",
736+
["Interface\\GroupFrame\\UI-Group-MainAssistIcon"] = "RaidFrame-Icon-MainAssist",
737+
}
738+
739+
-- Render a known legacy status-icon texture as its modern atlas (sharper),
740+
-- falling back to the legacy file when the atlas isn't available. Owns the
741+
-- texcoord state, so call sites must NOT add a trailing SetTexCoord — passing
742+
-- the legacy path as the single source of truth is enough.
743+
function DF:SetUpgradedStatusIcon(region, legacyTexture)
744+
if not region or not legacyTexture then return end
745+
local atlas = LEGACY_STATUS_ICON_ATLAS[legacyTexture]
746+
if atlas and C_Texture and C_Texture.GetAtlasInfo and C_Texture.GetAtlasInfo(atlas) then
747+
region:SetAtlas(atlas)
748+
else
749+
region:SetTexture(legacyTexture)
750+
region:SetTexCoord(0, 1, 0, 1)
751+
end
752+
end

Frames/StatusIcons.lua

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ function DF:CreateStatusIcons(frame)
8383
-- ========================================
8484
frame.summonIcon = CreateStatusIcon(overlay, 16)
8585
frame.summonIcon:SetPoint("CENTER", frame, "CENTER", 0, 0)
86-
frame.summonIcon.texture:SetTexture("Interface\\RaidFrame\\Raid-Icon-SummonPending")
86+
DF:SetUpgradedStatusIcon(frame.summonIcon.texture, "Interface\\RaidFrame\\Raid-Icon-SummonPending")
8787
frame.summonIcon.text:SetTextColor(0.6, 0.2, 1, 1) -- Purple for summon
8888

8989
-- ========================================
9090
-- RESURRECTION ICON (incoming res status)
9191
-- ========================================
9292
frame.resurrectionIcon = CreateStatusIcon(overlay, 16)
9393
frame.resurrectionIcon:SetPoint("CENTER", frame, "CENTER", 0, 10)
94-
frame.resurrectionIcon.texture:SetTexture("Interface\\RaidFrame\\Raid-Icon-Rez")
94+
DF:SetUpgradedStatusIcon(frame.resurrectionIcon.texture, "Interface\\RaidFrame\\Raid-Icon-Rez")
9595
frame.resurrectionIcon.text:SetTextColor(0.2, 1, 0.2, 1) -- Green for res
9696
frame.resurrectionIcon.unitFrame = frame
9797
frame.resurrectionIcon:EnableMouse(true)
@@ -131,16 +131,15 @@ function DF:CreateStatusIcons(frame)
131131
-- ========================================
132132
frame.phasedIcon = CreateStatusIcon(overlay, 16)
133133
frame.phasedIcon:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -2, -2)
134-
frame.phasedIcon.texture:SetTexture("Interface\\TargetingFrame\\UI-PhasingIcon")
135-
frame.phasedIcon.texture:SetTexCoord(0.15625, 0.84375, 0.15625, 0.84375)
134+
DF:SetUpgradedStatusIcon(frame.phasedIcon.texture, "Interface\\TargetingFrame\\UI-PhasingIcon")
136135
frame.phasedIcon.text:SetTextColor(0.5, 0.5, 1, 1) -- Blue-ish for phased
137136

138137
-- ========================================
139138
-- AFK ICON (unit is away from keyboard)
140139
-- ========================================
141140
frame.afkIcon = CreateStatusIcon(overlay, 32)
142141
frame.afkIcon:SetPoint("CENTER", frame, "CENTER", 0, 0)
143-
frame.afkIcon.texture:SetTexture("Interface\\FriendsFrame\\StatusIcon-Away")
142+
DF:SetUpgradedStatusIcon(frame.afkIcon.texture, "Interface\\FriendsFrame\\StatusIcon-Away")
144143
DF:SafeSetFont(frame.afkIcon.text, nil, 12, "OUTLINE")
145144
frame.afkIcon.text:SetTextColor(1, 0.5, 0, 1) -- Orange for AFK
146145
-- Timer text (separate from main text, shown below/after)
@@ -155,7 +154,7 @@ function DF:CreateStatusIcons(frame)
155154
-- ========================================
156155
frame.vehicleIcon = CreateStatusIcon(overlay, 16)
157156
frame.vehicleIcon:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 2)
158-
frame.vehicleIcon.texture:SetTexture("Interface\\Vehicles\\UI-Vehicles-Raid-Icon")
157+
DF:SetUpgradedStatusIcon(frame.vehicleIcon.texture, "Interface\\Vehicles\\UI-Vehicles-Raid-Icon")
159158
frame.vehicleIcon.text:SetTextColor(0.4, 0.8, 1, 1) -- Light blue for vehicle
160159

161160
-- ========================================
@@ -339,8 +338,7 @@ function DF:UpdateSummonIcon(frame)
339338
end
340339

341340
if showIcon then
342-
frame.summonIcon.texture:SetTexture(texture)
343-
frame.summonIcon.texture:SetTexCoord(0, 1, 0, 1)
341+
DF:SetUpgradedStatusIcon(frame.summonIcon.texture, texture)
344342
ApplyIconSettings(frame.summonIcon, db, "summonIcon")
345343

346344
-- Show as text or icon based on setting
@@ -411,7 +409,7 @@ function DF:UpdateResurrectionIcon(frame)
411409
resCache[unit] = 1
412410
resTimer = resTimer or C_Timer.NewTicker(0.25, ResTimerCleanup)
413411
end
414-
frame.resurrectionIcon.texture:SetTexture("Interface\\RaidFrame\\Raid-Icon-Rez")
412+
DF:SetUpgradedStatusIcon(frame.resurrectionIcon.texture, "Interface\\RaidFrame\\Raid-Icon-Rez")
415413
frame.resurrectionIcon.texture:SetVertexColor(0, 1, 0, 1)
416414
ApplyIconSettings(frame.resurrectionIcon, db, "resurrectionIcon")
417415
frame.resurrectionIcon:Show()
@@ -420,15 +418,15 @@ function DF:UpdateResurrectionIcon(frame)
420418
-- Was casting, now stopped → pending accept (yellow)
421419
-- Store timestamp so we can expire after 60s
422420
resCache[unit] = GetTime()
423-
frame.resurrectionIcon.texture:SetTexture("Interface\\RaidFrame\\Raid-Icon-Rez")
421+
DF:SetUpgradedStatusIcon(frame.resurrectionIcon.texture, "Interface\\RaidFrame\\Raid-Icon-Rez")
424422
frame.resurrectionIcon.texture:SetVertexColor(1, 1, 0, 0.75)
425423
ApplyIconSettings(frame.resurrectionIcon, db, "resurrectionIcon")
426424
frame.resurrectionIcon:Show()
427425
return
428426
elseif resCache[unit] and resCache[unit] ~= 1 then
429427
-- Still showing pending accept (check not expired)
430428
if (GetTime() - resCache[unit]) <= RES_ACCEPT_TIMEOUT then
431-
frame.resurrectionIcon.texture:SetTexture("Interface\\RaidFrame\\Raid-Icon-Rez")
429+
DF:SetUpgradedStatusIcon(frame.resurrectionIcon.texture, "Interface\\RaidFrame\\Raid-Icon-Rez")
432430
frame.resurrectionIcon.texture:SetVertexColor(1, 1, 0, 0.75)
433431
ApplyIconSettings(frame.resurrectionIcon, db, "resurrectionIcon")
434432
frame.resurrectionIcon:Show()
@@ -661,11 +659,9 @@ function DF:UpdatePhasedIcon(frame)
661659
-- cached == -1 means LFG (other party), anything else means phased
662660
local isLFG = (cached == -1)
663661
if isLFG and db.phasedIconShowLFGEye then
664-
frame.phasedIcon.texture:SetTexture("Interface\\LFGFrame\\LFG-Eye")
665-
frame.phasedIcon.texture:SetTexCoord(0.14, 0.235, 0.28, 0.47)
662+
DF:SetUpgradedStatusIcon(frame.phasedIcon.texture, "Interface\\LFGFrame\\LFG-Eye")
666663
else
667-
frame.phasedIcon.texture:SetTexture("Interface\\TargetingFrame\\UI-PhasingIcon")
668-
frame.phasedIcon.texture:SetTexCoord(0.15625, 0.84375, 0.15625, 0.84375)
664+
DF:SetUpgradedStatusIcon(frame.phasedIcon.texture, "Interface\\TargetingFrame\\UI-PhasingIcon")
669665
end
670666
ApplyIconSettings(frame.phasedIcon, db, "phasedIcon")
671667
ShowIconAsText(frame.phasedIcon, db.phasedIconText or "Phased", db.phasedIconShowText)
@@ -932,13 +928,12 @@ function DF:UpdateRaidRoleIcon(frame)
932928
if showIcon and role then
933929
local statusText = nil
934930
if role == "MAINTANK" then
935-
frame.raidRoleIcon.texture:SetTexture("Interface\\GroupFrame\\UI-Group-MainTankIcon")
931+
DF:SetUpgradedStatusIcon(frame.raidRoleIcon.texture, "Interface\\GroupFrame\\UI-Group-MainTankIcon")
936932
statusText = db.raidRoleIconTextTank or "MT"
937933
else
938-
frame.raidRoleIcon.texture:SetTexture("Interface\\GroupFrame\\UI-Group-MainAssistIcon")
934+
DF:SetUpgradedStatusIcon(frame.raidRoleIcon.texture, "Interface\\GroupFrame\\UI-Group-MainAssistIcon")
939935
statusText = db.raidRoleIconTextAssist or "MA"
940936
end
941-
frame.raidRoleIcon.texture:SetTexCoord(0, 1, 0, 1)
942937
ApplyIconSettings(frame.raidRoleIcon, db, "raidRoleIcon")
943938
ShowIconAsText(frame.raidRoleIcon, statusText, db.raidRoleIconShowText)
944939
frame.raidRoleIcon:Show()
@@ -1115,7 +1110,7 @@ function DF:UpdateReadyCheckIconEnhanced(frame)
11151110
return
11161111
end
11171112

1118-
frame.readyCheckIcon.texture:SetTexture(texture)
1113+
DF:SetUpgradedStatusIcon(frame.readyCheckIcon.texture, texture)
11191114

11201115
-- Apply positioning
11211116
local scale = db.readyCheckIconScale or 1.0

TestMode/TestMode.lua

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ function DF:UpdateTestIcons(frame, testData)
13081308
if not db.readyCheckIconEnabled or db.testShowStatusIcons == false then
13091309
frame.readyCheckIcon:Hide()
13101310
elseif testData.isLeader then
1311-
frame.readyCheckIcon.texture:SetTexture("Interface\\RaidFrame\\ReadyCheck-Ready")
1311+
DF:SetUpgradedStatusIcon(frame.readyCheckIcon.texture, "Interface\\RaidFrame\\ReadyCheck-Ready")
13121312

13131313
local scale = db.readyCheckIconScale or 1.0
13141314
local anchor = db.readyCheckIconAnchor or "CENTER"
@@ -1342,7 +1342,7 @@ function DF:UpdateTestIcons(frame, testData)
13421342
end
13431343

13441344
if texture then
1345-
frame.centerStatusIcon.texture:SetTexture(texture)
1345+
DF:SetUpgradedStatusIcon(frame.centerStatusIcon.texture, texture)
13461346

13471347
local scale = db.centerStatusIconScale or 1.0
13481348
local anchor = db.centerStatusIconAnchor or "CENTER"
@@ -1517,7 +1517,7 @@ function DF:UpdateTestStatusIcons(frame, testData)
15171517
if not db.readyCheckIconEnabled or db.testShowStatusIcons == false then
15181518
frame.readyCheckIcon:Hide()
15191519
elseif testData.isLeader then
1520-
frame.readyCheckIcon.texture:SetTexture("Interface\\RaidFrame\\ReadyCheck-Ready")
1520+
DF:SetUpgradedStatusIcon(frame.readyCheckIcon.texture, "Interface\\RaidFrame\\ReadyCheck-Ready")
15211521

15221522
local scale = db.readyCheckIconScale or 1.0
15231523
local anchor = db.readyCheckIconAnchor or "CENTER"
@@ -1544,7 +1544,7 @@ function DF:UpdateTestStatusIcons(frame, testData)
15441544
if not db.summonIconEnabled or db.testShowStatusIcons == false then
15451545
frame.summonIcon:Hide()
15461546
elseif testData.centerStatus == "summon" then
1547-
frame.summonIcon.texture:SetTexture("Interface\\RaidFrame\\Raid-Icon-SummonPending")
1547+
DF:SetUpgradedStatusIcon(frame.summonIcon.texture, "Interface\\RaidFrame\\Raid-Icon-SummonPending")
15481548

15491549
local scale = db.summonIconScale or 1.0
15501550
local anchor = db.summonIconAnchor or "CENTER"
@@ -1573,7 +1573,7 @@ function DF:UpdateTestStatusIcons(frame, testData)
15731573
if not db.resurrectionIconEnabled or db.testShowStatusIcons == false then
15741574
frame.resurrectionIcon:Hide()
15751575
elseif testData.centerStatus == "resurrect" then
1576-
frame.resurrectionIcon.texture:SetTexture("Interface\\RaidFrame\\Raid-Icon-Rez")
1576+
DF:SetUpgradedStatusIcon(frame.resurrectionIcon.texture, "Interface\\RaidFrame\\Raid-Icon-Rez")
15771577
frame.resurrectionIcon.texture:SetVertexColor(0, 1, 0) -- Green = being cast
15781578

15791579
local scale = db.resurrectionIconScale or 1.0
@@ -1603,7 +1603,7 @@ function DF:UpdateTestStatusIcons(frame, testData)
16031603
if not db.phasedIconEnabled or db.testShowStatusIcons == false then
16041604
frame.phasedIcon:Hide()
16051605
elseif testData.isPhased then
1606-
frame.phasedIcon.texture:SetTexture("Interface\\TargetingFrame\\UI-PhasingIcon")
1606+
DF:SetUpgradedStatusIcon(frame.phasedIcon.texture, "Interface\\TargetingFrame\\UI-PhasingIcon")
16071607

16081608
local scale = db.phasedIconScale or 1.0
16091609
local anchor = db.phasedIconAnchor or "TOPRIGHT"
@@ -1633,7 +1633,7 @@ function DF:UpdateTestStatusIcons(frame, testData)
16331633
frame.afkIcon:Hide()
16341634
if frame.afkIcon.timerText then frame.afkIcon.timerText:Hide() end
16351635
elseif testData.isAFK then
1636-
frame.afkIcon.texture:SetTexture("Interface\\FriendsFrame\\StatusIcon-Away")
1636+
DF:SetUpgradedStatusIcon(frame.afkIcon.texture, "Interface\\FriendsFrame\\StatusIcon-Away")
16371637

16381638
local scale = db.afkIconScale or 1.0
16391639
local anchor = db.afkIconAnchor or "CENTER"
@@ -1696,7 +1696,7 @@ function DF:UpdateTestStatusIcons(frame, testData)
16961696
if not db.vehicleIconEnabled or db.testShowStatusIcons == false then
16971697
frame.vehicleIcon:Hide()
16981698
elseif testData.inVehicle then
1699-
frame.vehicleIcon.texture:SetTexture("Interface\\Vehicles\\UI-Vehicles-Raid-Icon")
1699+
DF:SetUpgradedStatusIcon(frame.vehicleIcon.texture, "Interface\\Vehicles\\UI-Vehicles-Raid-Icon")
17001700

17011701
local scale = db.vehicleIconScale or 1.0
17021702
local anchor = db.vehicleIconAnchor or "BOTTOMRIGHT"
@@ -1725,7 +1725,7 @@ function DF:UpdateTestStatusIcons(frame, testData)
17251725
if not db.raidRoleIconEnabled or db.testShowStatusIcons == false then
17261726
frame.raidRoleIcon:Hide()
17271727
elseif testData.isMainTank and db.raidRoleIconShowTank ~= false then
1728-
frame.raidRoleIcon.texture:SetTexture("Interface\\GroupFrame\\UI-Group-MainTankIcon")
1728+
DF:SetUpgradedStatusIcon(frame.raidRoleIcon.texture, "Interface\\GroupFrame\\UI-Group-MainTankIcon")
17291729

17301730
local scale = db.raidRoleIconScale or 1.0
17311731
local anchor = db.raidRoleIconAnchor or "BOTTOMLEFT"
@@ -1745,7 +1745,7 @@ function DF:UpdateTestStatusIcons(frame, testData)
17451745
frame.raidRoleIcon:SetFrameLevel(frame:GetFrameLevel() + frameLevel)
17461746
end
17471747
elseif testData.isMainAssist and db.raidRoleIconShowAssist ~= false then
1748-
frame.raidRoleIcon.texture:SetTexture("Interface\\GroupFrame\\UI-Group-MainAssistIcon")
1748+
DF:SetUpgradedStatusIcon(frame.raidRoleIcon.texture, "Interface\\GroupFrame\\UI-Group-MainAssistIcon")
17491749

17501750
local scale = db.raidRoleIconScale or 1.0
17511751
local anchor = db.raidRoleIconAnchor or "BOTTOMLEFT"
@@ -1793,7 +1793,7 @@ function DF:UpdateTestStatusIcons(frame, testData)
17931793
end
17941794

17951795
if texture then
1796-
frame.centerStatusIcon.texture:SetTexture(texture)
1796+
DF:SetUpgradedStatusIcon(frame.centerStatusIcon.texture, texture)
17971797

17981798
local scale = db.centerStatusIconScale or 1.0
17991799
local anchor = db.centerStatusIconAnchor or "CENTER"

0 commit comments

Comments
 (0)