You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.1 KiB

4 years ago
local E, L, V, P, G = unpack(ElvUI)
5 years ago
local S = E:GetModule('Skins')
local _G = _G
local pairs = pairs
local hooksecurefunc = hooksecurefunc
function S:TabardFrame()
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.tabard) then return end
local TabardFrame = _G.TabardFrame
4 years ago
S:HandleFrame(TabardFrame, true, nil, 10, -12, -32, 74)
S:HandleCloseButton(_G.TabardFrameCloseButton)
5 years ago
S:HandleButton(_G.TabardFrameCancelButton)
S:HandleButton(_G.TabardFrameAcceptButton)
S:HandleRotateButton(_G.TabardCharacterModelRotateLeftButton)
S:HandleRotateButton(_G.TabardCharacterModelRotateRightButton)
_G.TabardFrameCostFrame:StripTextures()
_G.TabardFrameCustomizationFrame:StripTextures()
-- Add Tabard Emblem back
5 years ago
local emblemFrames = {
_G.TabardFrameEmblemTopRight,
_G.TabardFrameEmblemBottomRight,
_G.TabardFrameEmblemTopLeft,
_G.TabardFrameEmblemBottomLeft,
}
for _, frame in pairs(emblemFrames) do
frame:SetParent(TabardFrame)
frame.Show = nil
frame:Show()
end
4 years ago
for i = 1, 5 do
5 years ago
local custom = 'TabardFrameCustomization'..i
3 years ago
local button = _G[custom]
button:StripTextures()
5 years ago
S:HandleNextPrevButton(_G[custom..'LeftButton'])
S:HandleNextPrevButton(_G[custom..'RightButton'])
if i > 1 then
3 years ago
button:ClearAllPoints()
button:Point('TOP', _G['TabardFrameCustomization'..i - 1], 'BOTTOM', 0, -6)
5 years ago
else
3 years ago
local point, anchor, point2, x, y = button:GetPoint()
button:Point(point, anchor, point2, x, y+4)
5 years ago
end
end
4 years ago
_G.TabardCharacterModelRotateLeftButton:Point('BOTTOMLEFT', 4, 4)
5 years ago
_G.TabardCharacterModelRotateRightButton:Point('TOPLEFT', _G.TabardCharacterModelRotateLeftButton, 'TOPRIGHT', 4, 0)
4 years ago
hooksecurefunc(_G.TabardCharacterModelRotateLeftButton, 'SetPoint', function(button)
if button._blocked then return end
button._blocked = true
button:Point('BOTTOMLEFT', 4, 4)
button._blocked = nil
5 years ago
end)
4 years ago
hooksecurefunc(_G.TabardCharacterModelRotateRightButton, 'SetPoint', function(button)
if button._blocked then return end
button._blocked = true
button:Point('TOPLEFT', _G.TabardCharacterModelRotateLeftButton, 'TOPRIGHT', 4, 0)
button._blocked = nil
5 years ago
end)
end
S:AddCallback('TabardFrame')