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