changeset 2:08c83fa555a5

Updated the popup strings
author madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09
date Wed, 23 May 2012 10:58:25 +0000
parents a4e2eaf9cad9
children 461854a2849c
files Localisation.lua OptionPage.xml OptionView.lua
diffstat 3 files changed, 28 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/Localisation.lua	Wed May 23 08:26:07 2012 +0000
+++ b/Localisation.lua	Wed May 23 10:58:25 2012 +0000
@@ -368,7 +368,14 @@
 		MouseRow6Name="Hat Bottom",
 		MouseRow9Name="Button 1",
 		MouseRowBName="Button 3",
-		MouseRowAName="Back Button"
+		MouseRowAName="Back Button",
+		MouseRow12Name="Thumb Anticlockwise",
+		MouseRow13Name="Thumb Clockwise",
+		MouseRow11Name="Button 3",
+		MouseRow10Name="Back Button",
+		BindingFrameHeaderText="Please press the appropriate button",
+		BindingFrameExitButton="Close",
+		CurrentBinding="Current Binding",
 	},
 	["frFR"] = {
 		CyborgButtonTitle="Bouton Cyborg",
--- a/OptionPage.xml	Wed May 23 08:26:07 2012 +0000
+++ b/OptionPage.xml	Wed May 23 10:58:25 2012 +0000
@@ -575,7 +575,7 @@
       <Layer level="ARTWORK">
         <Texture name="$parentHeader" file="Interface\DialogFrame\UI-DialogBox-Header">
           <Size>
-            <AbsDimension x="200" y="64"/>
+            <AbsDimension x="500" y="64"/>
           </Size>
           <Anchors>
             <Anchor point="TOP">
@@ -587,7 +587,7 @@
         </Texture>
         <FontString name="$parentHeaderText" inherits="GameFontNormal" text="FillerText">
           <Size>
-            <AbsDimension x="200" y="13"/>
+            <AbsDimension x="500" y="13"/>
           </Size>
           <Anchors>
             <Anchor point="TOP" relativeTo="$parentHeader">
@@ -597,7 +597,7 @@
             </Anchor>
           </Anchors>
         </FontString>
-        <FontString inherits="GameFontNormal" text="BINDPAD_TEXT_PRESSKEY">
+        <FontString inherits="GameFontNormalLarge" name="$parentButtonName" text="Button Name">
           <Anchors>
             <Anchor point="CENTER" relativeTo="$parent">
               <Offset>
@@ -606,16 +606,7 @@
             </Anchor>
           </Anchors>
         </FontString>
-        <FontString name="$parentAction" inherits="GameFontNormalLarge" text="no action">
-          <Anchors>
-            <Anchor point="CENTER" relativeTo="$parent">
-              <Offset>
-                <AbsDimension x="0" y="8"/>
-              </Offset>
-            </Anchor>
-          </Anchors>
-        </FontString>
-        <FontString name="$parentKey" inherits="GameFontNormal" text="unbinded">
+        <FontString name="$parentKey" inherits="GameFontNormalLarge" text="KeyText">
           <Anchors>
             <Anchor point="CENTER" relativeTo="$parent">
               <Offset>
@@ -636,7 +627,7 @@
           </Anchor>
         </Anchors>
       </Button>
-      <Button name="$parentExitButton" inherits="UIPanelButtonTemplate" text="BINDPAD_TEXT_EXIT">
+      <Button name="$parentExitButton" inherits="UIPanelButtonTemplate" text="Close">
         <Size>
           <AbsDimension x="80" y="26"/>
         </Size>
@@ -648,28 +639,15 @@
           </Anchor>
         </Anchors>
         <Scripts>
+				<OnLoad>
+					LoadStrings(getglobal("BindingFrameHeaderText"))
+					LoadStrings(getglobal("BindingFrameExitButton"))
+				</OnLoad>
           <OnClick>
             HideUIPanel(self:GetParent());
           </OnClick>
         </Scripts>
       </Button>
-      <Button name="$parentUnbindButton" inherits="UIPanelButtonTemplate" text="BINDPAD_TEXT_UNBIND">
-        <Size>
-          <AbsDimension x="80" y="26"/>
-        </Size>
-        <Anchors>
-          <Anchor point="BOTTOMRIGHT" relativeTo="$parentExitButton" relativePoint="BOTTOMLEFT">
-            <Offset>
-              <AbsDimension x="-2" y="0"/>
-            </Offset>
-          </Anchor>
-        </Anchors>
-        <Scripts>
-          <OnClick>
-            BindPadBindFrame_Unbind(self);
-          </OnClick>
-        </Scripts>
-      </Button>
     </Frames>
 
     <Scripts>
--- a/OptionView.lua	Wed May 23 08:26:07 2012 +0000
+++ b/OptionView.lua	Wed May 23 10:58:25 2012 +0000
@@ -30,7 +30,17 @@
 local lastButton = nil
 
 function BindButton(name)
-	lastButton = name;
+	lastButton = name
+	local index = GetButtonIndex(name)
+	local mode = 1
+	while(index > 13) do
+		mode = mode + 1
+		index = index - 13
+	end
+	local buttonStr =  StringTable[("MouseRow"..index.."Name")]
+	
+	getglobal("BindingFrameButtonName"):SetText(buttonStr.." Mode "..mode)
+	getglobal("BindingFrameKey"):SetText(StringTable["CurrentBinding"].." "..WowCommands[GetButtonIndex(lastButton)])
 	BindingFrame:Show()
 	
 end
@@ -184,27 +194,4 @@
 	 
 	 SetNewKeybind(keyPressed)
 	 
---~    if keyPressed then
---~       BindPadCore.keyPressed = keyPressed
---~       local oldAction = GetBindingAction(keyPressed)
---~       
---~       local keyText = BindPadCore.GetBindingText(keyPressed, "KEY_");
---~       if oldAction~="" and oldAction ~= BindPadCore.selectedSlot.action then
---~ 	 if StaticPopupDialogs["BINDPAD_CONFIRM_BINDING"] == nil then
---~ 	    StaticPopupDialogs["BINDPAD_CONFIRM_BINDING"] = {
---~ 	       button1 = YES,
---~ 	       button2 = NO,
---~ 	       timeout = 0,
---~ 	       hideOnEscape = 1,
---~ 	       OnAccept = BindPadBindFrame_SetBindKey,
---~ 	       OnCancel = BindPadBindFrame_Update,
---~ 	       whileDead = 1
---~ 	    }
---~ 	 end
---~ 	 StaticPopupDialogs["BINDPAD_CONFIRM_BINDING"].text = format(BINDPAD_TEXT_CONFIRM_BINDING, keyText, oldAction, keyText, BindPadCore.selectedSlot.action);
---~ 	 StaticPopup_Show("BINDPAD_CONFIRM_BINDING")
---~       else
---~ 	 BindPadBindFrame_SetBindKey();
---~       end
---~    end
 end