Mercurial > wow > reaction
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 6:2da5089ab7ff | 7:f920db5fc6b1 |
|---|---|
| 1 <Ui xmlns="http://www.blizzard.com/wow/ui/" | 1 <Ui xmlns="http://www.blizzard.com/wow/ui/" |
| 2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | 2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 3 xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd"> | 3 xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd"> |
| 4 | 4 |
| 5 | 5 |
| 6 <Button name="ReBinderClickBindingTemplate" virtual="true" hidden="true" toplevel="true" setAllPoints="true"> | 6 <Button name="ReBoundClickBindingTemplate" virtual="true" hidden="true" toplevel="true" setAllPoints="true"> |
| 7 <HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/> | 7 <HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/> |
| 8 <Layers> | 8 <Layers> |
| 9 <Layer level="BACKGROUND"> | 9 <Layer level="BACKGROUND"> |
| 10 <Texture> | 10 <Texture> |
| 11 <Color r="0" g="0" b="0" a="0"/> | 11 <Color r="0" g="0" b="0" a="0"/> |
| 17 this:RegisterForClicks("LeftButtonUp","RightButtonUp") | 17 this:RegisterForClicks("LeftButtonUp","RightButtonUp") |
| 18 </OnLoad> | 18 </OnLoad> |
| 19 <OnClick> | 19 <OnClick> |
| 20 local mouseBtn = arg1 | 20 local mouseBtn = arg1 |
| 21 if mouseBtn == "LeftButton" then | 21 if mouseBtn == "LeftButton" then |
| 22 ReBinder:BindSelectedKeyTo(this.keybindTarget) | 22 ReBound:BindSelectedKeyTo(this.keybindTarget) |
| 23 elseif mouseBtn == "RightButton" then | 23 elseif mouseBtn == "RightButton" then |
| 24 ReBinder:ClearBinding(this.keybindTarget) | 24 ReBound:ClearBinding(this.keybindTarget) |
| 25 end | 25 end |
| 26 </OnClick> | 26 </OnClick> |
| 27 <PostClick> | 27 <PostClick> |
| 28 this:SetButtonState("NORMAL") | 28 this:SetButtonState("NORMAL") |
| 29 </PostClick> | 29 </PostClick> |
| 30 <OnEnter> | 30 <OnEnter> |
| 31 ReBinder:UpdateCurrentTarget(this.keybindTarget) | 31 ReBound:UpdateCurrentTarget(this.keybindTarget) |
| 32 </OnEnter> | 32 </OnEnter> |
| 33 <OnLeave> | 33 <OnLeave> |
| 34 ReBinder:UpdateCurrentTarget(nil) | 34 ReBound:UpdateCurrentTarget(nil) |
| 35 </OnLeave> | 35 </OnLeave> |
| 36 </Scripts> | 36 </Scripts> |
| 37 </Button> | 37 </Button> |
| 38 | 38 |
| 39 | 39 |
| 40 <!-- 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 --> | 40 <!-- 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 --> |
| 41 <Button name="ReBinderFrame" frameStrata="BACKGROUND" movable="false" enableMouse="true" enableKeyboard="true" parent="UIParent" hidden="true" setAllPoints="true"> | 41 <Button name="ReBoundFrame" frameStrata="BACKGROUND" movable="false" enableMouse="true" enableKeyboard="true" parent="UIParent" hidden="true" setAllPoints="true"> |
| 42 <Frames> | 42 <Frames> |
| 43 <!-- this is a dialog frame that appears to provide user feedback for the outer frame --> | 43 <!-- this is a dialog frame that appears to provide user feedback for the outer frame --> |
| 44 <Button name="$parentDialog" frameStrata="DIALOG" movable="true" enableMouse="true"> | 44 <Button name="$parentDialog" frameStrata="DIALOG" movable="true" enableMouse="true"> |
| 45 <Size> | 45 <Size> |
| 46 <AbsDimension x="330" y="350"/> | 46 <AbsDimension x="330" y="350"/> |
| 193 this.selectedKey = getglobal(this:GetName().."SelectedKeyText") | 193 this.selectedKey = getglobal(this:GetName().."SelectedKeyText") |
| 194 this.currentAction = getglobal(this:GetName().."CurrentActionText") | 194 this.currentAction = getglobal(this:GetName().."CurrentActionText") |
| 195 this:RegisterForClicks("MiddleButtonUp","Button4Up","Button5Up") | 195 this:RegisterForClicks("MiddleButtonUp","Button4Up","Button5Up") |
| 196 </OnLoad> | 196 </OnLoad> |
| 197 <OnClick> | 197 <OnClick> |
| 198 local k, a = ReBinder:HandleKeyPressed(arg1) | 198 local k, a = ReBound:HandleKeyPressed(arg1) |
| 199 if k then | 199 if k then |
| 200 this.selectedKey:SetText(k) | 200 this.selectedKey:SetText(k) |
| 201 this.currentAction:SetText(a or "(none)") | 201 this.currentAction:SetText(a or "(none)") |
| 202 end | 202 end |
| 203 </OnClick> | 203 </OnClick> |
| 209 this.selectedKey = getglobal(this:GetName().."DialogSelectedKeyText") | 209 this.selectedKey = getglobal(this:GetName().."DialogSelectedKeyText") |
| 210 this.currentAction = getglobal(this:GetName().."DialogCurrentActionText") | 210 this.currentAction = getglobal(this:GetName().."DialogCurrentActionText") |
| 211 this.statusMsg = getglobal(this:GetName().."DialogStatusMsg") | 211 this.statusMsg = getglobal(this:GetName().."DialogStatusMsg") |
| 212 tinsert(UISpecialFrames,this:GetName()) | 212 tinsert(UISpecialFrames,this:GetName()) |
| 213 this:RegisterForClicks("MiddleButtonUp","Button4Up","Button5Up") | 213 this:RegisterForClicks("MiddleButtonUp","Button4Up","Button5Up") |
| 214 this:RegisterEvent("PLAYER_REGEN_DISABLED") | |
| 214 </OnLoad> | 215 </OnLoad> |
| 215 <OnShow> | 216 <OnShow> |
| 216 this.selectedKey:SetText("(none)") | 217 this.selectedKey:SetText("(none)") |
| 217 this.currentAction:SetText("(none)") | 218 this.currentAction:SetText("(none)") |
| 218 this.statusMsg:SetText("") | 219 this.statusMsg:SetText("") |
| 219 ReBinder:ShowClickBindingButtons() | 220 ReBound:ShowClickBindingButtons() |
| 220 </OnShow> | 221 </OnShow> |
| 221 <OnHide> | 222 <OnHide> |
| 222 ReBinder:HideClickBindingButtons() | 223 ReBound:HideClickBindingButtons() |
| 223 ReBinder:ClearSelectedKey() | 224 ReBound:ClearSelectedKey() |
| 224 </OnHide> | 225 </OnHide> |
| 225 <OnKeyDown> | 226 <OnKeyDown> |
| 226 local k, a = ReBinder:HandleKeyPressed(arg1) | 227 local k, a = ReBound:HandleKeyPressed(arg1) |
| 227 if k then | 228 if k then |
| 228 this.selectedKey:SetText(k) | 229 this.selectedKey:SetText(k) |
| 229 this.currentAction:SetText(a or "(none)") | 230 this.currentAction:SetText(a or "(none)") |
| 230 end | 231 end |
| 231 </OnKeyDown> | 232 </OnKeyDown> |
| 232 <OnClick> | 233 <OnClick> |
| 233 local k, a = ReBinder:HandleKeyPressed(arg1) | 234 local k, a = ReBound:HandleKeyPressed(arg1) |
| 234 if k then | 235 if k then |
| 235 this.selectedKey:SetText(k) | 236 this.selectedKey:SetText(k) |
| 236 this.currentAction:SetText(a or "(none)") | 237 this.currentAction:SetText(a or "(none)") |
| 237 end | 238 end |
| 238 </OnClick> | 239 </OnClick> |
| 240 <OnEvent> | |
| 241 this:Hide() -- only event is enter-combat | |
| 242 </OnEvent> | |
| 239 </Scripts> | 243 </Scripts> |
| 240 </Button> | 244 </Button> |
| 241 | 245 |
| 242 </Ui> | 246 </Ui> |
