diff classes/ReBound.xml @ 7:f920db5fc6b1

version 0.3
author Flick <flickerstreak@gmail.com>
date Tue, 20 Mar 2007 21:25:29 +0000
parents 27aeec452e7f
children
line wrap: on
line diff
--- a/classes/ReBound.xml	Tue Mar 20 21:20:20 2007 +0000
+++ b/classes/ReBound.xml	Tue Mar 20 21:25:29 2007 +0000
@@ -3,7 +3,7 @@
   xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
 
 
-  <Button name="ReBinderClickBindingTemplate" virtual="true" hidden="true" toplevel="true" setAllPoints="true">
+  <Button name="ReBoundClickBindingTemplate" virtual="true" hidden="true" toplevel="true" setAllPoints="true">
 		<HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
     <Layers>
       <Layer level="BACKGROUND">
@@ -19,26 +19,26 @@
       <OnClick>
         local mouseBtn = arg1
         if mouseBtn == "LeftButton" then
-          ReBinder:BindSelectedKeyTo(this.keybindTarget)
+          ReBound:BindSelectedKeyTo(this.keybindTarget)
         elseif mouseBtn == "RightButton" then
-          ReBinder:ClearBinding(this.keybindTarget)
+          ReBound:ClearBinding(this.keybindTarget)
         end
       </OnClick>
       <PostClick>
         this:SetButtonState("NORMAL")
       </PostClick>
       <OnEnter>
-        ReBinder:UpdateCurrentTarget(this.keybindTarget)
+        ReBound:UpdateCurrentTarget(this.keybindTarget)
       </OnEnter>
       <OnLeave>
-        ReBinder:UpdateCurrentTarget(nil)
+        ReBound:UpdateCurrentTarget(nil)
       </OnLeave>
     </Scripts>
   </Button>
 
 
   <!-- this frame covers the entire UIParent. It is visible but empty and in the background, so all it does is consume key presses and unhandled mouse clicks -->
-  <Button name="ReBinderFrame" frameStrata="BACKGROUND" movable="false" enableMouse="true" enableKeyboard="true" parent="UIParent" hidden="true" setAllPoints="true">
+  <Button name="ReBoundFrame" frameStrata="BACKGROUND" movable="false" enableMouse="true" enableKeyboard="true" parent="UIParent" hidden="true" setAllPoints="true">
     <Frames>
       <!-- this is a dialog frame that appears to provide user feedback for the outer frame -->
       <Button name="$parentDialog" frameStrata="DIALOG" movable="true" enableMouse="true">
@@ -195,7 +195,7 @@
             this:RegisterForClicks("MiddleButtonUp","Button4Up","Button5Up")
           </OnLoad>
           <OnClick>
-            local k, a = ReBinder:HandleKeyPressed(arg1)
+            local k, a = ReBound:HandleKeyPressed(arg1)
             if k then
               this.selectedKey:SetText(k)
               this.currentAction:SetText(a or "(none)")
@@ -211,31 +211,35 @@
         this.statusMsg     = getglobal(this:GetName().."DialogStatusMsg")
         tinsert(UISpecialFrames,this:GetName())
         this:RegisterForClicks("MiddleButtonUp","Button4Up","Button5Up")
+        this:RegisterEvent("PLAYER_REGEN_DISABLED")
       </OnLoad>
       <OnShow>
         this.selectedKey:SetText("(none)")
         this.currentAction:SetText("(none)")
         this.statusMsg:SetText("")
-        ReBinder:ShowClickBindingButtons()
+        ReBound:ShowClickBindingButtons()
       </OnShow>
       <OnHide>
-        ReBinder:HideClickBindingButtons()
-        ReBinder:ClearSelectedKey()
+        ReBound:HideClickBindingButtons()
+        ReBound:ClearSelectedKey()
       </OnHide>
       <OnKeyDown>
-        local k, a = ReBinder:HandleKeyPressed(arg1)
+        local k, a = ReBound:HandleKeyPressed(arg1)
         if k then
           this.selectedKey:SetText(k)
           this.currentAction:SetText(a or "(none)")
         end
       </OnKeyDown>
       <OnClick>
-        local k, a = ReBinder:HandleKeyPressed(arg1)
+        local k, a = ReBound:HandleKeyPressed(arg1)
         if k then
           this.selectedKey:SetText(k)
           this.currentAction:SetText(a or "(none)")
         end
       </OnClick>
+      <OnEvent>
+        this:Hide() -- only event is enter-combat
+      </OnEvent>
     </Scripts>
   </Button>