mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-27 18:06:02 +00:00
skin: update spellbook
This commit is contained in:
@@ -2,7 +2,6 @@ pfUI:RegisterModule("skin", function ()
|
||||
-- movable default frames
|
||||
|
||||
EnableMovable("QuestLogFrame")
|
||||
EnableMovable("SpellBookFrame")
|
||||
EnableMovable("GossipFrame")
|
||||
EnableMovable("TradeFrame")
|
||||
EnableMovable("MerchantFrame")
|
||||
|
||||
@@ -1,20 +1,26 @@
|
||||
pfUI:RegisterSkin("Spellbook", function ()
|
||||
pfUI:RegisterSkin("SpellBookFrame", function ()
|
||||
local border = tonumber(pfUI_config.appearance.border.default)
|
||||
local bpad = border > 1 and border - 1 or 1
|
||||
|
||||
StripTextures(SpellBookFrame)
|
||||
CreateBackdrop(SpellBookFrame, nil, nil, .75)
|
||||
SpellBookFrame.backdrop:SetPoint("TOPLEFT", 10, -12)
|
||||
SpellBookFrame.backdrop:SetPoint("BOTTOMRIGHT", -31, 75)
|
||||
SpellBookFrame.backdrop:SetPoint("TOPLEFT", 12, -12)
|
||||
SpellBookFrame.backdrop:SetPoint("BOTTOMRIGHT", -30, 72)
|
||||
SpellBookFrame:SetHitRectInsets(12,30,12,72)
|
||||
EnableMovable(SpellBookFrame)
|
||||
|
||||
SpellBookTitleText:ClearAllPoints()
|
||||
SpellBookTitleText:SetPoint("TOP", SpellBookFrame.backdrop, "TOP", 0, -10)
|
||||
|
||||
SpellBookFrameTabButton1:ClearAllPoints()
|
||||
SpellBookFrameTabButton1:SetPoint("TOPLEFT", SpellBookFrame.backdrop, "BOTTOMLEFT", bpad, -(border + (border == 1 and 1 or 2)))
|
||||
for i=1,3 do
|
||||
for i=1, 3 do
|
||||
local tab = _G["SpellBookFrameTabButton"..i]
|
||||
local lastTab = _G["SpellBookFrameTabButton"..(i-1)]
|
||||
tab:SetPoint("LEFT", lastTab, "RIGHT", border*2 + 1, 0)
|
||||
|
||||
tab:GetNormalTexture():SetTexture("")
|
||||
tab:GetDisabledTexture():SetTexture("")
|
||||
if lastTab then
|
||||
tab:ClearAllPoints()
|
||||
tab:SetPoint("LEFT", lastTab, "RIGHT", border*2 + 1, 0)
|
||||
end
|
||||
SkinTab(tab)
|
||||
end
|
||||
|
||||
@@ -23,24 +29,14 @@ pfUI:RegisterSkin("Spellbook", function ()
|
||||
local texture = _G["SpellButton"..i.."IconTexture"]
|
||||
|
||||
StripTextures(button)
|
||||
CreateBackdrop(button)
|
||||
SkinButton(button, nil, nil, nil, texture)
|
||||
|
||||
_G["SpellButton"..i.."SubSpellName"]:SetTextColor(1, 1, 1)
|
||||
_G["SpellButton"..i.."AutoCastable"]:SetTexture("Interface\\Buttons\\UI-AutoCastableOverlay")
|
||||
|
||||
texture:SetPoint("TOPLEFT", button, "TOPLEFT", 4, -4)
|
||||
texture:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -4, 4)
|
||||
texture:SetTexCoord(.1,.9,.1,.9)
|
||||
|
||||
button.backdrop:SetPoint("TOPLEFT", button, "TOPLEFT", 2, -2)
|
||||
button.backdrop:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 2)
|
||||
_G["SpellButton"..i.."Highlight"]:SetTexture("")
|
||||
_G["SpellButton"..i.."Highlight"].SetTexture = function(self, tex) return end
|
||||
end
|
||||
|
||||
hooksecurefunc("SpellButton_UpdateButton", function()
|
||||
local name = this:GetName()
|
||||
_G[name.."SubSpellName"]:SetTextColor(1, 1, 1)
|
||||
_G[name.."Highlight"]:SetTexture(1, 1, 1, 0.3)
|
||||
end)
|
||||
|
||||
SpellBookSkillLineTab1:ClearAllPoints()
|
||||
SpellBookSkillLineTab1:SetPoint("TOPLEFT", SpellBookFrame.backdrop, "TOPRIGHT", border + (border == 1 and 1 or 2), -30)
|
||||
for i = 1, MAX_SKILLLINE_TABS do
|
||||
@@ -49,8 +45,9 @@ pfUI:RegisterSkin("Spellbook", function ()
|
||||
local texture = _G["SpellBookSkillLineTab"..i]:GetNormalTexture()
|
||||
|
||||
StripTextures(button)
|
||||
CreateBackdrop(button)
|
||||
SkinButton(button, nil, nil, nil, texture)
|
||||
|
||||
button:SetScale(1.1)
|
||||
texture:SetTexCoord(.07,.93,.07,.93)
|
||||
|
||||
if lastbutton then
|
||||
@@ -60,21 +57,18 @@ pfUI:RegisterSkin("Spellbook", function ()
|
||||
|
||||
function button.SetChecked(self, checked)
|
||||
if checked then
|
||||
self.backdrop:SetBackdropBorderColor(1,1,1)
|
||||
self.locked = true
|
||||
self:SetBackdropBorderColor(1,1,1)
|
||||
else
|
||||
CreateBackdrop(self)
|
||||
self.locked = false
|
||||
self:SetBackdropBorderColor(GetStringColor(pfUI_config.appearance.border.color))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
SkinArrowButton(SpellBookPrevPageButton, "left")
|
||||
SpellBookPrevPageButton:SetWidth(18)
|
||||
SpellBookPrevPageButton:SetHeight(18)
|
||||
SkinArrowButton(SpellBookPrevPageButton, "left", 18)
|
||||
SkinArrowButton(SpellBookNextPageButton, "right", 18)
|
||||
|
||||
SkinArrowButton(SpellBookNextPageButton, "right")
|
||||
SpellBookNextPageButton:SetWidth(18)
|
||||
SpellBookNextPageButton:SetHeight(18)
|
||||
|
||||
SkinCloseButton(SpellBookCloseButton)
|
||||
SkinCloseButton(SpellBookCloseButton, SpellBookFrame.backdrop, -6, -6)
|
||||
SpellBookPageText:SetTextColor(1, 1, 1)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user