Skip to content

Commit 9a4072c

Browse files
committed
CharacterFrame updates
1 parent 44b2a47 commit 9a4072c

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

ElvUI/Cata/Modules/Skins/Character.lua

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ function S:CharacterFrame()
233233
'CharacterFrameInsetRight',
234234
'PaperDollSidebarTabs',
235235
'PetModelFrame',
236-
'PetModelFrameShadowOverlay',
236+
'PetModelFrameShadowOverlay'
237237
}
238238

239239
-- Icon in upper right corner of character frame
@@ -290,6 +290,12 @@ function S:CharacterFrame()
290290
end
291291
end)
292292

293+
-- Item Quality Borders and Armor Slots
294+
local CharacterMainHandSlot = _G.CharacterMainHandSlot
295+
CharacterMainHandSlot:ClearAllPoints()
296+
CharacterMainHandSlot:Point('BOTTOMLEFT', _G.PaperDollItemsFrame, 'BOTTOMLEFT', 106, 10)
297+
-- TODO add item quality borders for each slot
298+
293299
-- Icon selection frame
294300
_G.GearManagerPopupFrame:HookScript('OnShow', function(frame)
295301
if frame.isSkinned then return end -- set by HandleIconSelectionFrame
@@ -326,7 +332,33 @@ function S:CharacterFrame()
326332
end)
327333

328334
-- Expand Button
329-
-- TODO
335+
local CharacterFrameExpandButton = _G.CharacterFrameExpandButton
336+
S:HandleNextPrevButton(CharacterFrameExpandButton, nil, nil, nil, nil, nil, 28) -- Default UI button size is 32
337+
338+
CharacterFrameExpandButton:SetNormalTexture(E.Media.Textures.ArrowUp)
339+
CharacterFrameExpandButton.SetNormalTexture = E.noop
340+
CharacterFrameExpandButton:SetPushedTexture(E.Media.Textures.ArrowUp)
341+
CharacterFrameExpandButton.SetPushedTexture = E.noop
342+
CharacterFrameExpandButton:SetDisabledTexture(E.Media.Textures.ArrowUp)
343+
CharacterFrameExpandButton.SetDisabledTexture = E.noop
344+
345+
local expandButtonNormal, expandButtonPushed = CharacterFrameExpandButton:GetNormalTexture(), CharacterFrameExpandButton:GetPushedTexture()
346+
local expandButtonCvar = GetCVar('characterFrameCollapsed') ~= '0'
347+
expandButtonNormal:SetRotation(expandButtonCvar and -1.57 or 1.57)
348+
expandButtonPushed:SetRotation(expandButtonCvar and -1.57 or 1.57)
349+
350+
-- Not sure if there is a better method to hook Mixin funcs
351+
local function HookCollapseExpand(self)
352+
hooksecurefunc(self, 'Collapse', function()
353+
expandButtonNormal:SetRotation(-1.57)
354+
expandButtonPushed:SetRotation(-1.57)
355+
end)
356+
hooksecurefunc(self, 'Expand', function()
357+
expandButtonNormal:SetRotation(1.57)
358+
expandButtonPushed:SetRotation(1.57)
359+
end)
360+
end
361+
HookCollapseExpand(CharacterFrame)
330362

331363
-- Pet Frame
332364
S:HandleStatusBar(_G.PetPaperDollFrameExpBar)

0 commit comments

Comments
 (0)