* Fixed logic so you can assign clicks on PTR
James Whitehead II [05-20-07 - 14:51]
* Fixed logic so you can assign clicks on PTR
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