@@ -2,73 +2,27 @@ local E, L, V, P, G = unpack(ElvUI)
2
2
local S = E :GetModule (' Skins' )
3
3
4
4
local _G = _G
5
- local unpack = unpack
6
- local CreateFrame = CreateFrame
7
5
8
- local function PetButtons (btn , p )
9
- local button = _G [btn ]
10
- local icon = _G [btn .. ' IconTexture' ]
11
- local highlight = button :GetHighlightTexture ()
12
- button :StripTextures ()
13
-
14
- if button .Checked then
15
- button .Checked :SetColorTexture (unpack (E .media .rgbvaluecolor ))
16
- button .Checked :SetAllPoints (icon )
17
- button .Checked :SetAlpha (0.3 )
18
- end
19
-
20
- if highlight then
21
- highlight :SetColorTexture (1 , 1 , 1 , 0.3 )
22
- highlight :SetAllPoints (icon )
23
- end
24
-
25
- if icon then
26
- icon :SetTexCoord (unpack (E .TexCoords ))
27
- icon :ClearAllPoints ()
28
- icon :Point (' TOPLEFT' , p , - p )
29
- icon :Point (' BOTTOMRIGHT' , - p , p )
30
-
31
- button :SetFrameLevel (button :GetFrameLevel () + 2 )
32
- button :SetTemplate (nil , true )
33
- end
34
- end
35
-
36
- function S :PetStableFrame ()
6
+ function S :Blizzard_StableUI ()
37
7
if not (E .private .skins .blizzard .enable and E .private .skins .blizzard .stable ) then return end
38
8
39
- local PetStableFrame = _G .PetStableFrame
40
- S :HandlePortraitFrame (PetStableFrame )
41
-
42
- _G .PetStableLeftInset :Hide ()
43
- _G .PetStableBottomInset :Hide ()
44
- _G .PetStableFrameModelBg :Hide ()
45
- _G .PetStableDietTexture :SetTexture (132165 )
46
- _G .PetStableDietTexture :SetTexCoord (unpack (E .TexCoords ))
47
- _G .PetStableFrameInset :SetTemplate (' Transparent' )
48
-
49
- S :HandleModelSceneControlButtons (_G .PetStableModelScene .ControlFrame )
50
- S :HandleButton (_G .PetStablePrevPageButton ) -- Required to remove graphical glitch from Prev page button
51
- S :HandleButton (_G .PetStableNextPageButton ) -- Required to remove graphical glitch from Next page button
52
-
53
- local p = E .PixelMode and 1 or 2
54
- local PetStableSelectedPetIcon = _G .PetStableSelectedPetIcon
55
- if PetStableSelectedPetIcon then
56
- PetStableSelectedPetIcon :SetTexCoord (unpack (E .TexCoords ))
57
-
58
- local b = CreateFrame (' Frame' , nil , PetStableSelectedPetIcon :GetParent ())
59
- b :Point (' TOPLEFT' , PetStableSelectedPetIcon , - p , p )
60
- b :Point (' BOTTOMRIGHT' , PetStableSelectedPetIcon , p , - p )
61
- PetStableSelectedPetIcon :Size (37 )
62
- PetStableSelectedPetIcon :SetParent (b )
63
- b :SetTemplate ()
64
- end
65
-
66
- for i = 1 , _G .NUM_PET_ACTIVE_SLOTS do
67
- PetButtons (' PetStableActivePet' .. i , p )
68
- end
69
- for i = 1 , _G .NUM_PET_STABLE_SLOTS do
70
- PetButtons (' PetStableStabledPet' .. i , p )
71
- end
9
+ local StableFrame = _G .StableFrame
10
+ S :HandlePortraitFrame (StableFrame )
11
+ StableFrame .MainHelpButton :Hide ()
12
+ S :HandleButton (StableFrame .StableTogglePetButton )
13
+ S :HandleButton (StableFrame .ReleasePetButton )
14
+
15
+ local StabledPetList = StableFrame .StabledPetList
16
+ StabledPetList :StripTextures ()
17
+ StabledPetList .ListCounter :StripTextures ()
18
+ StabledPetList .ListCounter :CreateBackdrop (' Transparent' )
19
+ S :HandleEditBox (StabledPetList .FilterBar .SearchBox )
20
+ S :HandleButton (StabledPetList .FilterBar .FilterButton )
21
+ S :HandleTrimScrollBar (StabledPetList .ScrollBar )
22
+
23
+ local StableModelScene = StableFrame .PetModelScene
24
+ -- S:HandleButton(StableModelScene.PetInfo.NameBox.EditButton) -- ToDo: 10.2.7: Halp, Fix me
25
+ S :HandleModelSceneControlButtons (StableModelScene .ControlFrame )
72
26
end
73
27
74
- S :AddCallback ( ' PetStableFrame ' )
28
+ S :AddCallbackForAddon ( ' Blizzard_StableUI ' )
0 commit comments