diff --git a/Debug/AtlasBrowser.lua b/Debug/AtlasBrowser.lua index bfc6789d..4684a148 100644 --- a/Debug/AtlasBrowser.lua +++ b/Debug/AtlasBrowser.lua @@ -48,15 +48,18 @@ local ATLAS_LIST = { "ping_marker_threat", -- Group finder / roles - "groupfinder-icon-class-healer", - "groupfinder-icon-class-tank", - "groupfinder-icon-class-dps", + "groupfinder-icon-role-large-heal", + "groupfinder-icon-role-large-tank", + "groupfinder-icon-role-large-dps", "roleicon-tiny-tank", "roleicon-tiny-healer", "roleicon-tiny-dps", "UI-LFG-RoleIcon-Tank", "UI-LFG-RoleIcon-Healer", "UI-LFG-RoleIcon-DPS", + "UI-LFG-RoleIcon-Tank-Micro", + "UI-LFG-RoleIcon-Healer-Micro", + "UI-LFG-RoleIcon-DPS-Micro", -- Voice chat "voicechat-icon-mic", diff --git a/Frames/Bars.lua b/Frames/Bars.lua index e4939d2d..fc337839 100644 --- a/Frames/Bars.lua +++ b/Frames/Bars.lua @@ -1782,9 +1782,12 @@ function DF:UpdateRoleIcon(frame, source) return end - local tex, l, r, t, b = DF:GetRoleIconTexture(db, role) - frame.roleIcon.texture:SetTexture(tex) - frame.roleIcon.texture:SetTexCoord(l, r, t, b) + local tex, isAtlas = DF:GetRoleIconTexture(db, role) + if isAtlas then + frame.roleIcon.texture:SetAtlas(tex) + else + frame.roleIcon.texture:SetTexture(tex) + end frame.roleIcon:Show() @@ -1979,10 +1982,10 @@ function DF:UpdateReadyCheckIcon(frame) local readyCheckStatus = GetReadyCheckStatus(frame.unit) if readyCheckStatus == "ready" then - frame.readyCheckIcon.texture:SetTexture("Interface\\RaidFrame\\ReadyCheck-Ready") + frame.readyCheckIcon.texture:SetAtlas("UI-LFG-ReadyMark-Raid") frame.readyCheckIcon:Show() elseif readyCheckStatus == "notready" then - frame.readyCheckIcon.texture:SetTexture("Interface\\RaidFrame\\ReadyCheck-NotReady") + frame.readyCheckIcon.texture:SetAtlas("UI-LFG-DeclineMark-Raid") frame.readyCheckIcon:Show() elseif readyCheckStatus == "waiting" then -- Check if player is AFK while waiting (enhanced ready check) @@ -1996,9 +1999,9 @@ function DF:UpdateReadyCheckIcon(frame) if afkAccessible and isAFK then -- AFK state - show not ready icon (they likely won't respond) - frame.readyCheckIcon.texture:SetTexture("Interface\\RaidFrame\\ReadyCheck-NotReady") + frame.readyCheckIcon.texture:SetAtlas("UI-LFG-DeclineMark-Raid") else - frame.readyCheckIcon.texture:SetTexture("Interface\\RaidFrame\\ReadyCheck-Waiting") + frame.readyCheckIcon.texture:SetAtlas("UI-LFG-PendingMark-Raid") end frame.readyCheckIcon:Show() else @@ -2073,7 +2076,7 @@ function DF:UpdateCenterStatusIcon(frame) local unit = frame.unit local showIcon = false - local texture = nil + local atlas = nil -- Check for incoming summon (secret-safe) if C_IncomingSummon and C_IncomingSummon.HasIncomingSummon then @@ -2085,13 +2088,13 @@ function DF:UpdateCenterStatusIcon(frame) -- Check if value is accessible if summonStatus ~= nil and not (issecretvalue and issecretvalue(summonStatus)) then if summonStatus == Enum.SummonStatus.Pending then - texture = "Interface\\RaidFrame\\Raid-Icon-SummonPending" + atlas = "RaidFrame-Icon-SummonPending" showIcon = true elseif summonStatus == Enum.SummonStatus.Accepted then - texture = "Interface\\RaidFrame\\Raid-Icon-SummonAccepted" + atlas = "RaidFrame-Icon-SummonAccepted" showIcon = true elseif summonStatus == Enum.SummonStatus.Declined then - texture = "Interface\\RaidFrame\\Raid-Icon-SummonDeclined" + atlas = "RaidFrame-Icon-SummonDeclined" showIcon = true end end @@ -2105,13 +2108,13 @@ function DF:UpdateCenterStatusIcon(frame) end) if hasRes ~= nil and not (issecretvalue and issecretvalue(hasRes)) and hasRes then - texture = "Interface\\RaidFrame\\Raid-Icon-Rez" + atlas = "RaidFrame-Icon-Rez" showIcon = true end end - if showIcon and texture then - frame.centerStatusIcon.texture:SetTexture(texture) + if showIcon and atlas then + frame.centerStatusIcon.texture:SetAtlas(atlas) frame.centerStatusIcon:Show() -- Apply positioning diff --git a/Frames/Core.lua b/Frames/Core.lua index 29c382ed..76264a70 100644 --- a/Frames/Core.lua +++ b/Frames/Core.lua @@ -635,10 +635,10 @@ local ROLE_ICON_TEXTURES = { DAMAGER = "Interface\\AddOns\\DandersFrames\\Media\\DF_DPS", } -local BLIZZARD_ROLE_COORDS = { - TANK = {0, 0.296875, 0.296875, 0.65}, - HEALER = {0.296875, 0.59375, 0, 0.296875}, - DAMAGER = {0.296875, 0.59375, 0.296875, 0.65}, +local BLIZZARD_ROLE_ATLASES = { + TANK = "UI-LFG-RoleIcon-Tank-Micro", + HEALER = "UI-LFG-RoleIcon-Healer-Micro", + DAMAGER = "UI-LFG-RoleIcon-DPS-Micro", } function DF:GetRoleIconTexture(db, role) @@ -658,16 +658,15 @@ function DF:GetRoleIconTexture(db, role) path = path:gsub("%.[tT][gG][aA]$", "") path = path:gsub("%.[bB][lL][pP]$", "") path = path:gsub("%.[pP][nN][gG]$", "") - return path, 0, 1, 0, 1 + return path, false -- Not an atlas end style = "CUSTOM" end if style == "CUSTOM" then - return ROLE_ICON_TEXTURES[role], 0, 1, 0, 1 + return ROLE_ICON_TEXTURES[role], false -- Not an atlas else -- BLIZZARD - local c = BLIZZARD_ROLE_COORDS[role] - return "Interface\\LFGFrame\\UI-LFG-ICON-PORTRAITROLES", c[1], c[2], c[3], c[4] + return BLIZZARD_ROLE_ATLASES[role], true -- Is an atlas end end diff --git a/Frames/StatusIcons.lua b/Frames/StatusIcons.lua index 47afc6e7..349a89ce 100644 --- a/Frames/StatusIcons.lua +++ b/Frames/StatusIcons.lua @@ -83,7 +83,7 @@ function DF:CreateStatusIcons(frame) -- ======================================== frame.summonIcon = CreateStatusIcon(overlay, 16) frame.summonIcon:SetPoint("CENTER", frame, "CENTER", 0, 0) - frame.summonIcon.texture:SetTexture("Interface\\RaidFrame\\Raid-Icon-SummonPending") + frame.summonIcon.texture:SetAtlas("RaidFrame-Icon-SummonPending") frame.summonIcon.text:SetTextColor(0.6, 0.2, 1, 1) -- Purple for summon -- ======================================== @@ -91,7 +91,7 @@ function DF:CreateStatusIcons(frame) -- ======================================== frame.resurrectionIcon = CreateStatusIcon(overlay, 16) frame.resurrectionIcon:SetPoint("CENTER", frame, "CENTER", 0, 10) - frame.resurrectionIcon.texture:SetTexture("Interface\\RaidFrame\\Raid-Icon-Rez") + frame.resurrectionIcon.texture:SetAtlas("RaidFrame-Icon-Rez") frame.resurrectionIcon.text:SetTextColor(0.2, 1, 0.2, 1) -- Green for res frame.resurrectionIcon.unitFrame = frame frame.resurrectionIcon:EnableMouse(true) @@ -131,7 +131,7 @@ function DF:CreateStatusIcons(frame) -- ======================================== frame.phasedIcon = CreateStatusIcon(overlay, 16) frame.phasedIcon:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -2, -2) - frame.phasedIcon.texture:SetTexture("Interface\\TargetingFrame\\UI-PhasingIcon") + frame.phasedIcon.texture:SetAtlas("RaidFrame-Icon-Phasing") frame.phasedIcon.texture:SetTexCoord(0.15625, 0.84375, 0.15625, 0.84375) frame.phasedIcon.text:SetTextColor(0.5, 0.5, 1, 1) -- Blue-ish for phased @@ -140,7 +140,7 @@ function DF:CreateStatusIcons(frame) -- ======================================== frame.afkIcon = CreateStatusIcon(overlay, 32) frame.afkIcon:SetPoint("CENTER", frame, "CENTER", 0, 0) - frame.afkIcon.texture:SetTexture("Interface\\FriendsFrame\\StatusIcon-Away") + frame.afkIcon.texture:SetAtlas("characterupdate_clock-icon") frame.afkIcon.text:SetFont("Fonts\\FRIZQT__.TTF", 12, "OUTLINE") frame.afkIcon.text:SetTextColor(1, 0.5, 0, 1) -- Orange for AFK -- Timer text (separate from main text, shown below/after) @@ -155,7 +155,7 @@ function DF:CreateStatusIcons(frame) -- ======================================== frame.vehicleIcon = CreateStatusIcon(overlay, 16) frame.vehicleIcon:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 2) - frame.vehicleIcon.texture:SetTexture("Interface\\Vehicles\\UI-Vehicles-Raid-Icon") + frame.vehicleIcon.texture:SetAtlas("RaidFrame-Icon-Vehicle") frame.vehicleIcon.text:SetTextColor(0.4, 0.8, 1, 1) -- Light blue for vehicle -- ======================================== @@ -292,7 +292,7 @@ function DF:UpdateSummonIcon(frame) local unit = frame.unit local showIcon = false - local texture = nil + local atlas = nil local statusText = nil -- If the unit no longer exists (player left group), clear the icon immediately @@ -316,15 +316,15 @@ function DF:UpdateSummonIcon(frame) if canaccessvalue(summonStatus) then if summonStatus == Enum.SummonStatus.Pending then - texture = "Interface\\RaidFrame\\Raid-Icon-SummonPending" + atlas = "RaidFrame-Icon-SummonPending" statusText = db.summonIconTextPending or "Summon" showIcon = true elseif summonStatus == Enum.SummonStatus.Accepted then - texture = "Interface\\RaidFrame\\Raid-Icon-SummonAccepted" + atlas = "RaidFrame-Icon-SummonAccepted" statusText = db.summonIconTextAccepted or "Accepted" showIcon = true elseif summonStatus == Enum.SummonStatus.Declined then - texture = "Interface\\RaidFrame\\Raid-Icon-SummonDeclined" + atlas = "RaidFrame-Icon-SummonDeclined" statusText = db.summonIconTextDeclined or "Declined" showIcon = true end @@ -333,8 +333,7 @@ function DF:UpdateSummonIcon(frame) end if showIcon then - frame.summonIcon.texture:SetTexture(texture) - frame.summonIcon.texture:SetTexCoord(0, 1, 0, 1) + frame.summonIcon.texture:SetAtlas(atlas) ApplyIconSettings(frame.summonIcon, db, "summonIcon") -- Show as text or icon based on setting @@ -405,7 +404,7 @@ function DF:UpdateResurrectionIcon(frame) resCache[unit] = 1 resTimer = resTimer or C_Timer.NewTicker(0.25, ResTimerCleanup) end - frame.resurrectionIcon.texture:SetTexture("Interface\\RaidFrame\\Raid-Icon-Rez") + frame.resurrectionIcon.texture:SetAtlas("RaidFrame-Icon-Rez") frame.resurrectionIcon.texture:SetVertexColor(0, 1, 0, 1) ApplyIconSettings(frame.resurrectionIcon, db, "resurrectionIcon") frame.resurrectionIcon:Show() @@ -414,7 +413,7 @@ function DF:UpdateResurrectionIcon(frame) -- Was casting, now stopped → pending accept (yellow) -- Store timestamp so we can expire after 60s resCache[unit] = GetTime() - frame.resurrectionIcon.texture:SetTexture("Interface\\RaidFrame\\Raid-Icon-Rez") + frame.resurrectionIcon.texture:SetAtlas("RaidFrame-Icon-Rez") frame.resurrectionIcon.texture:SetVertexColor(1, 1, 0, 0.75) ApplyIconSettings(frame.resurrectionIcon, db, "resurrectionIcon") frame.resurrectionIcon:Show() @@ -422,7 +421,7 @@ function DF:UpdateResurrectionIcon(frame) elseif resCache[unit] and resCache[unit] ~= 1 then -- Still showing pending accept (check not expired) if (GetTime() - resCache[unit]) <= RES_ACCEPT_TIMEOUT then - frame.resurrectionIcon.texture:SetTexture("Interface\\RaidFrame\\Raid-Icon-Rez") + frame.resurrectionIcon.texture:SetAtlas("RaidFrame-Icon-Rez") frame.resurrectionIcon.texture:SetVertexColor(1, 1, 0, 0.75) ApplyIconSettings(frame.resurrectionIcon, db, "resurrectionIcon") frame.resurrectionIcon:Show() @@ -655,11 +654,9 @@ function DF:UpdatePhasedIcon(frame) -- cached == -1 means LFG (other party), anything else means phased local isLFG = (cached == -1) if isLFG and db.phasedIconShowLFGEye then - frame.phasedIcon.texture:SetTexture("Interface\\LFGFrame\\LFG-Eye") - frame.phasedIcon.texture:SetTexCoord(0.14, 0.235, 0.28, 0.47) + frame.phasedIcon.texture:SetAtlas("RaidFrame-Icon-LFR") else - frame.phasedIcon.texture:SetTexture("Interface\\TargetingFrame\\UI-PhasingIcon") - frame.phasedIcon.texture:SetTexCoord(0.15625, 0.84375, 0.15625, 0.84375) + frame.phasedIcon.texture:SetAtlas("RaidFrame-Icon-Phasing") end ApplyIconSettings(frame.phasedIcon, db, "phasedIcon") ShowIconAsText(frame.phasedIcon, db.phasedIconText or "Phased", db.phasedIconShowText) @@ -889,10 +886,10 @@ function DF:UpdateRaidRoleIcon(frame) if showIcon and role then local statusText = nil if role == "MAINTANK" then - frame.raidRoleIcon.texture:SetTexture("Interface\\GroupFrame\\UI-Group-MainTankIcon") + frame.raidRoleIcon.texture:SetAtlas("RaidFrame-Icon-MainTank") statusText = db.raidRoleIconTextTank or "MT" else - frame.raidRoleIcon.texture:SetTexture("Interface\\GroupFrame\\UI-Group-MainAssistIcon") + frame.raidRoleIcon.texture:SetAtlas("RaidFrame-Icon-MainAssist") statusText = db.raidRoleIconTextAssist or "MA" end frame.raidRoleIcon.texture:SetTexCoord(0, 1, 0, 1) @@ -1057,11 +1054,11 @@ function DF:UpdateReadyCheckIconEnhanced(frame) return end - local texture + local atlas if readyCheckStatus == "ready" then - texture = "Interface\\RaidFrame\\ReadyCheck-Ready" + atlas = "UI-LFG-ReadyMark-Raid" elseif readyCheckStatus == "notready" then - texture = "Interface\\RaidFrame\\ReadyCheck-NotReady" + atlas = "UI-LFG-DeclineMark-Raid" elseif readyCheckStatus == "waiting" then -- Check if also AFK local isAFK = nil @@ -1071,17 +1068,17 @@ function DF:UpdateReadyCheckIconEnhanced(frame) if canaccessvalue(isAFK) and isAFK then -- AFK state - use notready icon with different tint or keep waiting - texture = "Interface\\RaidFrame\\ReadyCheck-NotReady" + atlas = "UI-LFG-DeclineMark-Raid" -- Could add vertex color for AFK distinction else - texture = "Interface\\RaidFrame\\ReadyCheck-Waiting" + atlas = "UI-LFG-PendingMark-Raid" end else frame.readyCheckIcon:Hide() return end - frame.readyCheckIcon.texture:SetTexture(texture) + frame.readyCheckIcon.texture:SetAtlas(atlas) -- Apply positioning local scale = db.readyCheckIconScale or 1.0 @@ -1149,9 +1146,12 @@ function DF:UpdateRoleIconEnhanced(frame) end -- Set texture based on style - local tex, l, r, t, b = DF:GetRoleIconTexture(db, role) - frame.roleIcon.texture:SetTexture(tex) - frame.roleIcon.texture:SetTexCoord(l, r, t, b) + local tex, isAtlas = DF:GetRoleIconTexture(db, role) + if isAtlas then + frame.roleIcon.texture:SetAtlas(tex) + else + frame.roleIcon.texture:SetTexture(tex) + end frame.roleIcon:Show() diff --git a/TestMode/TestMode.lua b/TestMode/TestMode.lua index 2b478919..48d4c930 100644 --- a/TestMode/TestMode.lua +++ b/TestMode/TestMode.lua @@ -1102,9 +1102,12 @@ function DF:UpdateTestIcons(frame, testData) end if shouldShow then - local tex, l, r, t, b = DF:GetRoleIconTexture(db, role) - frame.roleIcon.texture:SetTexture(tex) - frame.roleIcon.texture:SetTexCoord(l, r, t, b) + local tex, isAtlas = DF:GetRoleIconTexture(db, role) + if isAtlas then + frame.roleIcon.texture:SetAtlas(tex) + else + frame.roleIcon.texture:SetTexture(tex) + end frame.roleIcon:Show() local scale = db.roleIconScale or 1.0 @@ -1202,7 +1205,7 @@ function DF:UpdateTestIcons(frame, testData) if not db.readyCheckIconEnabled or db.testShowStatusIcons == false then frame.readyCheckIcon:Hide() elseif testData.isLeader then - frame.readyCheckIcon.texture:SetTexture("Interface\\RaidFrame\\ReadyCheck-Ready") + frame.readyCheckIcon.texture:SetAtlas("UI-LFG-ReadyMark-Raid") local scale = db.readyCheckIconScale or 1.0 local anchor = db.readyCheckIconAnchor or "CENTER" @@ -1230,9 +1233,9 @@ function DF:UpdateTestIcons(frame, testData) elseif testData.centerStatus then local texture = nil if testData.centerStatus == "resurrect" then - texture = "Interface\\RaidFrame\\Raid-Icon-Rez" + texture = "RaidFrame-Icon-Rez" elseif testData.centerStatus == "summon" then - texture = "Interface\\RaidFrame\\Raid-Icon-SummonPending" + texture = "RaidFrame-Icon-SummonPending" end if texture then @@ -1411,7 +1414,7 @@ function DF:UpdateTestStatusIcons(frame, testData) if not db.readyCheckIconEnabled or db.testShowStatusIcons == false then frame.readyCheckIcon:Hide() elseif testData.isLeader then - frame.readyCheckIcon.texture:SetTexture("Interface\\RaidFrame\\ReadyCheck-Ready") + frame.readyCheckIcon.texture:SetAtlas("UI-LFG-ReadyMark-Raid") local scale = db.readyCheckIconScale or 1.0 local anchor = db.readyCheckIconAnchor or "CENTER" @@ -1438,7 +1441,7 @@ function DF:UpdateTestStatusIcons(frame, testData) if not db.summonIconEnabled or db.testShowStatusIcons == false then frame.summonIcon:Hide() elseif testData.centerStatus == "summon" then - frame.summonIcon.texture:SetTexture("Interface\\RaidFrame\\Raid-Icon-SummonPending") + frame.summonIcon.texture:SetAtlas("RaidFrame-Icon-SummonPending") local scale = db.summonIconScale or 1.0 local anchor = db.summonIconAnchor or "CENTER" @@ -1467,7 +1470,7 @@ function DF:UpdateTestStatusIcons(frame, testData) if not db.resurrectionIconEnabled or db.testShowStatusIcons == false then frame.resurrectionIcon:Hide() elseif testData.centerStatus == "resurrect" then - frame.resurrectionIcon.texture:SetTexture("Interface\\RaidFrame\\Raid-Icon-Rez") + frame.resurrectionIcon.texture:SetAtlas("RaidFrame-Icon-Rez") frame.resurrectionIcon.texture:SetVertexColor(0, 1, 0) -- Green = being cast local scale = db.resurrectionIconScale or 1.0 @@ -1497,7 +1500,7 @@ function DF:UpdateTestStatusIcons(frame, testData) if not db.phasedIconEnabled or db.testShowStatusIcons == false then frame.phasedIcon:Hide() elseif testData.isPhased then - frame.phasedIcon.texture:SetTexture("Interface\\TargetingFrame\\UI-PhasingIcon") + frame.phasedIcon.texture:SetAtlas("RaidFrame-Icon-Phasing") local scale = db.phasedIconScale or 1.0 local anchor = db.phasedIconAnchor or "TOPRIGHT" @@ -1527,7 +1530,7 @@ function DF:UpdateTestStatusIcons(frame, testData) frame.afkIcon:Hide() if frame.afkIcon.timerText then frame.afkIcon.timerText:Hide() end elseif testData.isAFK then - frame.afkIcon.texture:SetTexture("Interface\\FriendsFrame\\StatusIcon-Away") + frame.afkIcon.texture:SetAtlas("characterupdate_clock-icon") local scale = db.afkIconScale or 1.0 local anchor = db.afkIconAnchor or "CENTER" @@ -1590,7 +1593,7 @@ function DF:UpdateTestStatusIcons(frame, testData) if not db.vehicleIconEnabled or db.testShowStatusIcons == false then frame.vehicleIcon:Hide() elseif testData.inVehicle then - frame.vehicleIcon.texture:SetTexture("Interface\\Vehicles\\UI-Vehicles-Raid-Icon") + frame.vehicleIcon.texture:SetAtlas("RaidFrame-Icon-Vehicle") local scale = db.vehicleIconScale or 1.0 local anchor = db.vehicleIconAnchor or "BOTTOMRIGHT" @@ -1619,7 +1622,7 @@ function DF:UpdateTestStatusIcons(frame, testData) if not db.raidRoleIconEnabled or db.testShowStatusIcons == false then frame.raidRoleIcon:Hide() elseif testData.isMainTank and db.raidRoleIconShowTank ~= false then - frame.raidRoleIcon.texture:SetTexture("Interface\\GroupFrame\\UI-Group-MainTankIcon") + frame.raidRoleIcon.texture:SetAtlas("RaidFrame-Icon-MainTank") local scale = db.raidRoleIconScale or 1.0 local anchor = db.raidRoleIconAnchor or "BOTTOMLEFT" @@ -1639,7 +1642,7 @@ function DF:UpdateTestStatusIcons(frame, testData) frame.raidRoleIcon:SetFrameLevel(frame:GetFrameLevel() + frameLevel) end elseif testData.isMainAssist and db.raidRoleIconShowAssist ~= false then - frame.raidRoleIcon.texture:SetTexture("Interface\\GroupFrame\\UI-Group-MainAssistIcon") + frame.raidRoleIcon.texture:SetAtlas("RaidFrame-Icon-MainAssist") local scale = db.raidRoleIconScale or 1.0 local anchor = db.raidRoleIconAnchor or "BOTTOMLEFT" @@ -1679,15 +1682,15 @@ function DF:UpdateTestStatusIcons(frame, testData) if not showCenterStatus then frame.centerStatusIcon:Hide() elseif testData.centerStatus then - local texture = nil + local atlas = nil if testData.centerStatus == "resurrect" then - texture = "Interface\\RaidFrame\\Raid-Icon-Rez" + atlas = "RaidFrame-Icon-Rez" elseif testData.centerStatus == "summon" then - texture = "Interface\\RaidFrame\\Raid-Icon-SummonPending" + atlas = "RaidFrame-Icon-SummonPending" end - if texture then - frame.centerStatusIcon.texture:SetTexture(texture) + if atlas then + frame.centerStatusIcon.texture:SetAtlas(atlas) local scale = db.centerStatusIconScale or 1.0 local anchor = db.centerStatusIconAnchor or "CENTER"