From 9ee18ebc31b4c28a3bb132aff3ce66d4320cc7f4 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Sat, 9 Oct 2010 10:36:32 +0100 Subject: [PATCH] Added click-set indicator to binding config --- BindConfig.lua | 2 +- Clique.lua | 8 ++++++-- Clique.xml | 5 +++-- Utils.lua | 12 ++++++++++++ 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/BindConfig.lua b/BindConfig.lua index f635060..fae1f59 100755 --- a/BindConfig.lua +++ b/BindConfig.lua @@ -315,7 +315,7 @@ function CliqueConfig:UpdateList() local bind = sort[offsetIndex] row.icon:SetTexture(addon:GetBindingIcon(bind)) row.name:SetText(addon:GetBindingActionText(bind)) - --row.type:SetText(bind.type) + row.info:SetText(addon:GetBindingInfoText(bind)) row.bind:SetText(addon:GetBindingKeyComboText(bind)) row.bindIndex = bindMap[bind] row:Show() diff --git a/Clique.lua b/Clique.lua index 0d56433..d4f5109 100755 --- a/Clique.lua +++ b/Clique.lua @@ -21,10 +21,14 @@ -- overridden by another binding in a more specific click-set. -- * ooc - These bindings will ONLY be active when the player is -- out of combat. --- * harm - These bindings are ONLY active when the unit you are +-- * enemy - These bindings are ONLY active when the unit you are -- clicking on is an enemy, i.e. a unit that you can attack. --- * help - These bindings are ONLY active when the unit you are +-- * friendly - These bindings are ONLY active when the unit you are -- clicking on is a friendly unit, i.e. one that you can assist +-- * glabal - These bindings will be available regardless of where +-- your mouse is on the screen, be it in the 3D world, or over a +-- unit frame. These bindings take up a slot that might otherwise +-- be used in the 'Key Bindings' interface options. -- -- The click-sets layer on each other, with the 'default' click-set -- being at the bottom, and any other click-set being layered on top. diff --git a/Clique.xml b/Clique.xml index 68a26a9..598c5e2 100755 --- a/Clique.xml +++ b/Clique.xml @@ -26,9 +26,9 @@ - + - + @@ -37,6 +37,7 @@ + diff --git a/Utils.lua b/Utils.lua index 124ada4..8797870 100644 --- a/Utils.lua +++ b/Utils.lua @@ -182,3 +182,15 @@ function addon:GetCapturedKey(key) return tostring(prefix) .. tostring(key) end +function addon:GetBindingInfoText(binding) + local sets = binding.sets + if not sets then + return "" + else + local bits = {} + for k,v in pairs(sets) do + table.insert(bits, k) + end + return table.concat(bits, ", ") + end +end -- 1.7.9.5