Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Debug/AtlasBrowser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
31 changes: 17 additions & 14 deletions Frames/Bars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
15 changes: 7 additions & 8 deletions Frames/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
58 changes: 29 additions & 29 deletions Frames/StatusIcons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ 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

-- ========================================
-- RESURRECTION ICON (incoming res status)
-- ========================================
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)
Expand Down Expand Up @@ -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

Expand All @@ -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)
Expand All @@ -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

-- ========================================
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -414,15 +413,15 @@ 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()
return
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()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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()

Expand Down
Loading