-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRecount_MinimapIcon.xml
198 lines (198 loc) · 7.36 KB
/
Recount_MinimapIcon.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<?xml version="1.0" encoding="UTF-8"?>
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Frame name="Recount_MinimapIcon_Load" hidden="true" enableMouse="false" movable="false">
<Scripts>
<OnEvent>if (event == "VARIABLES_LOADED") then
Recount_MinimapIcon_OnLoad();
end</OnEvent>
</Scripts>
<Size>
<AbsDimension x="1" y="1" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" />
</Anchors>
</Frame>
<Button name="Recount_IconButton" toplevel="true" frameStrata="LOW" parent="Minimap" enableMouse="true" movable="true" hidden="false">
<Size>
<AbsDimension x="33" y="33" />
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-15" y="0" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="Recount_IconButton_Icon" file="Interface\AddOns\Recount_MinimapIcon\textures\icon-passive">
<Size>
<AbsDimension x="21" y="21" />
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="7" y="-6" />
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0.075" right="0.925" top="0.075" bottom="0.925" />
</Texture>
</Layer>
<Layer level="OVERLAY">
<Texture file="Interface\Minimap\MiniMap-TrackingBorder">
<Size>
<AbsDimension x="56" y="56" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" />
</Anchors>
</Texture>
</Layer>
</Layers>
<HighlightTexture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight" />
<Scripts>
<OnLoad>this:RegisterForClicks("LeftButtonUp","RightButtonUp");
this:RegisterForDrag("LeftButton");
this.locked = false;</OnLoad>
<OnEnter>Recount_MinimapIcon_ShowTooltip();
Recount_MinimapIcon_SetMinimap();</OnEnter>
<OnMouseDown>Recount_IconButton_Icon:SetTexCoord(0,1,0,1);</OnMouseDown>
<OnMouseUp>Recount_IconButton_Icon:SetTexCoord(.075,.925,.075,.925);</OnMouseUp>
<OnLeave>GameTooltip:Hide()</OnLeave>
<OnDragStart>if (not this.locked) then
this.being_dragged = true;
this:LockHighlight();
self:StartMoving();
end</OnDragStart>
<OnDragStop>this.being_dragged = false;
this:UnlockHighlight();
self:StopMovingOrSizing();
Recount_IconButton_Icon:SetTexCoord(.075,.925,.075,.925);</OnDragStop>
<OnClick>Recount_IconButton_OnClick(arg1);
Recount_IconButton_Icon:SetTexCoord(.075,.925,.075,.925);</OnClick>
<OnEvent>Recount_MinimapIcon_UpdatePosition();</OnEvent>
<OnUpdate>if (this.being_dragged and not this.locked) then
Recount_MinimapIcon_Drag();
end</OnUpdate>
</Scripts>
</Button>
<Button name="Recount_ButtonTemplate" virtual="true">
<Size>
<AbsDimension x="75" y="16" />
</Size>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parent_Text" inherits="GameFontWhite">
<Size>
<AbsDimension x="75" y="16" />
</Size>
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnEnter />
<OnLeave />
</Scripts>
<HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD">
<Size>
<AbsDimension x="75" y="16" />
</Size>
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
</HighlightTexture>
</Button>
<Frame name="Recount_MinimapFrame" hidden="true" toplevel="true" frameStrata="DIALOG" parent="UIParent">
<Size>
<absDimension x="85" y="75" />
</Size>
<Anchors>
<Anchor point="RIGHT" relativePoint="BOTTOMLEFT" relativeTo="Recount_IconButton">
<Offset>
<AbsDimension x="5" y="5" />
</Offset>
</Anchor>
</Anchors>
<Backdrop bgfile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<TileSize>
<AbsValue val="32" />
</TileSize>
<EdgeSize>
<AbsValue val="16" />
</EdgeSize>
<BackgroundInsets>
<AbsInset left="5" right="5" top="5" bottom="5" />
</BackgroundInsets>
</Backdrop>
<Frames>
<Button name="Recount_ButtonLock" inherits="Recount_ButtonTemplate" id="1">
<Anchors>
<Anchor point="TOP" relativeTo="Recount_MinimapFrame">
<Offset>
<AbsDimension x="0" y="-8" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>if (Recount_IconButton.locked) then
Recount_IconButton.locked = false;
RecountButton_Locked = false;
Recount_MinimapFrame:Hide();
else
Recount_IconButton.locked = true;
RecountButton_Locked = true;
Recount_MinimapFrame:Hide();
end</OnClick>
</Scripts>
</Button>
<Button name="Recount_ButtonConfig" inherits="Recount_ButtonTemplate" id="2">
<Anchors>
<Anchor point="TOP" relativeTo="Recount_ButtonLock">
<Offset>
<AbsDimension x="0" y="-20" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>Recount:ShowConfig();
Recount_MinimapFrame:Hide()</OnClick>
</Scripts>
</Button>
<Button name="Recount_ButtonReset" inherits="Recount_ButtonTemplate" id="2">
<Anchors>
<Anchor point="TOP" relativeTo="Recount_ButtonConfig">
<Offset>
<AbsDimension x="0" y="-20" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>Recount:ResetData();
Recount_MinimapFrame:Hide();</OnClick>
</Scripts>
</Button>
</Frames>
<Scripts>
<OnUpdate>if (Recount_IconButton.locked) then
getglobal("Recount_ButtonLock_Text"):SetText("Unlock Button");
else
getglobal("Recount_ButtonLock_Text"):SetText("Lock Button");
end</OnUpdate>
<OnEnter />
<OnLeave />
</Scripts>
</Frame>
</Ui>