/
PlayerFrame.xml
452 lines (449 loc) · 19.2 KB
/
PlayerFrame.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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
<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">
<Script file="PlayerFrame.lua"/>
<!--IMPORTANT
If you change anything in this file, be sure to check in PlayerFrame.lua if these values get set there as well.
IMPORTANT-->
<Button name="PlayerFrame" frameStrata="LOW" toplevel="true" movable="true" inherits="SecureUnitButtonTemplate, EditModeUnitFrameSystemTemplate" parent="UIParent">
<Size x="232" y="100"/>
<HitRectInsets>
<AbsInset left="6" right="0" top="4" bottom="9"/>
</HitRectInsets>
<KeyValues>
<KeyValue key="systemIndex" value="Enum.EditModeUnitFrameSystemIndices.Player" type="global"/>
<KeyValue key="systemNameString" value="HUD_EDIT_MODE_PLAYER_FRAME_LABEL" type="global"/>
<KeyValue key="disablePortraitMask" value="true" type="boolean"/>
<KeyValue key="frameType" value="Player" type="string"/>
</KeyValues>
<Frames>
<Frame parentKey="PlayerFrameContainer" setAllPoints="true">
<Layers>
<Layer level="BACKGROUND" textureSubLevel="1">
<Texture parentKey="PlayerPortrait">
<Size x="60" y="60"/>
<Anchors>
<Anchor point="TOPLEFT" x="24" y="-19"/>
</Anchors>
</Texture>
<MaskTexture parentKey="PlayerPortraitMask" atlas="UI-HUD-UnitFrame-Player-Portrait-Mask" hWrapMode="CLAMPTOBLACKADDITIVE" vWrapMode="CLAMPTOBLACKADDITIVE">
<Size x="60" y="60"/>
<Anchors>
<Anchor point="TOPLEFT" x="24" y="-19"/>
</Anchors>
<MaskedTextures>
<MaskedTexture childKey="PlayerPortrait"/>
</MaskedTextures>
</MaskTexture>
</Layer>
<Layer level="BACKGROUND" textureSubLevel="2">
<Texture parentKey="VehicleFrameTexture" atlas="UI-HUD-UnitFrame-Player-PortraitOn-Vehicle" useAtlasSize="true" hidden="true">
<Anchors>
<Anchor point="CENTER" x="-2" y="0"/>
</Anchors>
</Texture>
<Texture parentKey="FrameTexture" atlas="UI-HUD-UnitFrame-Player-PortraitOn" useAtlasSize="true">
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
</Layer>
<Layer level="OVERLAY">
<Texture parentKey="FrameFlash" atlas="UI-HUD-UnitFrame-Player-PortraitOn-InCombat" useAtlasSize="true" hidden="true">
<Anchors>
<Anchor point="CENTER" x="-1.5" y="1"/>
</Anchors>
</Texture>
</Layer>
</Layers>
</Frame>
<Frame parentKey="PlayerFrameContent" setAllPoints="true">
<Frames>
<Frame parentKey="PlayerFrameContentMain" setAllPoints="true">
<Layers>
<Layer level="OVERLAY" textureSubLevel="1">
<FontString name="PlayerName" inherits="GameFontNormalSmall" justifyH="LEFT" justifyV="MIDDLE">
<Size x="96" y="12"/>
<Anchors>
<Anchor point="TOPLEFT" x="88" y="-27"/>
</Anchors>
</FontString>
<FontString name="PlayerLevelText" inherits="GameNormalNumberFont" justifyH="RIGHT" justifyV="MIDDLE">
<Anchors>
<Anchor point="TOPRIGHT" x="-24.5" y="-28"/>
</Anchors>
</FontString>
<FontString name="PlayerHitIndicator" hidden="true" inherits="NumberFontNormalHuge">
<Anchors>
<Anchor point="CENTER" relativeKey="$parent.$parent.$parent.PlayerFrameContainer.PlayerPortrait" relativePoint="CENTER"/>
</Anchors>
</FontString>
</Layer>
<Layer level="OVERLAY" textureSubLevel="2">
<!-- StatusTexture is a flash texture for the player portrait and top bar (where the player name is).
This is different from FrameFlash, which is a flash of the entire frame area.-->
<Texture parentKey="StatusTexture" atlas="UI-HUD-UnitFrame-Player-PortraitOn-Status" useAtlasSize="true" hidden="true">
<Anchors>
<Anchor point="TOPLEFT" x="17" y="-14"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<Frames>
<Frame parentKey="HealthBarArea" setAllPoints="true" useParentLevel="true">
<Frames>
<StatusBar parentKey="PlayerFrameHealthBarAnimatedLoss" mixin="AnimatedHealthLossMixin" hidden="true" useParentLevel="true">
<BarTexture atlas="UI-HUD-UnitFrame-Player-PortraitOn-Bar-Health"/>
<Scripts>
<OnLoad method="OnLoad"/>
</Scripts>
</StatusBar>
<StatusBar parentKey="HealthBar" inherits="TextStatusBar" enableMouseMotion="true" useParentLevel="true">
<Size x="124" y="20"/>
<Anchors>
<Anchor point="TOPLEFT" x="85" y="-40"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture parentKey="MyHealPredictionBar" inherits="MyHealPredictionBarTemplate"/>
<Texture parentKey="OtherHealPredictionBar" inherits="OtherHealPredictionBarTemplate"/>
<Texture parentKey="TotalAbsorbBar" inherits="TotalAbsorbBarTemplate"/>
<Texture parentKey="HealAbsorbBar" inherits="HealAbsorbBarTemplate"/>
<Texture parentKey="HealAbsorbBarLeftShadow" inherits="HealAbsorbBarLeftShadowTemplate"/>
<Texture parentKey="HealAbsorbBarRightShadow" inherits="HealAbsorbBarRightShadowTemplate"/>
</Layer>
<Layer level="ARTWORK">
<Texture parentKey="TotalAbsorbBarOverlay" inherits="TotalAbsorbBarOverlayTemplate"/>
<Texture parentKey="OverAbsorbGlow" inherits="OverAbsorbGlowTemplate"/>
<Texture parentKey="OverHealAbsorbGlow" inherits="OverHealAbsorbGlowTemplate"/>
</Layer>
<Layer level="OVERLAY" textureSubLevel="1">
<FontString parentKey="HealthBarText" inherits="TextStatusBarText">
<Anchors>
<Anchor point="CENTER" x="0" y="0"/>
</Anchors>
</FontString>
<FontString parentKey="LeftText" inherits="TextStatusBarText">
<Anchors>
<Anchor point="LEFT" x="2" y="0"/>
</Anchors>
</FontString>
<FontString parentKey="RightText" inherits="TextStatusBarText">
<Anchors>
<Anchor point="RIGHT" x="-2" y="0"/>
</Anchors>
</FontString>
</Layer>
<Layer level="OVERLAY" textureSubLevel="2">
<MaskTexture parentKey="HealthBarMask" atlas="UI-HUD-UnitFrame-Player-PortraitOn-Bar-Health-Mask" useAtlasSize="true" hWrapMode="CLAMPTOBLACKADDITIVE" vWrapMode="CLAMPTOBLACKADDITIVE">
<Anchors>
<Anchor point="TOPLEFT" x="-2" y="6"/>
</Anchors>
<MaskedTextures>
<MaskedTexture childKey="MyHealPredictionBar"/>
<MaskedTexture childKey="OtherHealPredictionBar"/>
<MaskedTexture childKey="TotalAbsorbBar"/>
<MaskedTexture childKey="TotalAbsorbBarOverlay"/>
<MaskedTexture childKey="OverAbsorbGlow"/>
<MaskedTexture childKey="OverHealAbsorbGlow"/>
<MaskedTexture childKey="HealAbsorbBar"/>
<MaskedTexture childKey="HealAbsorbBarLeftShadow"/>
<MaskedTexture childKey="HealAbsorbBarRightShadow"/>
</MaskedTextures>
</MaskTexture>
</Layer>
</Layers>
<Scripts>
<OnLoad>
TextStatusBar_Initialize(self);
self.textLockable = 1;
self.lockColor = true;
self.cvar = "statusText";
self.cvarLabel = "STATUS_TEXT_PLAYER";
self:SetMouseClickEnabled(false);
self:GetParent().PlayerFrameHealthBarAnimatedLoss:SetUnitHealthBar("player", self);
</OnLoad>
<OnValueChanged function="UnitFrameHealthBar_OnValueChanged"/>
<OnSizeChanged>
UnitFrameHealPredictionBars_UpdateSize(self:GetParent());
</OnSizeChanged>
</Scripts>
<BarTexture atlas="UI-HUD-UnitFrame-Player-PortraitOn-Bar-Health"/>
</StatusBar>
</Frames>
</Frame>
<Frame parentKey="ManaBarArea" setAllPoints="true" useParentLevel="true">
<Frames>
<StatusBar parentKey="ManaBar" inherits="TextStatusBar" enableMouseMotion="true" useParentLevel="true">
<Size x="124" y="10"/>
<Anchors>
<Anchor point="TOPLEFT" x="85" y="-61"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture parentKey="ManaCostPredictionBar" inherits="MyManaCostPredictionBarTemplate"/>
</Layer>
<Layer level="OVERLAY" textureSubLevel="1">
<FontString parentKey="ManaBarText" inherits="TextStatusBarText">
<Anchors>
<Anchor point="CENTER" x="0" y="0"/>
</Anchors>
</FontString>
<FontString parentKey="LeftText" inherits="TextStatusBarText">
<Anchors>
<Anchor point="LEFT" x="2" y="0"/>
</Anchors>
</FontString>
<FontString parentKey="RightText" inherits="TextStatusBarText">
<Anchors>
<Anchor point="RIGHT" x="-2" y="0"/>
</Anchors>
</FontString>
</Layer>
<Layer level="OVERLAY" textureSubLevel="2">
<MaskTexture parentKey="ManaBarMask" atlas="UI-HUD-UnitFrame-Player-PortraitOn-Bar-Mana-Mask" useAtlasSize="true" hWrapMode="CLAMPTOBLACKADDITIVE" vWrapMode="CLAMPTOBLACKADDITIVE">
<Anchors>
<Anchor point="TOPLEFT" x="-2" y="3"/>
</Anchors>
<MaskedTextures>
<MaskedTexture childKey="ManaCostPredictionBar"/>
</MaskedTextures>
</MaskTexture>
</Layer>
</Layers>
<Scripts>
<OnLoad>
TextStatusBar_Initialize(self);
self.textLockable = 1;
self.lockColor = true;
self.cvar = "statusText";
self.cvarLabel = "STATUS_TEXT_PLAYER";
self:SetMouseClickEnabled(false);
</OnLoad>
</Scripts>
<BarTexture atlas="UI-HUD-UnitFrame-Player-PortraitOn-Bar-Mana"/>
<Frames>
<Frame parentKey="FeedbackFrame" setAllPoints="true" useParentLevel="true" inherits="BuilderSpenderFrame"/>
<Frame parentKey="FullPowerFrame" inherits="FullResourcePulseFrame">
<Size x="124" y="10"/>
<Anchors>
<Anchor point="TOPRIGHT"/>
</Anchors>
</Frame>
</Frames>
</StatusBar>
</Frames>
</Frame>
</Frames>
</Frame>
<Frame parentKey="PlayerFrameContentContextual" setAllPoints="true">
<Layers>
<Layer level="OVERLAY" textureSubLevel="1">
<!-- LeaderIcon and GuideIcon are in the same position. Currently only one can show at a time. -->
<Texture parentKey="LeaderIcon" atlas="UI-HUD-UnitFrame-Player-Group-LeaderIcon" useAtlasSize="true" hidden="true">
<Anchors>
<Anchor point="TOPLEFT" x="86" y="-10"/>
</Anchors>
</Texture>
<Texture parentKey="GuideIcon" atlas="UI-HUD-UnitFrame-Player-Group-GuideIcon" useAtlasSize="true" hidden="true">
<Anchors>
<Anchor point="TOPLEFT" x="86" y="-10"/>
</Anchors>
</Texture>
<Texture parentKey="RoleIcon" atlas="roleicon-tiny-tank" hidden="true">
<Size x="12" y="12"/>
<Anchors>
<Anchor point="TOPLEFT" x="196" y="-27"/>
</Anchors>
</Texture>
<!-- The AttackIcon and PlayerPortraitCornerIcon are in roughly the same position. Currently only one can show at a time. -->
<Texture parentKey="AttackIcon" atlas="UI-HUD-UnitFrame-Player-CombatIcon" useAtlasSize="true">
<Anchors>
<Anchor point="TOPLEFT" x="64" y="-62"/>
</Anchors>
</Texture>
<Texture parentKey="PlayerPortraitCornerIcon" atlas="UI-HUD-UnitFrame-Player-PortraitOn-CornerEmbellishment" useAtlasSize="true">
<Anchors>
<Anchor point="TOPLEFT" x="58.5" y="-53.5"/>
</Anchors>
</Texture>
<FontString name="PlayerPVPTimerText" parentKey="PvpTimerText" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT" x="45" y="-82"/>
</Anchors>
</FontString>
</Layer>
<Layer level="OVERLAY" textureSubLevel="2">
<!-- PVPIcon and PrestigePortrait (and badge) are in the same position. -->
<Texture parentKey="PVPIcon" hidden="true" useAtlasSize="true">
<Anchors>
<Anchor point="TOP" relativeKey="$parent" relativePoint="TOPLEFT" x="25" y="-50"/>
</Anchors>
</Texture>
<Texture parentKey="PrestigePortrait" hidden="true">
<Size x="50" y="52"/>
<Anchors>
<Anchor point="TOPLEFT" x="-2" y="-38"/>
</Anchors>
</Texture>
</Layer>
<Layer level="OVERLAY" textureSubLevel="3">
<Texture parentKey="PrestigeBadge" hidden="true">
<Size x="30" y="30"/>
<Anchors>
<Anchor point="CENTER" relativeKey="$parent.PrestigePortrait" relativePoint="CENTER"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<Frames>
<Frame parentKey="ReadyCheck" inherits="ReadyCheckStatusTemplate" hidden="true">
<Size x="40" y="40"/>
<Anchors>
<Anchor point="CENTER" relativeKey="$parent.$parent.$parent.PlayerFrameContainer.PlayerPortrait" relativePoint="CENTER"/>
</Anchors>
<Scripts>
<OnLoad function="RaiseFrameLevelByTwo"/>
</Scripts>
</Frame>
<Frame parentKey="PlayerRestLoop" alpha="1" setAllPoints="true" hidden="true">
<Size x="20" y="20"/>
<Anchors>
<Anchor point="TOPLEFT" x="67" y="-6"/>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<Texture parentKey="RestTexture" alpha="1" alphaMode="BLEND" atlas="UI-HUD-UnitFrame-Player-Rest-Flipbook">
<Size x="20" y="20"/>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<Animations>
<AnimationGroup parentKey="PlayerRestLoopAnim" looping="REPEAT" setToFinalAlpha="true">
<FlipBook smoothing="NONE" childKey="RestTexture" duration="2" order="1" flipBookRows="1" flipBookColumns="8" flipBookFrames="8" flipBookFrameWidth="0" flipBookFrameHeight="0"/>
</AnimationGroup>
</Animations>
</Frame>
<Frame parentKey="PlayerPlayTime" enableMouse="true" hidden="true" useParentLevel="true">
<Size x="29" y="29"/>
<Anchors>
<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="-21" y="-24"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture parentKey="PlayTimeIcon" atlas="UI-HUD-UnitFrame-Player-PlayTimeTired" useAtlasSize="true"/>
</Layer>
</Layers>
<Scripts>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(self.tooltip, nil, nil, nil, nil, true);
</OnEnter>
<OnLeave function="GameTooltip_Hide"/>
</Scripts>
</Frame>
<!-- The width of GroupIndicator is set based on the text it shows. In theory it may be possible for
it to overlap LeaderIcon/GuideIcon if either is showing and the group value is very large. -->
<Frame parentKey="GroupIndicator" hidden="true">
<Size x="10" y="16"/>
<Anchors>
<Anchor point="BOTTOMRIGHT" relativePoint="TOPLEFT" x="210" y="-27"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="PlayerFrameGroupIndicatorLeft" file="Interface\CharacterFrame\UI-CharacterFrame-GroupIndicator">
<Size x="24" y="16"/>
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
<TexCoords left="0" right="0.1875" top="0" bottom="1"/>
</Texture>
<Texture name="PlayerFrameGroupIndicatorRight" file="Interface\CharacterFrame\UI-CharacterFrame-GroupIndicator">
<Size x="24" y="16"/>
<Anchors>
<Anchor point="TOPRIGHT"/>
</Anchors>
<TexCoords left="0.53125" right="0.71875" top="0" bottom="1"/>
</Texture>
<Texture name="PlayerFrameGroupIndicatorMiddle" file="Interface\CharacterFrame\UI-CharacterFrame-GroupIndicator">
<Size x="0" y="16"/>
<Anchors>
<Anchor point="LEFT" relativeTo="PlayerFrameGroupIndicatorLeft" relativePoint="RIGHT"/>
<Anchor point="RIGHT" relativeTo="PlayerFrameGroupIndicatorRight" relativePoint="LEFT"/>
</Anchors>
<TexCoords left="0.1875" right="0.53125" top="0" bottom="1"/>
</Texture>
<FontString name="PlayerFrameGroupIndicatorText" inherits="GameFontHighlightSmall">
<Anchors>
<Anchor point="LEFT" x="20" y="-2"/>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad>
PlayerFrameGroupIndicatorLeft:SetAlpha(0.3);
PlayerFrameGroupIndicatorRight:SetAlpha(0.3);
PlayerFrameGroupIndicatorMiddle:SetAlpha(0.3);
PlayerFrameGroupIndicatorText:SetAlpha(0.7);
</OnLoad>
</Scripts>
</Frame>
</Frames>
</Frame>
</Frames>
</Frame>
<Frame name="PlayerFrameDropDown" inherits="UIDropDownMenuTemplate" id="1" hidden="true">
<Size x="10" y="10"/>
<Anchors>
<Anchor point="TOP" x="-10" y="-50"/>
</Anchors>
<Scripts>
<OnLoad function="PlayerFrameDropDown_OnLoad"/>
</Scripts>
</Frame>
</Frames>
<Scripts>
<OnLoad function="PlayerFrame_OnLoad" inherit="append"/>
<OnEvent function="PlayerFrame_OnEvent"/>
<OnUpdate function="PlayerFrame_OnUpdate"/>
<OnEnter function="UnitFrame_OnEnter"/>
<OnLeave function="UnitFrame_OnLeave"/>
<OnReceiveDrag function="PlayerFrame_OnReceiveDrag"/>
</Scripts>
</Button>
<Frame name="PlayerFrameBottomManagedFrameTemplate" inherits="UIParentManagedFrameTemplate" virtual="true">
<KeyValues>
<KeyValue key="layoutParent" value="PlayerFrameBottomManagedFramesContainer" type="global"/>
<KeyValue key="align" value="center" type="string"/>
</KeyValues>
</Frame>
<Frame name="PlayerFrameManagedContainerTemplate" parent="PlayerFrame" inherits="VerticalLayoutFrame" mixin="UIParentManagedFrameContainerMixin" virtual="true">
<KeyValues>
<KeyValue key="spacing" value="2" type="number"/>
</KeyValues>
<Frames>
<Frame parentKey="BottomManagedLayoutContainer" inherits="HorizontalLayoutFrame">
<KeyValues>
<KeyValue key="layoutIndex" value="500" type="number"/>
<KeyValue key="spacing" value="-10" type="number"/>
<KeyValue key="align" value="center" type="string"/>
<KeyValue key="fixedWidth" value="160" type="number"/>
</KeyValues>
</Frame>
</Frames>
<Scripts>
<OnLoad method="OnLoad"/>
</Scripts>
</Frame>
<Frame name="PlayerFrameBottomManagedFramesContainer" inherits="PlayerFrameManagedContainerTemplate" mixin="PlayerFrameBottomManagedFramesContainerMixin">
<KeyValues>
<KeyValue key="fixedWidth" value="160" type="number"/>
</KeyValues>
<Anchors>
<Anchor point="TOP" relativeTo="PlayerFrame" relativePoint="BOTTOM" x="30" y="25"/>
</Anchors>
</Frame>
</Ui>