forked from jordonwow/omnibar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOmniBar.xml
193 lines (193 loc) · 5.89 KB
/
OmniBar.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
<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">
<Font name="OmniBarFont" font="Fonts\skurri.ttf" inherits="GameFontHighlightSmallOutline" virtual="true">
<FontHeight>
<AbsValue val="8"/>
</FontHeight>
</Font>
<Frame name="OmniBarTemplate" virtual="true" parent="UIParent" frameStrata="MEDIUM" movable="true" clampedToScreen="true" dontSavePosition="true">
<Size>
<AbsDimension x="1" y="1"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Frames>
<Frame name="$parentAnchor" parentKey="anchor" enableMouse="true" clampedToScreen="true">
<Size>
<AbsDimension x="80" y="30"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentBG" setAllPoints="true" parentKey="background">
<Color r="0" g="0" b="0" a="0.3"/>
</Texture>
</Layer>
<Layer level="ARTWORK">
<FontString name="$parentText" inherits="GameFontNormal" parentKey="text" text="OmniBar">
<Color r="1" g="1" b="0" a="1"/>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnMouseDown>
local bar = self:GetParent()
OmniBar_Center(bar)
bar:StartMoving()
</OnMouseDown>
<OnMouseUp>
local bar = self:GetParent()
bar:StopMovingOrSizing()
OmniBar_SavePosition(bar)
LibStub("AceConfigRegistry-3.0"):NotifyChange("OmniBar")
</OnMouseUp>
</Scripts>
</Frame>
<Frame name="$parentIcons" parentKey="container" clampedToScreen="true">
<Size>
<AbsDimension x="1" y="1"/>
</Size>
<Anchors>
<Anchor point="CENTER" relativeTo="$parentAnchor"/>
</Anchors>
</Frame>
</Frames>
<Scripts>
<OnLoad>
self:RegisterEvent("ADDON_LOADED")
</OnLoad>
<OnEvent function="OmniBar_OnEvent"/>
</Scripts>
</Frame>
<Button name="OmniBarButtonTemplate" inherits="ActionButtonTemplate" hidden="true" virtual="true">
<Size>
<AbsDimension x="36" y="36"/>
</Size>
<Anchors>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Anchors>
<Animations>
<AnimationGroup parentKey="newitemglowAnim" setToFinalAlpha="true">
<Alpha childKey="NewItemTexture" smoothing="NONE" duration="1" order="1" fromAlpha="1" toAlpha="0.4"/>
<Alpha childKey="NewItemTexture" smoothing="NONE" duration="1" order="2" fromAlpha="0.4" toAlpha="1"/>
<Alpha childKey="NewItemTexture" smoothing="NONE" duration="1" order="3" fromAlpha="1" toAlpha="0"/>
</AnimationGroup>
<AnimationGroup parentKey="flashAnim" setToFinalAlpha="true">
<Alpha childKey="flash" smoothing="OUT" duration="1" order="1" fromAlpha="1" toAlpha="0"/>
</AnimationGroup>
</Animations>
<NormalTexture name="$parentNormalTexture" parentKey="NormalTexture">
<Anchors>
<Anchor point="TOPLEFT" x="-15" y="15"/>
<Anchor point="BOTTOMRIGHT" x="15" y="-15"/>
</Anchors>
</NormalTexture>
<HighlightTexture/>
<PushedTexture/>
<Layers>
<Layer level="OVERLAY" textureSubLevel="1">
<FontString name="$parentName" parentKey="Name" inherits="OmniBarFont">
<Size>
<AbsDimension x="36" y="10"/>
</Size>
<FontHeight>
<AbsValue val="6"/>
</FontHeight>
<Anchors>
<Anchor point="BOTTOM">
<Offset>
<AbsDimension x="0" y="2"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<Texture parentKey="flash" hidden="false" alpha="0" alphaMode="ADD" atlas="bags-glow-flash" useAtlasSize="true">
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
<Texture parentKey="NewItemTexture" alpha="0" alphaMode="ADD" atlas="bags-glow-blue" useAtlasSize="true">
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
</Layer>
<Layer level="BACKGROUND" textureSubLevel="-1">
<Texture parentKey="TargetTexture" alpha="0" alphaMode="ADD" atlas="bags-glow-purple" useAtlasSize="true">
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
<Texture parentKey="FocusTexture" alpha="0" alphaMode="ADD" atlas="bags-glow-white" useAtlasSize="true">
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<Frames>
<Cooldown name="$parentCooldown" inherits="CooldownFrameTemplate" parentKey="cooldown" reverse="true" drawBling="false" drawEdge="false" hidden="true">
<Size x="36" y="36"/>
<Anchors>
<Anchor point="CENTER" x="0" y="-1"/>
</Anchors>
<SwipeTexture>
<Color r="1" g="1" b="1" a="0.8"/>
</SwipeTexture>
<Scripts>
<OnHide function="OmniBar_CooldownFinish"/>
</Scripts>
</Cooldown>
</Frames>
<Scripts>
<OnEnter>
local bar = self:GetParent():GetParent()
if not bar.settings.tooltips or self:GetAlpha() == 0 then return end
GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
GameTooltip:SetSpellByID(self.spellID)
</OnEnter>
<OnLeave>
GameTooltip:Hide()
</OnLeave>
<OnShow>
local bar = self:GetParent():GetParent()
table.insert(bar.active, self)
OmniBar_Position(bar)
OmniBar_UpdateBorders(bar)
</OnShow>
<OnHide>
local bar = self:GetParent():GetParent()
for i = 1, #bar.active do
if bar.active[i] == self then
table.remove(bar.active, i)
break
end
end
OmniBar_Position(bar)
</OnHide>
<OnMouseDown>
local bar = self:GetParent():GetParent()
if button == "LeftButton" and not bar.settings.locked then
OmniBar_Center(bar)
bar:StartMoving()
end
</OnMouseDown>
<OnMouseUp>
local bar = self:GetParent():GetParent()
if button == "LeftButton" and not bar.settings.locked then
bar:StopMovingOrSizing()
OmniBar_SavePosition(bar)
LibStub("AceConfigRegistry-3.0"):NotifyChange("OmniBar")
end
</OnMouseUp>
</Scripts>
</Button>
</Ui>