From 07c9cc25a2058dba9b1f693fa243e85feacfac61 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Sat, 24 Mar 2007 23:25:28 +0000 Subject: [PATCH] * When a user learns a new spell tab, the Clique button will reposition accordingly. --- Clique.lua | 2 ++ CliqueOptions.lua | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) 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 -- 1.7.9.5