use new spec icon file

This commit is contained in:
andrew6180
2024-05-26 18:49:31 -07:00
parent b6264af117
commit 14c3a45d1a
11 changed files with 39 additions and 75 deletions
+1 -1
View File
@@ -1174,7 +1174,7 @@ function DF:AddClassIconToText(text, playerName, englishClassName, useSpec, icon
local specString = ""
local L, R, T, B = unpack(Details.class_specs_coords[spec])
if (L) then
specString = "|TInterface\\AddOns\\Details\\images\\spec_icons_normal:" .. size .. ":" .. size .. ":0:0:512:512:" .. (L * 512) .. ":" .. (R * 512) .. ":" .. (T * 512) .. ":" .. (B * 512) .. "|t"
specString = "|TInterface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS:" .. size .. ":" .. size .. ":0:0:512:512:" .. (L * 512) .. ":" .. (R * 512) .. ":" .. (T * 512) .. ":" .. (B * 512) .. "|t"
return specString .. " " .. text
end
end
+1 -1
View File
@@ -320,7 +320,7 @@ _detalhes.instance_defaults = {
fast_ps_update = false,
--show spec icons
use_spec_icons = false,
spec_file = [[Interface\AddOns\Details\images\spec_icons_normal]],
spec_file = [[Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS]],
--show faction icon
show_faction_icon = true,
faction_icon_size_offset = -10,
@@ -739,7 +739,7 @@ function breakdownWindowFrame.SetClassIcon(actorObject, class)
breakdownWindowFrame.classIcon:SetTexCoord(.1, .9, .1, .9)
elseif (actorObject.spec) then
breakdownWindowFrame.classIcon:SetTexture([[Interface\AddOns\Details\images\spec_icons_normal_alpha]])
breakdownWindowFrame.classIcon:SetTexture([[Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS]])
breakdownWindowFrame.classIcon:SetTexCoord(unpack(_detalhes.class_specs_coords [actorObject.spec]))
else
local coords = CLASS_ICON_TCOORDS[class]
+1 -1
View File
@@ -447,7 +447,7 @@ function Details:CreateEventTrackerFrame(parentObject, name)
local get_player_icon = function(spec, class)
if (spec) then
return [[Interface\AddOns\Details\images\spec_icons_normal]], unpack(Details.class_specs_coords [spec])
return [[Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS]], unpack(Details.class_specs_coords [spec])
elseif (class) then
return [[Interface\AddOns\Details\images\classes_small]], unpack(Details.class_coords [class])
else
+1 -1
View File
@@ -2093,7 +2093,7 @@ local iconFrame_OnEnter = function(self)
end
if (specL) then
GameCooltip:AddIcon([[Interface\AddOns\Details\images\spec_icons_normal_alpha]], 1, 2, iconSize, iconSize, specL, specR, specT, specB)
GameCooltip:AddIcon([[Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS]], 1, 2, iconSize, iconSize, specL, specR, specT, specB)
else
GameCooltip:AddIcon([[Interface\GossipFrame\IncompleteQuestIcon]], 1, 2, iconSize, iconSize)
end
+2 -2
View File
@@ -363,9 +363,9 @@ do
local L, R, T, B = unpack(Details.class_specs_coords[spec])
if (L) then
if (useAlphaIcons) then
specString = "|TInterface\\AddOns\\Details\\images\\spec_icons_normal_alpha:" .. iconSize .. ":" .. iconSize .. ":0:0:512:512:" .. (L * 512) .. ":" .. (R * 512) .. ":" .. (T * 512) .. ":" .. (B * 512) .. "|t"
specString = "|TInterface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS:" .. iconSize .. ":" .. iconSize .. ":0:0:512:512:" .. (L * 512) .. ":" .. (R * 512) .. ":" .. (T * 512) .. ":" .. (B * 512) .. "|t"
else
specString = "|TInterface\\AddOns\\Details\\images\\spec_icons_normal:" .. iconSize .. ":" .. iconSize .. ":0:0:512:512:" .. (L * 512) .. ":" .. (R * 512) .. ":" .. (T * 512) .. ":" .. (B * 512) .. "|t"
specString = "|TInterface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS:" .. iconSize .. ":" .. iconSize .. ":0:0:512:512:" .. (L * 512) .. ":" .. (R * 512) .. ":" .. (T * 512) .. ":" .. (B * 512) .. "|t"
end
return specString .. " " .. thisString
end
+5 -5
View File
@@ -86,9 +86,9 @@ do
if (iconType == "spec") then
if (bWithAlpha) then
return [[Interface\AddOns\Details\images\spec_icons_normal_alpha]]
return [[Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS]]
else
return [[Interface\AddOns\Details\images\spec_icons_normal]]
return [[Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS]]
end
else --if is class
if (bWithAlpha) then
@@ -206,9 +206,9 @@ do
end
if (useAlpha) then
return [[Interface\AddOns\Details\images\spec_icons_normal_alpha]], unpack(Details.class_specs_coords [spec])
return [[Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS]], unpack(Details.class_specs_coords [spec])
else
return [[Interface\AddOns\Details\images\spec_icons_normal]], unpack(Details.class_specs_coords[spec])
return [[Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS]], unpack(Details.class_specs_coords[spec])
end
end
@@ -251,7 +251,7 @@ do
if (playerObject) then
local spec = playerObject.spec
if (spec) then
texturePath = [[Interface\AddOns\Details\images\spec_icons_normal]]
texturePath = [[Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS]]
left, right, top, bottom = unpack(Details.class_specs_coords[spec])
elseif (playerObject.classe) then
+13 -49
View File
@@ -557,55 +557,7 @@ end
local default_profile = {
--spec coords, reset with: /run Details.class_specs_coords = nil
class_specs_coords = {
[577] = {128/512, 192/512, 256/512, 320/512}, --havoc demon hunter
[581] = {192/512, 256/512, 256/512, 320/512}, --vengeance demon hunter
[250] = {0, 64/512, 0, 64/512}, --blood dk
[251] = {64/512, 128/512, 0, 64/512}, --frost dk
[252] = {128/512, 192/512, 0, 64/512}, --unholy dk
[102] = {192/512, 256/512, 0, 64/512}, -- druid balance
[103] = {256/512, 320/512, 0, 64/512}, -- druid feral
[104] = {320/512, 384/512, 0, 64/512}, -- druid guardian
[105] = {384/512, 448/512, 0, 64/512}, -- druid resto
[253] = {448/512, 512/512, 0, 64/512}, -- hunter bm
[254] = {0, 64/512, 64/512, 128/512}, --hunter marks
[255] = {64/512, 128/512, 64/512, 128/512}, --hunter survivor
[62] = {(128/512) + 0.001953125, 192/512, 64/512, 128/512}, --mage arcane
[63] = {192/512, 256/512, 64/512, 128/512}, --mage fire
[64] = {256/512, 320/512, 64/512, 128/512}, --mage frost
[268] = {320/512, 384/512, 64/512, 128/512}, --monk bm
[269] = {448/512, 512/512, 64/512, 128/512}, --monk ww
[270] = {384/512, 448/512, 64/512, 128/512}, --monk mw
[65] = {0, 64/512, 128/512, 192/512}, --paladin holy
[66] = {64/512, 128/512, 128/512, 192/512}, --paladin protect
[70] = {(128/512) + 0.001953125, 192/512, 128/512, 192/512}, --paladin ret
[256] = {192/512, 256/512, 128/512, 192/512}, --priest disc
[257] = {256/512, 320/512, 128/512, 192/512}, --priest holy
[258] = {(320/512) + (0.001953125 * 4), 384/512, 128/512, 192/512}, --priest shadow
[259] = {384/512, 448/512, 128/512, 192/512}, --rogue assassination
[260] = {448/512, 512/512, 128/512, 192/512}, --rogue combat
[261] = {0, 64/512, 192/512, 256/512}, --rogue sub
[262] = {64/512, 128/512, 192/512, 256/512}, --shaman elemental
[263] = {128/512, 192/512, 192/512, 256/512}, --shamel enhancement
[264] = {192/512, 256/512, 192/512, 256/512}, --shaman resto
[265] = {256/512, 320/512, 192/512, 256/512}, --warlock aff
[266] = {320/512, 384/512, 192/512, 256/512}, --warlock demo
[267] = {384/512, 448/512, 192/512, 256/512}, --warlock destro
[71] = {448/512, 512/512, 192/512, 256/512}, --warrior arms
[72] = {0, 64/512, 256/512, 320/512}, --warrior fury
[73] = {64/512, 128/512, 256/512, 320/512}, --warrior protect
},
class_specs_coords = {},
--class icons and colors
class_icons_small = [[Interface\AddOns\Details\images\classes_small]],
@@ -999,6 +951,18 @@ for class, color in pairs(RAID_CLASS_COLORS) do
default_profile.class_colors[class] = { color.r, color.g, color.b }
end
for _, class in ipairs(CLASS_SORT_ORDER) do
local specs = C_ClassInfo.GetAllSpecs(class)
if specs then
for _, spec in ipairs(specs) do
local spec_info = C_ClassInfo.GetSpecInfo(class, spec)
if spec_info then
default_profile.class_specs_coords [spec_info.ID] = {AtlasUtil:GetCoords("specicon-"..class.."-"..spec_info.Spec)}
end
end
end
end
Details.default_profile = default_profile
+10 -10
View File
@@ -178,7 +178,7 @@ local addonName, Details222 = ...
["bars_grow_direction"] = 1,
["row_info"] = {
["textR_outline"] = true,
["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal",
["spec_file"] = "Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS",
["textL_outline"] = true,
["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
["textR_show_data"] = {
@@ -447,7 +447,7 @@ local addonName, Details222 = ...
["stretch_button_side"] = 1,
["row_info"] = {
["textR_outline"] = false,
["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal",
["spec_file"] = "Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS",
["textL_outline"] = false,
["textR_outline_small"] = true,
["textL_outline_small"] = true,
@@ -596,7 +596,7 @@ local addonName, Details222 = ...
["backdrop_texture"] = "Details Ground",
["row_info"] = {
["textR_outline"] = false,
["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal",
["spec_file"] = "Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS",
["textL_outline"] = false,
["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
["textR_show_data"] = {
@@ -876,7 +876,7 @@ local addonName, Details222 = ...
["bars_grow_direction"] = 1,
["row_info"] = {
["textR_outline"] = false,
["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal",
["spec_file"] = "Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS",
["textL_outline"] = false,
["textR_outline_small"] = true,
["textL_outline_small"] = true,
@@ -1242,7 +1242,7 @@ local addonName, Details222 = ...
0,
},
["use_spec_icons"] = true,
["icon_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal_alpha",
["icon_file"] = "Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS",
["textL_show_number"] = true,
["texture"] = "Skyline",
["texture_background_file"] = "Interface\\AddOns\\Details\\images\\bar4",
@@ -1444,7 +1444,7 @@ local addonName, Details222 = ...
},
["row_info"] = {
["textR_outline"] = false,
["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal",
["spec_file"] = "Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS",
["textL_outline"] = false,
["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
["textR_show_data"] = {
@@ -1653,7 +1653,7 @@ local addonName, Details222 = ...
["textL_outline"] = false,
["use_spec_icons"] = true,
["textL_enable_custom_text"] = false,
["icon_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal",
["icon_file"] = "Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS",
["texture_background_file"] = "Interface\\AddOns\\Details\\images\\BantoBar",
["start_after_icon"] = true,
["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
@@ -1855,7 +1855,7 @@ local addonName, Details222 = ...
["clickthrough_toolbaricons"] = false,
["row_info"] = {
["textR_outline"] = false,
["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal",
["spec_file"] = "Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS",
["textL_outline"] = false,
["textR_outline_small"] = true,
["textL_outline_small"] = true,
@@ -2431,7 +2431,7 @@ local addonName, Details222 = ...
["textR_outline"] = true,
["textL_outline_small"] = false,
["textR_outline_small"] = false,
["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal_alpha",
["spec_file"] = "Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS",
["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
["textR_show_data"] = {
true, -- [1]
@@ -2627,7 +2627,7 @@ local addonName, Details222 = ...
},
["row_info"] = {
["textR_outline"] = false,
["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal",
["spec_file"] = "Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS",
["textL_outline"] = false,
["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
["textR_show_data"] = {
@@ -448,7 +448,7 @@ function encounterDetails:CreatePhaseIndicators(chartPanel, phaseTooltip)
tooltipBar:SetStatusBarColor(red, green, blue)
if (spec) then
tooltipBar.icon.texture = [[Interface\AddOns\Details\images\spec_icons_normal]]
tooltipBar.icon.texture = [[Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECSl]]
tooltipBar.icon.texcoord = encounterDetails.class_specs_coords[spec]
elseif (class) then
@@ -496,7 +496,7 @@ function encounterDetails:CreatePhaseIndicators(chartPanel, phaseTooltip)
tooltipBar:SetStatusBarColor(red, green, blue)
if (spec) then
tooltipBar.icon.texture = [[Interface\AddOns\Details\images\spec_icons_normal]]
tooltipBar.icon.texture = [[Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS]]
tooltipBar.icon.texcoord = encounterDetails.class_specs_coords[spec]
elseif (class) then
@@ -983,12 +983,12 @@ local parse_target_icon = function (targetObject, target)
icon2coords = PetCoords
elseif (class and RAID_CLASS_COLORS [class]) then
if (targetObject.spec) then
icon2 = [[Interface\AddOns\Details\images\spec_icons_normal_alpha]]
icon2 = [[Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS]]
icon2coords = Details.class_specs_coords [targetObject.spec]
else
local spec_from_cache = Details.cached_specs [targetObject.serial]
if (spec_from_cache) then
icon2 = [[Interface\AddOns\Details\images\spec_icons_normal_alpha]]
icon2 = [[Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES-SPECS]]
icon2coords = Details.class_specs_coords [spec_from_cache]
else
icon2 = [[Interface\AddOns\Details\images\classes_small_alpha]]