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.
194 lines
6.0 KiB
194 lines
6.0 KiB
|
1 year ago
|
local E, L, V, P, G = unpack(ElvUI)
|
||
|
|
local S = E:GetModule('Skins')
|
||
|
|
|
||
|
|
local _G = _G
|
||
|
|
local next = next
|
||
|
|
local hooksecurefunc = hooksecurefunc
|
||
|
|
local GetSpellTexture = C_Spell.GetSpellTexture or GetSpellTexture
|
||
|
|
|
||
|
|
--[[
|
||
|
|
To Do: Parchment Remover
|
||
|
|
Monitor it due to changes from Blizz
|
||
|
|
]]
|
||
|
|
|
||
|
|
local function HandleTalentFrameDialog(dialog)
|
||
|
|
if not dialog then return end
|
||
|
|
|
||
|
|
dialog:StripTextures()
|
||
|
|
dialog:CreateBackdrop('Transparent')
|
||
|
|
|
||
|
|
if dialog.AcceptButton then S:HandleButton(dialog.AcceptButton) end
|
||
|
|
if dialog.CancelButton then S:HandleButton(dialog.CancelButton) end
|
||
|
|
if dialog.DeleteButton then S:HandleButton(dialog.DeleteButton) end
|
||
|
|
|
||
|
|
S:HandleEditBox(dialog.NameControl.EditBox)
|
||
|
|
dialog.NameControl.EditBox.backdrop:Point('TOPLEFT', -5, -10)
|
||
|
|
dialog.NameControl.EditBox.backdrop:Point('BOTTOMRIGHT', 5, 10)
|
||
|
|
end
|
||
|
|
|
||
|
|
local function UpdateSpecFrame(frame)
|
||
|
|
if not frame.SpecContentFramePool then return end
|
||
|
|
|
||
|
|
for specContentFrame in frame.SpecContentFramePool:EnumerateActive() do
|
||
|
|
if not specContentFrame.IsSkinned then
|
||
|
|
S:HandleButton(specContentFrame.ActivateButton)
|
||
|
|
|
||
|
|
if specContentFrame.SpellButtonPool then
|
||
|
|
for button in specContentFrame.SpellButtonPool:EnumerateActive() do
|
||
|
|
if button.Ring then
|
||
|
|
button.Ring:Hide()
|
||
|
|
end
|
||
|
|
|
||
|
|
if button.spellID then
|
||
|
|
local texture = GetSpellTexture(button.spellID)
|
||
|
|
if texture then
|
||
|
|
button.Icon:SetTexture(texture)
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|
||
|
|
S:HandleIcon(button.Icon, true)
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|
||
|
|
specContentFrame.IsSkinned = true
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|
||
|
|
local function HandleHeroTalents(frame)
|
||
|
|
if not frame then return end
|
||
|
|
|
||
|
|
for specFrame in frame.SpecContentFramePool:EnumerateActive() do
|
||
|
|
if specFrame and not specFrame.IsSkinned then
|
||
|
|
if specFrame.SpecName then specFrame.SpecName:FontTemplate(nil, 18) end
|
||
|
|
if specFrame.Description then specFrame.Description:FontTemplate(nil, 14) end
|
||
|
|
if specFrame.CurrencyFrame then
|
||
|
|
specFrame.CurrencyFrame.LabelText:FontTemplate()
|
||
|
|
specFrame.CurrencyFrame.AmountText:FontTemplate(nil, 18)
|
||
|
|
end
|
||
|
|
S:HandleButton(specFrame.ActivateButton)
|
||
|
|
S:HandleButton(specFrame.ApplyChangesButton)
|
||
|
|
|
||
|
|
specFrame.IsSkinned = true
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|
||
|
|
function S:Blizzard_PlayerSpells()
|
||
|
|
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.talent) then return end
|
||
|
|
|
||
|
|
local PlayerSpellsFrame = _G.PlayerSpellsFrame
|
||
|
|
S:HandlePortraitFrame(PlayerSpellsFrame)
|
||
|
|
|
||
|
|
-- Specialisation
|
||
|
|
hooksecurefunc(PlayerSpellsFrame.SpecFrame, 'UpdateSpecFrame', UpdateSpecFrame)
|
||
|
|
|
||
|
|
-- TalentsFrame
|
||
|
|
local TalentsFrame = PlayerSpellsFrame.TalentsFrame
|
||
|
|
TalentsFrame.BlackBG:SetAlpha(0)
|
||
|
|
TalentsFrame.BottomBar:SetAlpha(0)
|
||
|
|
|
||
|
|
S:HandleButton(TalentsFrame.ApplyButton)
|
||
|
|
S:HandleDropDownBox(TalentsFrame.LoadSystem.Dropdown)
|
||
|
|
|
||
|
|
S:HandleButton(TalentsFrame.InspectCopyButton)
|
||
|
|
|
||
|
|
TalentsFrame.ClassCurrencyDisplay.CurrencyLabel:FontTemplate(nil, 18)
|
||
|
|
TalentsFrame.ClassCurrencyDisplay.CurrencyAmount:FontTemplate(nil, 26)
|
||
|
|
|
||
|
|
TalentsFrame.SpecCurrencyDisplay.CurrencyLabel:FontTemplate(nil, 18)
|
||
|
|
TalentsFrame.SpecCurrencyDisplay.CurrencyAmount:FontTemplate(nil, 26)
|
||
|
|
|
||
|
|
S:HandleEditBox(TalentsFrame.SearchBox)
|
||
|
|
TalentsFrame.SearchBox.backdrop:Point('TOPLEFT', -4, -5)
|
||
|
|
TalentsFrame.SearchBox.backdrop:Point('BOTTOMRIGHT', 0, 5)
|
||
|
|
TalentsFrame.SearchPreviewContainer:StripTextures()
|
||
|
|
TalentsFrame.SearchPreviewContainer:CreateBackdrop('Transparent')
|
||
|
|
|
||
|
|
TalentsFrame.PvPTalentList:StripTextures()
|
||
|
|
TalentsFrame.PvPTalentList:CreateBackdrop()
|
||
|
|
TalentsFrame.PvPTalentList.backdrop:SetFrameStrata(PlayerSpellsFrame.TalentsFrame.PvPTalentList:GetFrameStrata())
|
||
|
|
TalentsFrame.PvPTalentList.backdrop:SetFrameLevel(2000)
|
||
|
|
|
||
|
|
for _, tab in next, { PlayerSpellsFrame.TabSystem:GetChildren() } do
|
||
|
|
S:HandleTab(tab)
|
||
|
|
end
|
||
|
|
|
||
|
|
PlayerSpellsFrame.TabSystem:ClearAllPoints()
|
||
|
|
PlayerSpellsFrame.TabSystem:Point('TOPLEFT', PlayerSpellsFrame, 'BOTTOMLEFT', -3, 0)
|
||
|
|
|
||
|
|
local ImportDialog = _G.ClassTalentLoadoutImportDialog
|
||
|
|
if ImportDialog then
|
||
|
|
HandleTalentFrameDialog(ImportDialog)
|
||
|
|
ImportDialog.ImportControl.InputContainer:StripTextures()
|
||
|
|
ImportDialog.ImportControl.InputContainer:CreateBackdrop('Transparent')
|
||
|
|
end
|
||
|
|
|
||
|
|
local CreateDialog = _G.ClassTalentLoadoutCreateDialog
|
||
|
|
if CreateDialog then
|
||
|
|
HandleTalentFrameDialog(CreateDialog)
|
||
|
|
end
|
||
|
|
|
||
|
|
local EditDialog = _G.ClassTalentLoadoutEditDialog
|
||
|
|
if EditDialog then
|
||
|
|
HandleTalentFrameDialog(EditDialog)
|
||
|
|
|
||
|
|
local editbox = EditDialog.LoadoutName
|
||
|
|
if editbox then
|
||
|
|
S:HandleEditBox(editbox)
|
||
|
|
editbox.backdrop:Point('TOPLEFT', -5, -5)
|
||
|
|
editbox.backdrop:Point('BOTTOMRIGHT', 5, 5)
|
||
|
|
end
|
||
|
|
|
||
|
|
local check = EditDialog.UsesSharedActionBars
|
||
|
|
if check then
|
||
|
|
S:HandleCheckBox(check.CheckButton)
|
||
|
|
check.CheckButton:Size(20)
|
||
|
|
check.CheckButton.backdrop:SetInside()
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|
||
|
|
-- Hero Talents
|
||
|
|
local HeroTalentContainer = TalentsFrame.HeroTalentsContainer
|
||
|
|
HeroTalentContainer.HeroSpecLabel:FontTemplate(nil, 16)
|
||
|
|
|
||
|
|
local TalentsSelect = _G.HeroTalentsSelectionDialog
|
||
|
|
if TalentsSelect then
|
||
|
|
TalentsSelect:StripTextures()
|
||
|
|
TalentsSelect:SetTemplate()
|
||
|
|
S:HandleCloseButton(TalentsSelect.CloseButton)
|
||
|
|
|
||
|
|
hooksecurefunc(TalentsSelect, 'ShowDialog', HandleHeroTalents)
|
||
|
|
end
|
||
|
|
|
||
|
|
-- SpellBook
|
||
|
|
local SpellBookFrame = PlayerSpellsFrame.SpellBookFrame
|
||
|
|
if SpellBookFrame then
|
||
|
|
SpellBookFrame.TopBar:Hide()
|
||
|
|
SpellBookFrame.BookCornerFlipbook:Hide()
|
||
|
|
S:HandleMaxMinFrame(PlayerSpellsFrame.MaxMinButtonFrame)
|
||
|
|
S:HandleEditBox(SpellBookFrame.SearchBox)
|
||
|
|
S:HandleCheckBox(SpellBookFrame.HidePassivesCheckButton.Button)
|
||
|
|
|
||
|
|
if E.global.general.disableTutorialButtons then
|
||
|
|
SpellBookFrame.HelpPlateButton:Kill()
|
||
|
|
else
|
||
|
|
SpellBookFrame.HelpPlateButton.Ring:Hide()
|
||
|
|
end
|
||
|
|
|
||
|
|
for _, tab in next, { SpellBookFrame.CategoryTabSystem:GetChildren() } do
|
||
|
|
S:HandleTab(tab)
|
||
|
|
end
|
||
|
|
|
||
|
|
local PagedSpellsFrame = PlayerSpellsFrame.SpellBookFrame.PagedSpellsFrame
|
||
|
|
PagedSpellsFrame.View1:DisableDrawLayer('OVERLAY')
|
||
|
|
|
||
|
|
local PagingControls = PlayerSpellsFrame.SpellBookFrame.PagedSpellsFrame.PagingControls
|
||
|
|
S:HandleNextPrevButton(PagingControls.PrevPageButton, nil, nil, true)
|
||
|
|
S:HandleNextPrevButton(PagingControls.NextPageButton, nil, nil, true)
|
||
|
|
PagingControls.PageText:SetTextColor(1, 1, 1)
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|
||
|
|
S:AddCallbackForAddon('Blizzard_PlayerSpells')
|