Skip to content

Commit dc36bef

Browse files
committed
p t r
1 parent 26e5a92 commit dc36bef

File tree

6 files changed

+56
-43
lines changed

6 files changed

+56
-43
lines changed

ElvUI/Core/Modules/Skins/Skins.lua

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ local LibStub = _G.LibStub
55
local _G = _G
66
local hooksecurefunc = hooksecurefunc
77
local tinsert, xpcall, next, ipairs, pairs = tinsert, xpcall, next, ipairs, pairs
8-
local unpack, assert, type, strfind = unpack, assert, type, strfind
8+
local unpack, assert, type, gsub, strfind = unpack, assert, type, gsub, strfind
99

1010
local CreateFrame = CreateFrame
11-
1211
local IsAddOnLoaded = (C_AddOns and C_AddOns.IsAddOnLoaded) or IsAddOnLoaded
1312

1413
local ITEM_QUALITY_COLORS = ITEM_QUALITY_COLORS
@@ -1289,7 +1288,7 @@ do
12891288
end
12901289
end
12911290

1292-
function S.ReplaceIconString(self, text)
1291+
function S:ReplaceIconString(text)
12931292
if not text then text = self:GetText() end
12941293
if not text or text == '' then return end
12951294

ElvUI/Mainline/Modules/Skins/GenericTrait.lua

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ local E, L, V, P, G = unpack(ElvUI)
22
local S = E:GetModule('Skins')
33

44
local _G = _G
5-
local gsub = gsub
65
local hooksecurefunc = hooksecurefunc
76

87
function S:Blizzard_GenericTraitUI()

ElvUI/Mainline/Modules/Skins/LFG.lua

+28-17
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ local C_ChallengeMode_GetMapUIInfo = C_ChallengeMode.GetMapUIInfo
2020

2121
local LE_PARTY_CATEGORY_HOME = LE_PARTY_CATEGORY_HOME
2222

23+
local groupButtonIcons = {
24+
133076, -- interface\icons\inv_helmet_08.blp
25+
133074, -- interface\icons\inv_helmet_06.blp
26+
464820 -- interface\icons\achievement_general_stayclassy.blp
27+
}
28+
2329
local function LFDQueueFrameRoleButtonIconOnShow(self)
2430
LCG.ShowOverlayGlow(self:GetParent().checkButton)
2531
end
@@ -128,10 +134,6 @@ function S:LookingForGroupFrames()
128134
S:HandleButton(_G.LFDQueueFramePartyBackfillBackfillButton)
129135
S:HandleButton(_G.LFDQueueFramePartyBackfillNoBackfillButton)
130136

131-
_G.GroupFinderFrame.groupButton1.icon:SetTexture(133076) -- interface\icons\inv_helmet_08.blp
132-
_G.GroupFinderFrame.groupButton2.icon:SetTexture(133074) -- interface\icons\inv_helmet_06.blp
133-
_G.GroupFinderFrame.groupButton3.icon:SetTexture(464820) -- interface\icons\achievement_general_stayclassy.blp
134-
135137
_G.LFGDungeonReadyStatus:StripTextures()
136138
_G.LFGDungeonReadyStatus:SetTemplate('Transparent')
137139

@@ -261,18 +263,26 @@ function S:LookingForGroupFrames()
261263
end
262264
end)
263265

264-
for i = 1, 4 do
265-
local bu = _G.GroupFinderFrame['groupButton'..i]
266+
do
267+
local index = 1
268+
local button = _G.GroupFinderFrame['groupButton'..index]
269+
while button do
270+
button.ring:Hide()
271+
button.bg:Kill()
272+
S:HandleButton(button)
273+
274+
local texture = groupButtonIcons[index]
275+
if texture then
276+
button.icon:SetTexture(texture)
277+
end
266278

267-
if bu then
268-
bu.ring:Hide()
269-
bu.bg:Kill()
270-
S:HandleButton(bu)
279+
button.icon:Size(45)
280+
button.icon:ClearAllPoints()
281+
button.icon:Point('LEFT', 10, 0)
282+
S:HandleIcon(button.icon, true)
271283

272-
bu.icon:Size(45)
273-
bu.icon:ClearAllPoints()
274-
bu.icon:Point('LEFT', 10, 0)
275-
S:HandleIcon(bu.icon, true)
284+
index = index + 1
285+
button = _G.GroupFinderFrame['groupButton'..index]
276286
end
277287
end
278288

@@ -295,11 +305,12 @@ function S:LookingForGroupFrames()
295305
_G.ScenarioFinderFrameInset:StripTextures()
296306
_G.ScenarioQueueFrameBackground:SetAlpha(0)
297307
S:HandleDropDownBox(_G.ScenarioQueueFrameTypeDropDown)
298-
if ScenarioQueueFrameRandomScrollFrameScrollBar then
299-
ScenarioQueueFrameRandomScrollFrameScrollBar:SetAlpha(0)
300-
end
301308
S:HandleTrimScrollBar(_G.ScenarioQueueFrameRandomScrollFrame.ScrollBar)
302309
S:HandleButton(_G.ScenarioQueueFrameFindGroupButton)
310+
311+
if _G.ScenarioQueueFrameRandomScrollFrameScrollBar then
312+
_G.ScenarioQueueFrameRandomScrollFrameScrollBar:SetAlpha(0)
313+
end
303314
end
304315

305316
-- Raid finder

ElvUI/Mainline/Modules/Skins/PerksProgram.lua

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ local E, L, V, P, G = unpack(ElvUI)
22
local S = E:GetModule('Skins')
33

44
local _G = _G
5-
local gsub = gsub
65
local hooksecurefunc = hooksecurefunc
76

87
local function HandleRewardButton(box)

ElvUI/Mainline/Modules/Skins/Stable.lua

+15-10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@ local E, L, V, P, G = unpack(ElvUI)
22
local S = E:GetModule('Skins')
33

44
local _G = _G
5+
local hooksecurefunc = hooksecurefunc
6+
7+
local function AbilitiesList_Layout(list)
8+
if not list.abilityPool then return end
9+
10+
for frame in list.abilityPool:EnumerateActive() do
11+
if not frame.IsSkinned then
12+
S:HandleIcon(frame.Icon)
13+
frame.IsSkinned = true
14+
end
15+
end
16+
end
517

618
function S:Blizzard_StableUI()
719
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.stable) then return end
@@ -29,16 +41,9 @@ function S:Blizzard_StableUI()
2941
--S:HandleButton(PetInfo.NameBox.EditButton) -- ToDo: 10.2.7: Halp, Fix me
3042
end
3143

32-
local StableList = StableModelScene.AbilitiesList
33-
if StableList then
34-
hooksecurefunc(StableList, 'Layout', function(self)
35-
for frame in self.abilityPool:EnumerateActive() do
36-
if not frame.IsSkinned then
37-
S:HandleIcon(frame.Icon)
38-
frame.IsSkinned = true
39-
end
40-
end
41-
end)
44+
local AbilitiesList = StableModelScene.AbilitiesList
45+
if AbilitiesList then
46+
hooksecurefunc(AbilitiesList, 'Layout', AbilitiesList_Layout)
4247
end
4348
end
4449
S:HandleModelSceneControlButtons(StableModelScene.ControlFrame)

ElvUI/Mainline/Modules/Skins/WeeklyRewards.lua

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,11 @@ local E, L, V, P, G = unpack(ElvUI)
22
local S = E:GetModule('Skins')
33

44
local _G = _G
5-
local gsub, pairs, unpack = gsub, pairs, unpack
5+
local pairs, unpack = pairs, unpack
66
local hooksecurefunc = hooksecurefunc
77

88
-- Credits Siweia | AuroraClassic
99

10-
local function UpdateSelection(frame)
11-
if not frame.backdrop then return end
12-
13-
if frame.SelectedTexture:IsShown() then
14-
frame.backdrop:SetBackdropBorderColor(1, .8, 0)
15-
else
16-
frame.backdrop:SetBackdropBorderColor(0, 0, 0)
17-
end
18-
end
19-
2010
local IconColor = E.QualityColors[Enum.ItemQuality.Epic or 4] -- epic color only
2111
local function SkinRewardIcon(itemFrame)
2212
if not itemFrame.IsSkinned then
@@ -29,6 +19,16 @@ local function SkinRewardIcon(itemFrame)
2919
end
3020
end
3121

22+
local function UpdateSelection(frame)
23+
if not frame.backdrop then return end
24+
25+
if frame.SelectedTexture:IsShown() then
26+
frame.backdrop:SetBackdropBorderColor(1, .8, 0)
27+
else
28+
frame.backdrop:SetBackdropBorderColor(0, 0, 0)
29+
end
30+
end
31+
3232
local function SkinActivityFrame(frame, isObject)
3333
if frame.Border then
3434
if isObject then

0 commit comments

Comments
 (0)