From fe9d3fa0c2aa05798577ffb559af5f7f002415c4 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Sun, 20 May 2007 14:51:55 +0000 Subject: [PATCH] * Fixed logic so you can assign clicks on PTR --- Clique.lua | 9 ++++----- CliqueOptions.lua | 2 +- CliqueUtils.lua | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Clique.lua b/Clique.lua index 1914922..7180019 100644 --- a/Clique.lua +++ b/Clique.lua @@ -163,7 +163,7 @@ function Clique:EnableFrames() end end -function Clique:SpellBookButtonPressed() +function Clique:SpellBookButtonPressed(frame, button) local id = SpellBook_GetSpellID(this:GetParent():GetID()); local texture = GetSpellTexture(id, SpellBookFrame.bookType) local name, rank = GetSpellName(id, SpellBookFrame.bookType) @@ -177,14 +177,13 @@ function Clique:SpellBookButtonPressed() end local type = "spell" - local button if self.editSet == self.clicksets[L.CLICKSET_HARMFUL] then - button = string.format("%s%d", "harmbutton", self:GetButtonNumber()) + button = string.format("%s%d", "harmbutton", self:GetButtonNumber(button)) elseif self.editSet == self.clicksets[L.CLICKSET_HELPFUL] then - button = string.format("%s%d", "helpbutton", self:GetButtonNumber()) + button = string.format("%s%d", "helpbutton", self:GetButtonNumber(button)) else - button = self:GetButtonNumber() + button = self:GetButtonNumber(button) end -- Build the structure diff --git a/CliqueOptions.lua b/CliqueOptions.lua index 7368485..645434e 100644 --- a/CliqueOptions.lua +++ b/CliqueOptions.lua @@ -7,7 +7,7 @@ local work = {} function Clique:OptionsOnLoad() -- Create a set of buttons to hook the SpellbookFrame self.spellbuttons = {} - local onclick = function() Clique:SpellBookButtonPressed() end + local onclick = function(frame, button) Clique:SpellBookButtonPressed(frame, button) end local onleave = function() this.updateTooltip = nil GameTooltip:Hide() diff --git a/CliqueUtils.lua b/CliqueUtils.lua index c0c14e3..d84a5f3 100644 --- a/CliqueUtils.lua +++ b/CliqueUtils.lua @@ -27,7 +27,8 @@ function Clique:GetModifierText() return modifier end -function Clique:GetButtonNumber() +function Clique:GetButtonNumber(button) + Clique:Print("GetButtonNumber", button) if not button then return "" end return buttonMap[arg1] or "" end -- 1.7.9.5