Added click-set indicator to binding config
James Whitehead II [10-09-10 - 09:36]
Added click-set indicator to binding config
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 @@
</Anchor>
</Anchors>
</FontString>
- <FontString name="$parentInfo" parentKey="type" inherits="GameFontDarkGraySmall" justifyH="LEFT" text="Spell">
+ <FontString name="$parentInfo" parentKey="info" inherits="GameFontNormalSmall" justifyH="LEFT" text="Spell">
<Size>
- <AbsDimension x="40" y="12"/>
+ <AbsDimension x="175" y="12"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentName" relativePoint="BOTTOMLEFT">
@@ -37,6 +37,7 @@
</Offset>
</Anchor>
</Anchors>
+ <Color r="0.6" g="0.6" b="0.6"/>
</FontString>
<FontString name="$parentBind" parentKey="bind" inherits="GameFontHighlightSmall" justifyH="RIGHT" text="Alt-LeftClick">
<Size>
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