-
Notifications
You must be signed in to change notification settings - Fork 3
/
BankFrame.xml
96 lines (80 loc) · 3.25 KB
/
BankFrame.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
<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">
<!-- Copyright 2013 Mike Battersby -->
<Script file="BankFrame.lua" />
<!--
The reason we need the "placer" is so we can scale the bank frame and
still have the UIPanel placement stuff automatically place it in the
same location that the bank usually appears. ShowUIPanel doesn't take
into account the child scale and calls SetPoint on it in UIParent coords
which if the child is a different scale will put it in the wrong place.
Then we have to go to some annoying effort to keep the placer sized
the same as the actual bank frame.
UIPanelLayout stuff so the Blizzard UIParent code will position us
automatically. See
http://www.wowwiki.com/Creating_standard_left-sliding_frames
but note that UIPanelLayout-enabled isn't a thing at all.
-->
<Frame name="LiteBagBankPlacer" parent="UIParent" hidden="true">
<Size x="384" y="512" />
<Attributes>
<Attribute name="UIPanelLayout-defined" type="boolean" value="true" />
<Attribute name="UIPanelLayout-area" type="string" value="left" />
<Attribute name="UIPanelLayout-pushable" type="number" value="6" />
</Attributes>
<Scripts>
<OnShow>
local pos = LiteBagBank:GetOption('position')
if not pos then LiteBagBank:Show() end
</OnShow>
<OnHide>
local pos = LiteBagBank:GetOption('position')
if not pos then LiteBagBank:Hide() end
</OnHide>
</Scripts>
<!-- YELLOW OVERLAY FOR DEBUGGING -->
<!--
<Layers>
<Layer level="ARTWORK">
<Texture name="$parentTexture" setAllPoints="true">
<Color r="1.00" g="1.00" b="0.00" a="1"/>
</Texture>
</Layer>
</Layers>
-->
</Frame>
<Frame name="LiteBagBank" parent="UIParent" inherits="LiteBagFrameTemplate" mixin="LiteBagBankMixin">
<KeyValues>
<KeyValue key="FrameType" value="BANK" type="string" />
</KeyValues>
<Frames>
<Frame name="LiteBagBankPanel" parentArray="panels" inherits="LiteBagContainerPanelTemplate" hidden="true">
<Anchors> <Anchor point="TOPLEFT" /> </Anchors>
<KeyValues>
<KeyValue key="PanelType" value="BANK" type="string" />
<KeyValue key="Title" value="BANK" type="global" />
</KeyValues>
</Frame>
</Frames>
<!-- This is the background the bank frame uses, but darkened a bit because it looks
super weird unless the slots are made lighter. -->
<Layers>
<Layer level="BACKGROUND">
<Texture file="Interface\BankFrame\Bank-Background" horizTile="true" vertTile="true">
<Color r="0.6" g="0.6" b="0.6" />
<Size x="256" y="256"/>
<Anchors>
<Anchor point="TOPLEFT" x="0" y="-20"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<Anchors>
<Anchor point="TOPLEFT" />
</Anchors>
<Scripts>
<OnLoad method="OnLoad" />
<OnEvent method="OnEvent" />
</Scripts>
</Frame>
</Ui>