comparison Button.xml @ 1:c11ca1d8ed91

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