* When a user learns a new spell tab, the Clique button will reposition accordingly.
James Whitehead II [03-24-07 - 23:25]
* When a user learns a new spell tab, the Clique button will reposition accordingly.
diff --git a/Clique.lua b/Clique.lua
index bbb5a3a..7bde352 100644
--- a/Clique.lua
+++ b/Clique.lua
@@ -62,6 +62,8 @@ function Clique:Enable()
self:RegisterEvent("PLAYER_REGEN_ENABLED")
self:RegisterEvent("PLAYER_REGEN_DISABLED")
+ self:RegisterEvent("LEARNED_SPELL_IN_TAB")
+
self:UpdateClicks()
-- Register all frames that snuck in before we did =)
diff --git a/CliqueOptions.lua b/CliqueOptions.lua
index 9ef3786..2e1c9c6 100644
--- a/CliqueOptions.lua
+++ b/CliqueOptions.lua
@@ -57,9 +57,7 @@ function Clique:OptionsOnLoad()
CliquePulloutTab:Show()
- local num = GetNumSpellTabs()
- CliquePulloutTab:ClearAllPoints()
- CliquePulloutTab:SetPoint("TOPLEFT","SpellBookSkillLineTab"..(num),"BOTTOMLEFT",0,-17)
+ self:LEARNED_SPELL_IN_TAB()
-- Hook the container buttons
local containerFunc = function(button)
@@ -118,6 +116,12 @@ function Clique:OptionsOnLoad()
hooksecurefunc("PaperDollItemSlotButton_OnModifiedClick", dollFunc)
end
+function Clique:LEARNED_SPELL_IN_TAB()
+ local num = GetNumSpellTabs()
+ CliquePulloutTab:ClearAllPoints()
+ CliquePulloutTab:SetPoint("TOPLEFT","SpellBookSkillLineTab"..(num),"BOTTOMLEFT",0,-17)
+end
+
function Clique:ToggleSpellBookButtons()
local method = CliqueFrame:IsVisible() and "Show" or "Hide"
local buttons = self.spellbuttons