flickerstreak@1
|
1 <Ui xmlns="http://www.blizzard.com/wow/ui/"
|
flickerstreak@1
|
2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
flickerstreak@1
|
3 xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
|
flickerstreak@1
|
4
|
flickerstreak@1
|
5
|
flickerstreak@1
|
6 <CheckButton name="ReActionButtonTemplate" inherits="ActionButtonTemplate, SecureActionButtonTemplate" virtual="true" enableMouse="true">
|
flickerstreak@2
|
7 <Layers>
|
flickerstreak@2
|
8 <Layer level="ARTWORK">
|
flickerstreak@2
|
9 <FontString name="$parentActionID" inherits="NumberFontNormalSmall" hidden="true" text="">
|
flickerstreak@2
|
10 <Anchors>
|
flickerstreak@2
|
11 <Anchor point="BOTTOMLEFT"/>
|
flickerstreak@2
|
12 </Anchors>
|
flickerstreak@2
|
13 <Color r="1.0" g="0.82" b="0.0"/>
|
flickerstreak@2
|
14 </FontString>
|
flickerstreak@2
|
15 </Layer>
|
flickerstreak@2
|
16 </Layers>
|
flickerstreak@1
|
17 <Scripts>
|
flickerstreak@1
|
18 <OnLoad>
|
flickerstreak@1
|
19 this:RegisterForDrag("LeftButton", "RightButton")
|
flickerstreak@1
|
20 this:RegisterForClicks("AnyUp")
|
flickerstreak@1
|
21 </OnLoad>
|
flickerstreak@1
|
22 <PostClick>
|
flickerstreak@1
|
23 if this.rxnBtn:ShouldPickupAction(button) then
|
flickerstreak@1
|
24 PickupAction(this.rxnBtn:GetActionID())
|
flickerstreak@1
|
25 end
|
flickerstreak@1
|
26 this.rxnBtn:UpdateCheckedState()
|
flickerstreak@1
|
27 </PostClick>
|
flickerstreak@1
|
28 <OnDragStart>
|
flickerstreak@1
|
29 if LOCK_ACTIONBAR ~= "1" then
|
flickerstreak@1
|
30 PickupAction(this.rxnBtn:GetActionID())
|
flickerstreak@1
|
31 this.rxnBtn:UpdateDisplay()
|
flickerstreak@1
|
32 end
|
flickerstreak@1
|
33 </OnDragStart>
|
flickerstreak@1
|
34 <OnReceiveDrag>
|
flickerstreak@1
|
35 if LOCK_ACTIONBAR ~= "1" then
|
flickerstreak@1
|
36 PlaceAction(this.rxnBtn:GetActionID())
|
flickerstreak@1
|
37 this.rxnBtn:UpdateDisplay()
|
flickerstreak@1
|
38 end
|
flickerstreak@1
|
39 </OnReceiveDrag>
|
flickerstreak@1
|
40 <OnEnter>
|
flickerstreak@1
|
41 this.rxnBtn:SetTooltip()
|
flickerstreak@1
|
42 </OnEnter>
|
flickerstreak@1
|
43 <OnLeave>
|
flickerstreak@1
|
44 this.rxnBtn:ClearTooltip()
|
flickerstreak@1
|
45 </OnLeave>
|
flickerstreak@1
|
46 </Scripts>
|
flickerstreak@1
|
47 </CheckButton>
|
flickerstreak@1
|
48
|
flickerstreak@1
|
49 <Frame name="ReActionButtonRecyler" parent="UIParent" hidden="true" setAllPoints="true" enableMouse="false"/>
|
flickerstreak@1
|
50
|
flickerstreak@2
|
51 <Frame name="ReActionKeybindFrame" frameStrata="DIALOG" enableMouse="true" enableKeyboard="true" parent="UIParent" hidden="true">
|
flickerstreak@1
|
52 <Size>
|
flickerstreak@1
|
53 <AbsDimension x="160" y="52"/>
|
flickerstreak@1
|
54 </Size>
|
flickerstreak@1
|
55 <Backdrop file="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
|
flickerstreak@1
|
56 <EdgeSize>
|
flickerstreak@1
|
57 <AbsValue val="16"/>
|
flickerstreak@1
|
58 </EdgeSize>
|
flickerstreak@1
|
59 <TileSize>
|
flickerstreak@1
|
60 <AbsValue val="16"/>
|
flickerstreak@1
|
61 </TileSize>
|
flickerstreak@1
|
62 <BackgroundInsets>
|
flickerstreak@1
|
63 <AbsInset left="0" right="0" top="0" bottom="0"/>
|
flickerstreak@1
|
64 </BackgroundInsets>
|
flickerstreak@1
|
65 </Backdrop>
|
flickerstreak@1
|
66 <Layers>
|
flickerstreak@1
|
67 <Layer level="BACKGROUND">
|
flickerstreak@1
|
68 <Texture>
|
flickerstreak@1
|
69 <Color r="0" g="0" b="0" a="0.5"/>
|
flickerstreak@1
|
70 </Texture>
|
flickerstreak@1
|
71 </Layer>
|
flickerstreak@1
|
72 <Layer level="ARTWORK">
|
flickerstreak@1
|
73 <FontString inherits="GameFontNormal" text="Set Keybinding">
|
flickerstreak@1
|
74 <Anchors>
|
flickerstreak@1
|
75 <Anchor point="TOP">
|
flickerstreak@1
|
76 <Offset>
|
flickerstreak@1
|
77 <AbsDimension x="0" y="-5"/>
|
flickerstreak@1
|
78 </Offset>
|
flickerstreak@1
|
79 </Anchor>
|
flickerstreak@1
|
80 </Anchors>
|
flickerstreak@1
|
81 </FontString>
|
flickerstreak@1
|
82 </Layer>
|
flickerstreak@1
|
83 </Layers>
|
flickerstreak@1
|
84 <Frames>
|
flickerstreak@1
|
85 <Button name="$parentButton" inherits="UIPanelButtonTemplate2" enableKeyboard="true" enableMouse="true">
|
flickerstreak@1
|
86 <Size>
|
flickerstreak@1
|
87 <AbsDimension x="120" y="22"/>
|
flickerstreak@1
|
88 </Size>
|
flickerstreak@1
|
89 <Anchors>
|
flickerstreak@1
|
90 <Anchor point="BOTTOM" relativePoint="BOTTOM">
|
flickerstreak@1
|
91 <Offset>
|
flickerstreak@1
|
92 <AbsDimension x="-2" y="5"/>
|
flickerstreak@1
|
93 </Offset>
|
flickerstreak@1
|
94 </Anchor>
|
flickerstreak@1
|
95 </Anchors>
|
flickerstreak@1
|
96 <Scripts>
|
flickerstreak@1
|
97 <OnLoad>
|
flickerstreak@1
|
98 this:RegisterForClicks("AnyUp")
|
flickerstreak@1
|
99 </OnLoad>
|
flickerstreak@1
|
100 <OnClick>
|
flickerstreak@1
|
101 if this.selected and this.keybindTarget then
|
flickerstreak@1
|
102 this.keybindTarget:HandleKeybindAssign(this, nil, arg1)
|
flickerstreak@1
|
103 else
|
flickerstreak@1
|
104 this.selected = not(this.selected)
|
flickerstreak@1
|
105 end
|
flickerstreak@1
|
106 if this.selected and this.keybindTarget then
|
flickerstreak@1
|
107 this:LockHighlight()
|
flickerstreak@2
|
108 this:SetScript("OnKeyDown",
|
flickerstreak@2
|
109 function()
|
flickerstreak@2
|
110 this.keybindTarget:HandleKeybindAssign(this,arg1)
|
flickerstreak@2
|
111 if not this.selected then
|
flickerstreak@2
|
112 this:UnlockHighlight()
|
flickerstreak@2
|
113 this:SetScript("OnKeyDown", nil)
|
flickerstreak@2
|
114 end
|
flickerstreak@2
|
115 end )
|
flickerstreak@1
|
116 else
|
flickerstreak@1
|
117 this:UnlockHighlight()
|
flickerstreak@1
|
118 this:SetScript("OnKeyDown", nil)
|
flickerstreak@1
|
119 end
|
flickerstreak@1
|
120 </OnClick>
|
flickerstreak@1
|
121 <OnShow>
|
flickerstreak@1
|
122 this.keybindTarget.button:SetChecked(1)
|
flickerstreak@1
|
123 this.keybindTarget:UpdateDisplay()
|
flickerstreak@1
|
124 </OnShow>
|
flickerstreak@1
|
125 <OnHide>
|
flickerstreak@1
|
126 if this.keybindTarget then
|
flickerstreak@1
|
127 this.keybindTarget.button:SetChecked(0)
|
flickerstreak@1
|
128 this.keybindTarget:UpdateDisplay()
|
flickerstreak@1
|
129 end
|
flickerstreak@1
|
130 </OnHide>
|
flickerstreak@1
|
131 </Scripts>
|
flickerstreak@1
|
132 <NormalFont inherits="GameFontHighlightSmall"/>
|
flickerstreak@1
|
133 <HighlightFont inherits="GameFontHighlightSmall"/>
|
flickerstreak@1
|
134 </Button>
|
flickerstreak@1
|
135 </Frames>
|
flickerstreak@1
|
136 <Scripts>
|
flickerstreak@1
|
137 <OnLoad>
|
flickerstreak@1
|
138 table.insert(UISpecialFrames, this:GetName()) -- auto-hide on escape
|
flickerstreak@1
|
139 </OnLoad>
|
flickerstreak@1
|
140 </Scripts>
|
flickerstreak@1
|
141 </Frame>
|
flickerstreak@1
|
142
|
flickerstreak@1
|
143 </Ui>
|