Quantcast

Add a notice when binding mode is active

James Whitehead II [10-15-10 - 20:08]
Add a notice when binding mode is active
Filename
AddonCore.lua
Babelfish.lua
BindConfig.lua
Clique.xml
Localization.enUS.lua
diff --git a/AddonCore.lua b/AddonCore.lua
index c3260d9..53857e5 100644
--- a/AddonCore.lua
+++ b/AddonCore.lua
@@ -83,7 +83,7 @@ addon.L = addon.L or setmetatable({}, {
 function addon:RegisterLocale(locale, tbl)
     if locale == "enUS" or locale == GetLocale() then
         for k,v in pairs(tbl) do
-            L[k] = v
+            self.L[k] = v
         end
     end
 end
diff --git a/Babelfish.lua b/Babelfish.lua
new file mode 100644
index 0000000..f5ea4f9
--- /dev/null
+++ b/Babelfish.lua
@@ -0,0 +1,29 @@
+#!/usr/local/bin/lua
+
+local strings = {}
+
+for i=1,#arg do
+    if arg[i] ~= arg[0] then
+        local file = io.open(arg[i], "r")
+
+        assert(file, "Could not open " .. arg[i])
+        local text = file:read("*all")
+
+        for match in string.gmatch(text, "L%[\"(.-)\"%]") do
+            strings[match] = true
+        end
+    end
+end
+
+local work = {}
+
+for k,v in pairs(strings) do table.insert(work, k) end
+table.sort(work)
+
+print("local addonName, addon = ...")
+print("local baseLocale = {")
+for idx,match in ipairs(work) do
+	print(string.format("\t[\"%s\"] = \"%s\",", match, match))
+end
+print("}\n")
+print("addon:RegisterLocale('enUS', baseLocale)")
diff --git a/BindConfig.lua b/BindConfig.lua
index f16a10a..4c0fec4 100755
--- a/BindConfig.lua
+++ b/BindConfig.lua
@@ -73,6 +73,8 @@ function CliqueConfig:SetupGUI()

     self.alert = _G["CliqueTabAlert"]

+    self.bindAlert.text:SetText(L["You are in Clique binding mode"])
+
     self.close = _G[self:GetName() .. "CloseButton"]
     self.close:SetScript("OnClick", function()
         HideUIPanel(CliqueConfig)
diff --git a/Clique.xml b/Clique.xml
index c0c4ff8..061e120 100755
--- a/Clique.xml
+++ b/Clique.xml
@@ -114,14 +114,6 @@
                 end
             </OnMouseWheel>
         </Scripts>
-        <NormalTexture file="Interface\BUTTONS/GLOWSTAR">
-            <Size x="16" y="16"/>
-            <Anchors>
-                <Anchor point="BOTTOMRIGHT">
-                    <Offset x="-3" y="3"/>
-                </Anchor>
-            </Anchors>
-        </NormalTexture>
         <HighlightTexture file="Interface\BUTTONS\ButtonHilight-Square" alphaMode="ADD"/>
     </Button>

@@ -151,7 +143,7 @@
         </Anchors>
         <Layers>
             <Layer level="OVERLAY">
-                <FontString name="$parentText" parentKey="text" inherits="GameFontHighlightLeft" justifyV="TOP" text="TALENT_MICRO_BUTTON_TUTORIAL" >
+                <FontString name="$parentText" parentKey="text" inherits="GameFontHighlightLeft" justifyV="TOP" text="" >
                     <Size x="188" y="0"/>
                     <Anchors>
                         <Anchor point="TOPLEFT" x="16" y="-24"/>
@@ -548,6 +540,36 @@
                     </Button>
                  </Frames>
             </Frame> <!-- Page 3 - Macro Edit Page -->
+
+            <!-- Alert above the spellbook to show we're in binding mode -->
+            <Frame name="CliqueConfigBindAlert" parentKey="bindAlert" inherits="GlowBoxTemplate" hidden="false" frameStrata="DIALOG" framelevel="2">
+                <Size x="220" y="43"/>
+                <Anchors>
+                    <Anchor point="BOTTOMLEFT" relativeTo="SpellButton1" relativePoint="TOP" x="-40" y="25"/>
+                </Anchors>
+                <Layers>
+                    <Layer level="OVERLAY">
+                        <FontString name="$parentText" parentKey="text" inherits="GameFontHighlightLeft" justifyV="TOP" text="" >
+                            <Size x="230" y="0"/>
+                            <Anchors>
+                                <Anchor point="TOPLEFT" x="16" y="-15"/>
+                            </Anchors>
+                        </FontString>
+                    </Layer>
+                </Layers>
+                <Frames>
+                    <Frame name="$parentArrow" parentKey="arrow" inherits="GlowBoxArrowTemplate">
+                        <Anchors>
+                            <Anchor point="TOP" relativePoint="BOTTOMLEFT" x="40" y="1"/>
+                        </Anchors>
+                    </Frame>
+                </Frames>
+                <Scripts>
+                    <OnLoad>
+                        self.text:SetSpacing(4)
+                    </OnLoad>
+                </Scripts>
+            </Frame> <!-- End bindAlert -->
         </Frames>
         <Scripts>
             <OnLoad>
diff --git a/Localization.enUS.lua b/Localization.enUS.lua
index 85879d1..778b992 100644
--- a/Localization.enUS.lua
+++ b/Localization.enUS.lua
@@ -1 +1,99 @@
--- This localization file is empty, and will be automatically generated
+local addonName, addon = ...
+local baseLocale = {
+	["A binding that belongs to the 'default' binding-set will always be active on your unit frames, unless you override it with another binding."] = "A binding that belongs to the 'default' binding-set will always be active on your unit frames, unless you override it with another binding.",
+	["A binding that belongs to the 'enemy' binding-set will always be active when clicking on unit frames that display enemy units, i.e. those you can attack. If you click on a unit that you cannot attack, nothing will happen."] = "A binding that belongs to the 'enemy' binding-set will always be active when clicking on unit frames that display enemy units, i.e. those you can attack. If you click on a unit that you cannot attack, nothing will happen.",
+	["A binding that belongs to the 'frield' binding-set will only be active when clicking on unit frames that display friendly units, i.e. those you can heal and assist. If you click on a unit that you cannot heal or assist, nothing will happen."] = "A binding that belongs to the 'frield' binding-set will only be active when clicking on unit frames that display friendly units, i.e. those you can heal and assist. If you click on a unit that you cannot heal or assist, nothing will happen.",
+	["A binding that belongs to the 'global' binding-set is always active. If the spell requires a target, you will be given the 'casting hand', otherwise the spell will be cast. If the spell is an AOE spell, then you will be given the ground targeting circle."] = "A binding that belongs to the 'global' binding-set is always active. If the spell requires a target, you will be given the 'casting hand', otherwise the spell will be cast. If the spell is an AOE spell, then you will be given the ground targeting circle.",
+	["A binding that belongs to the 'hovercast' binding-set is active whenever the mouse is over a unit frame, or a character in the 3D world. This allows you to use 'hovercasting', where you hover over a unit in the world and press a key to cast a spell on them. THese bindings are also active over unit frames."] = "A binding that belongs to the 'hovercast' binding-set is active whenever the mouse is over a unit frame, or a character in the 3D world. This allows you to use 'hovercasting', where you hover over a unit in the world and press a key to cast a spell on them. THese bindings are also active over unit frames.",
+	["A binding that belongs to the 'ooc' binding-set will only be active when the player is out-of-combat. As soon as the player enters combat, these bindings will no longer be active, so be careful when choosing this binding-set for any spells you use frequently."] = "A binding that belongs to the 'ooc' binding-set will only be active when the player is out-of-combat. As soon as the player enters combat, these bindings will no longer be active, so be careful when choosing this binding-set for any spells you use frequently.",
+	["Accept"] = "Accept",
+	["Action"] = "Action",
+	["Add new profile"] = "Add new profile",
+	["Alt"] = "Alt",
+	["Arena enemy frames"] = "Arena enemy frames",
+	["Bind other"] = "Bind other",
+	["Bind spell"] = "Bind spell",
+	["Binding"] = "Binding",
+	["Boss target frames"] = "Boss target frames",
+	["Cancel"] = "Cancel",
+	["Cast %s"] = "Cast %s",
+	["Change binding"] = "Change binding",
+	["Change binding: %s"] = "Change binding: %s",
+	["Clique Binding Configuration"] = "Clique Binding Configuration",
+	["Clique binding configuration"] = "Clique binding configuration",
+	["Clique: 'default' binding-set"] = "Clique: 'default' binding-set",
+	["Clique: 'enemy' binding-set"] = "Clique: 'enemy' binding-set",
+	["Clique: 'friend' binding-set"] = "Clique: 'friend' binding-set",
+	["Clique: 'global' binding-set"] = "Clique: 'global' binding-set",
+	["Clique: 'hovercast' binding-set"] = "Clique: 'hovercast' binding-set",
+	["Clique: 'ooc' binding-set"] = "Clique: 'ooc' binding-set",
+	["Compact party frames"] = "Compact party frames",
+	["Compact raid frames"] = "Compact raid frames",
+	["Configure binding: '%s'"] = "Configure binding: '%s'",
+	["Ctrl"] = "Ctrl",
+	["Current: "] = "Current: ",
+	["Default"] = "Default",
+	["Delete binding"] = "Delete binding",
+	["Delete profile '%s'"] = "Delete profile '%s'",
+	["Delete profile: %s"] = "Delete profile: %s",
+	["Disable out of combat clicks when party members enter combat"] = "Disable out of combat clicks when party members enter combat",
+	["Edit macro"] = "Edit macro",
+	["Enable/Disable binding-sets"] = "Enable/Disable binding-sets",
+	["Enemy"] = "Enemy",
+	["Frame name"] = "Frame name",
+	["Friend"] = "Friend",
+	["Global bindings (no target)"] = "Global bindings (no target)",
+	["Hovercast bindings (target required)"] = "Hovercast bindings (target required)",
+	["In order to specify a binding, move your mouse over the button labelled 'Set binding' and either click with your mouse or press a key on your keyboard. You can modify the binding by holding down a combination of the alt, control and shift keys on your keyboard."] = "In order to specify a binding, move your mouse over the button labelled 'Set binding' and either click with your mouse or press a key on your keyboard. You can modify the binding by holding down a combination of the alt, control and shift keys on your keyboard.",
+	["LAlt"] = "LAlt",
+	["LCtrl"] = "LCtrl",
+	["LShift"] = "LShift",
+	["LeftButton"] = "LeftButton",
+	["MiddleButton"] = "MiddleButton",
+	["MousewheelDown"] = "MousewheelDown",
+	["MousewheelUp"] = "MousewheelUp",
+	["No binding set"] = "No binding set",
+	["Open unit menu"] = "Open unit menu",
+	["Options"] = "Options",
+	["Out-of-combat only"] = "Out-of-combat only",
+	["Party member frames"] = "Party member frames",
+	["Player frame"] = "Player frame",
+	["Player's focus frame"] = "Player's focus frame",
+	["Player's pet frame"] = "Player's pet frame",
+	["Player's target frame"] = "Player's target frame",
+	["Primary talent spec profile:"] = "Primary talent spec profile:",
+	["Profile Management:"] = "Profile Management:",
+	["RAlt"] = "RAlt",
+	["RCtrl"] = "RCtrl",
+	["RShift"] = "RShift",
+	["RightButton"] = "RightButton",
+	["Run custom macro"] = "Run custom macro",
+	["Run macro"] = "Run macro",
+	["Run macro '%s'"] = "Run macro '%s'",
+	["Save"] = "Save",
+	["Secondary talent spec profile:"] = "Secondary talent spec profile:",
+	["Select All"] = "Select All",
+	["Select None"] = "Select None",
+	["Select a binding type"] = "Select a binding type",
+	["Select profile: %s"] = "Select profile: %s",
+	["Set binding"] = "Set binding",
+	["Set binding: %s"] = "Set binding: %s",
+	["Shift"] = "Shift",
+	["Show unit menu"] = "Show unit menu",
+	["Swap profiles based on talent spec"] = "Swap profiles based on talent spec",
+	["Target clicked unit"] = "Target clicked unit",
+	["Target of focus frame"] = "Target of focus frame",
+	["Target of target frame"] = "Target of target frame",
+	["These options control whether or not Clique auotmatically registers certain Blizzard-created frames for binding. Changes made to these settings will not take effect until the user interface is reloaded."] = "These options control whether or not Clique auotmatically registers certain Blizzard-created frames for binding. Changes made to these settings will not take effect until the user interface is reloaded.",
+	["This binding is DISABLED"] = "This binding is DISABLED",
+	["This binding is invalid, please delete"] = "This binding is invalid, please delete",
+	["This panel allows you to blacklist certain frames from being included for Clique bindings. Any frames that are selected in this list will not be registered, although you may have to reload your user interface to have them return to their original bindings."] = "This panel allows you to blacklist certain frames from being included for Clique bindings. Any frames that are selected in this list will not be registered, although you may have to reload your user interface to have them return to their original bindings.",
+	["Trigger bindings on the 'down' portion of the click (requires reload)"] = "Trigger bindings on the 'down' portion of the click (requires reload)",
+	["Unknown"] = "Unknown",
+	["Unknown binding type '%s'"] = "Unknown binding type '%s'",
+	["When both the Clique binding configuration window and the spellbook are open, you can set new bindings simply by performing them on the spell icon in your spellbook. Simply move your mouse over a spell and then click or press a key on your keyboard along with any combination of the alt, control, and shift keys. The new binding will be added to your binding configuration."] = "When both the Clique binding configuration window and the spellbook are open, you can set new bindings simply by performing them on the spell icon in your spellbook. Simply move your mouse over a spell and then click or press a key on your keyboard along with any combination of the alt, control, and shift keys. The new binding will be added to your binding configuration.",
+	["You are in Clique binding mode"] = "You are in Clique binding mode",
+	["You can use this page to create a custom macro to be run when activating a binding on a unit. When creating this macro you should keep in mind that you will need to specify the target of any actions in the macro by using the 'mouseover' unit, which is the unit you are clicking on. For example, you can do any of the following:\n\n/cast [target=mouseover] Regrowth\n/cast [@mouseover] Regrowth\n/cast [@mouseovertarget] Taunt\n\nHover over the 'Set binding' button below and either click or press a key with any modifiers you would like included. Then edit the box below to contain the macro you would like to have run when this binding is activated."] = "You can use this page to create a custom macro to be run when activating a binding on a unit. When creating this macro you should keep in mind that you will need to specify the target of any actions in the macro by using the 'mouseover' unit, which is the unit you are clicking on. For example, you can do any of the following:\n\n/cast [target=mouseover] Regrowth\n/cast [@mouseover] Regrowth\n/cast [@mouseovertarget] Taunt\n\nHover over the 'Set binding' button below and either click or press a key with any modifiers you would like included. Then edit the box below to contain the macro you would like to have run when this binding is activated.",
+}
+
+addon:RegisterLocale('enUS', baseLocale)