comparison Button.xml @ 2:8e0ff8ae4c08

Version 0.2
author Flick <flickerstreak@gmail.com>
date Tue, 20 Mar 2007 21:08:31 +0000
parents c11ca1d8ed91
children
comparison
equal deleted inserted replaced
1:c11ca1d8ed91 2:8e0ff8ae4c08
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 <CheckButton name="ReActionButtonTemplate" inherits="ActionButtonTemplate, SecureActionButtonTemplate" virtual="true" enableMouse="true"> 6 <CheckButton name="ReActionButtonTemplate" inherits="ActionButtonTemplate, SecureActionButtonTemplate" virtual="true" enableMouse="true">
7 <Layers>
8 <Layer level="ARTWORK">
9 <FontString name="$parentActionID" inherits="NumberFontNormalSmall" hidden="true" text="">
10 <Anchors>
11 <Anchor point="BOTTOMLEFT"/>
12 </Anchors>
13 <Color r="1.0" g="0.82" b="0.0"/>
14 </FontString>
15 </Layer>
16 </Layers>
7 <Scripts> 17 <Scripts>
8 <OnLoad> 18 <OnLoad>
9 this:RegisterForDrag("LeftButton", "RightButton") 19 this:RegisterForDrag("LeftButton", "RightButton")
10 this:RegisterForClicks("AnyUp") 20 this:RegisterForClicks("AnyUp")
11 </OnLoad> 21 </OnLoad>
12 <PostClick> 22 <PostClick>
13 if arg1 == "LeftButton" and IsAltKeyDown() then
14 this.rxnBtn:ShowAssignKeybinding()
15 end
16 if this.rxnBtn:ShouldPickupAction(button) then 23 if this.rxnBtn:ShouldPickupAction(button) then
17 PickupAction(this.rxnBtn:GetActionID()) 24 PickupAction(this.rxnBtn:GetActionID())
18 end 25 end
19 this.rxnBtn:UpdateCheckedState() 26 this.rxnBtn:UpdateCheckedState()
20 </PostClick> 27 </PostClick>
39 </Scripts> 46 </Scripts>
40 </CheckButton> 47 </CheckButton>
41 48
42 <Frame name="ReActionButtonRecyler" parent="UIParent" hidden="true" setAllPoints="true" enableMouse="false"/> 49 <Frame name="ReActionButtonRecyler" parent="UIParent" hidden="true" setAllPoints="true" enableMouse="false"/>
43 50
44 <Frame name="ReActionKeybindFrame" enableMouse="true" enableKeyboard="true" parent="UIParent" hidden="true"> 51 <Frame name="ReActionKeybindFrame" frameStrata="DIALOG" enableMouse="true" enableKeyboard="true" parent="UIParent" hidden="true">
45 <Size> 52 <Size>
46 <AbsDimension x="160" y="52"/> 53 <AbsDimension x="160" y="52"/>
47 </Size> 54 </Size>
48 <Backdrop file="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true"> 55 <Backdrop file="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
49 <EdgeSize> 56 <EdgeSize>
96 else 103 else
97 this.selected = not(this.selected) 104 this.selected = not(this.selected)
98 end 105 end
99 if this.selected and this.keybindTarget then 106 if this.selected and this.keybindTarget then
100 this:LockHighlight() 107 this:LockHighlight()
101 this:SetScript("OnKeyDown", function() this.keybindTarget:HandleKeybindAssign(this,arg1) end) 108 this:SetScript("OnKeyDown",
109 function()
110 this.keybindTarget:HandleKeybindAssign(this,arg1)
111 if not this.selected then
112 this:UnlockHighlight()
113 this:SetScript("OnKeyDown", nil)
114 end
115 end )
102 else 116 else
103 this:UnlockHighlight() 117 this:UnlockHighlight()
104 this:SetScript("OnKeyDown", nil) 118 this:SetScript("OnKeyDown", nil)
105 end 119 end
106 </OnClick> 120 </OnClick>