vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | <!--$Id: templates.xml 7996 2006-08-14 17:02:54Z hk2717 $--> |
2 | <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"> |
||
3 | |||
4 | <Button name="OneBankItemButtonTemplate" inherits="BankItemButtonGenericTemplate" virtual="true"> |
||
5 | <Scripts> |
||
6 | <OnLoad> |
||
7 | BankFrameItemButton_OnLoad() |
||
8 | this:SetNormalTexture("Interface\\AddOns\\OneBag\\BagSlot") |
||
9 | </OnLoad> |
||
10 | <OnShow> |
||
11 | BankFrameItemButton_OnUpdate() |
||
12 | </OnShow> |
||
13 | </Scripts> |
||
14 | <Frames> |
||
15 | <Model name="$parentCooldown" inherits="CooldownFrameTemplate"> |
||
16 | <Size x="39" y="39"/> |
||
17 | <Anchors> |
||
18 | <Anchor point="CENTER"> |
||
19 | <Offset> |
||
20 | <AbsDimension x="0" y="-1"/> |
||
21 | </Offset> |
||
22 | </Anchor> |
||
23 | </Anchors> |
||
24 | </Model> |
||
25 | </Frames> |
||
26 | </Button> |
||
27 | |||
28 | <Button name="OneBagItemButtonTemplate" inherits="ContainerFrameItemButtonTemplate" virtual="true"> |
||
29 | <Scripts> |
||
30 | <OnLoad> |
||
31 | ContainerFrameItemButton_OnLoad() |
||
32 | this:SetNormalTexture("Interface\\AddOns\\OneBag\\BagSlot") |
||
33 | </OnLoad> |
||
34 | </Scripts> |
||
35 | </Button> |
||
36 | |||
37 | <CheckButton name="OneBagBagTemplate" inherits="BagSlotButtonTemplate" virtual="true"> |
||
38 | <Scripts> |
||
39 | <OnClick> |
||
40 | PlaySound("BAGMENUBUTTONPRESS") |
||
41 | PutItemInBag(this:GetID()) |
||
42 | |||
43 | if not this:GetChecked() then |
||
44 | OneBag:UnhighlightBagSlots(this:GetID()-19) |
||
45 | if OneBag.frame.bags[this:GetID()-19] then |
||
46 | OneBag.frame.bags[this:GetID()-19].colorLocked = false |
||
47 | end |
||
48 | else |
||
49 | if OneBag.frame.bags[this:GetID()-19] then |
||
50 | OneBag.frame.bags[this:GetID()-19].colorLocked = true |
||
51 | end |
||
52 | end |
||
53 | OneBag:OrganizeFrame(true) |
||
54 | </OnClick> |
||
55 | <OnEnter> |
||
56 | OneBag:HighlightBagSlots(this:GetID()-19) |
||
57 | BagSlotButton_OnEnter() |
||
58 | </OnEnter> |
||
59 | <OnLeave> |
||
60 | if not this:GetChecked() then |
||
61 | OneBag:UnhighlightBagSlots(this:GetID()-19) |
||
62 | if OneBag.frame.bags[this:GetID()-19] then |
||
63 | OneBag.frame.bags[this:GetID()-19].colorLocked = false |
||
64 | end |
||
65 | else |
||
66 | if OneBag.frame.bags[this:GetID()-19] then |
||
67 | OneBag.frame.bags[this:GetID()-19].colorLocked = true |
||
68 | end |
||
69 | end |
||
70 | this.updateTooltip = nil |
||
71 | GameTooltip:Hide() |
||
72 | ResetCursor() |
||
73 | </OnLeave> |
||
74 | </Scripts> |
||
75 | </CheckButton> |
||
76 | |||
77 | <CheckButton name="OneBankBagTemplate" inherits="BankItemButtonBagTemplate" virtual="true"> |
||
78 | <Scripts> |
||
79 | <OnClick> |
||
80 | PlaySound("BAGMENUBUTTONPRESS") |
||
81 | PutItemInBag(this:GetInventorySlot()) |
||
82 | |||
83 | if not this:GetChecked() and OneBank.frame.bags[this:GetID()] then |
||
84 | OneBank:UnhighlightBagSlots(this:GetID()) |
||
85 | OneBank.frame.bags[this:GetID()].colorLocked = false |
||
86 | elseif OneBank.frame.bags[this:GetID()] then |
||
87 | OneBank.frame.bags[this:GetID()].colorLocked = true |
||
88 | end |
||
89 | </OnClick> |
||
90 | <OnEnter> |
||
91 | OneBank:HighlightBagSlots(this:GetID()) |
||
92 | GameTooltip:SetOwner(this, "ANCHOR_RIGHT") |
||
93 | if ( not GameTooltip:SetInventoryItem("player", this:GetInventorySlot()) ) then |
||
94 | if ( this.isBag ) then |
||
95 | GameTooltip:SetText(this.tooltipText) |
||
96 | end |
||
97 | end |
||
98 | CursorUpdate() |
||
99 | </OnEnter> |
||
100 | <OnLeave> |
||
101 | if not this:GetChecked() and OneBank.frame.bags[this:GetID()] then |
||
102 | OneBank:UnhighlightBagSlots(this:GetID()) |
||
103 | OneBank.frame.bags[this:GetID()].colorLocked = false |
||
104 | elseif OneBank.frame.bags[this:GetID()] then |
||
105 | OneBank.frame.bags[this:GetID()].colorLocked = true |
||
106 | end |
||
107 | GameTooltip:Hide() |
||
108 | ResetCursor() |
||
109 | </OnLeave> |
||
110 | </Scripts> |
||
111 | <CheckedTexture alphaMode="ADD" file="Interface\Buttons\CheckButtonHilight"/> |
||
112 | </CheckButton> |
||
113 | |||
114 | <Frame name="OneBagBaseFrameTemplate" virtual="true" toplevel="true" frameStrata="LOW" enableMouse="true" movable="true" hidden="true"> |
||
115 | <Backdrop bgFile="Interface\ChatFrame\ChatFrameBackground" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true"> |
||
116 | <BackgroundInsets> |
||
117 | <AbsInset left="5" right="5" top="5" bottom="5"/> |
||
118 | </BackgroundInsets> |
||
119 | <TileSize> |
||
120 | <AbsValue val="16"/> |
||
121 | </TileSize> |
||
122 | <EdgeSize> |
||
123 | <AbsValue val="16"/> |
||
124 | </EdgeSize> |
||
125 | </Backdrop> |
||
126 | <Scripts> |
||
127 | <OnShow> |
||
128 | this.handler:OnBaseShow() |
||
129 | </OnShow> |
||
130 | <OnHide> |
||
131 | this.handler:OnBaseHide() |
||
132 | </OnHide> |
||
133 | </Scripts> |
||
134 | </Frame> |
||
135 | |||
136 | <Frame name="OneBagFrameTemplate" inherits="OneBagBaseFrameTemplate" virtual="true"> |
||
137 | <Frames> |
||
138 | <Button name="$parentCloseButton" inherits="UIPanelCloseButton"> |
||
139 | <Anchors> |
||
140 | <Anchor point="TOPRIGHT" relativeTo="$parent" relativePoint="TOPRIGHT"> |
||
141 | <Offset> |
||
142 | <AbsDimension x="0" y="0"/> |
||
143 | </Offset> |
||
144 | </Anchor> |
||
145 | </Anchors> |
||
146 | <Scripts> |
||
147 | <OnClick> |
||
148 | this:GetParent():Hide() |
||
149 | </OnClick> |
||
150 | </Scripts> |
||
151 | </Button> |
||
152 | <Button name="$parentConfigButton" inherits="UIPanelButtonTemplate"> |
||
153 | <Anchors> |
||
154 | <Anchor point="RIGHT" relativeTo="$parentCloseButton" relativePoint="LEFT"> |
||
155 | <Offset> |
||
156 | <AbsDimension x="0" y="0"/> |
||
157 | </Offset> |
||
158 | </Anchor> |
||
159 | </Anchors> |
||
160 | <Size> |
||
161 | <AbsDimension x="60" y="20"/> |
||
162 | </Size> |
||
163 | <Scripts> |
||
164 | <OnClick> |
||
165 | this:GetParent().handler:OpenMenu() |
||
166 | </OnClick> |
||
167 | <OnLoad> |
||
168 | this:SetText(ONEBAG_LOCALE_MENU) |
||
169 | </OnLoad> |
||
170 | </Scripts> |
||
171 | </Button> |
||
172 | <Button name="$parentBagButton"> |
||
173 | <Size> |
||
174 | <AbsDimension x="32" y="30"/> |
||
175 | </Size> |
||
176 | <Anchors> |
||
177 | <Anchor point="TOPLEFT"> |
||
178 | <Offset> |
||
179 | <AbsDimension x="3" y="-9"/> |
||
180 | </Offset> |
||
181 | </Anchor> |
||
182 | </Anchors> |
||
183 | <Scripts> |
||
184 | <OnClick> |
||
185 | local bagFrame = this:GetParent().bagFrame |
||
186 | if bagFrame:IsVisible() then |
||
187 | this:SetNormalTexture("Interface\\Buttons\\UI-SpellbookIcon-PrevPage-Up") |
||
188 | this:SetPushedTexture("Interface\\Buttons\\UI-SpellbookIcon-PrevPage-Down") |
||
189 | bagFrame:Hide() |
||
190 | else |
||
191 | this:SetNormalTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Up") |
||
192 | this:SetPushedTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Down") |
||
193 | bagFrame:Show() |
||
194 | end |
||
195 | </OnClick> |
||
196 | <OnLoad> |
||
197 | getglobal(this:GetParent():GetName() .. "Name"):ClearAllPoints() |
||
198 | getglobal(this:GetParent():GetName() .. "Name"):SetPoint("LEFT", this:GetName(), "RIGHT", 5, 1) |
||
199 | </OnLoad> |
||
200 | </Scripts> |
||
201 | <NormalTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Up"/> |
||
202 | <PushedTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Down"/> |
||
203 | <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/> |
||
204 | </Button> |
||
205 | <Frame name="$parentMoneyFrame" inherits="SmallMoneyFrameTemplate"> |
||
206 | <Size> |
||
207 | <AbsDimension x="206" y="14"/> |
||
208 | </Size> |
||
209 | <Anchors> |
||
210 | <Anchor point="BOTTOMRIGHT" relativeTo="$parent" relativePoint="BOTTOMRIGHT"> |
||
211 | <Offset> |
||
212 | <AbsDimension x="0" y="8"/> |
||
213 | </Offset> |
||
214 | </Anchor> |
||
215 | </Anchors> |
||
216 | </Frame> |
||
217 | </Frames> |
||
218 | <Layers> |
||
219 | <Layer level="ARTWORK"> |
||
220 | <FontString name="$parentName" inherits="GameFontNormal" justifyH="LEFT"> |
||
221 | <Anchors> |
||
222 | <Anchor point="LEFT" relativeTo="$parentBagButton" relativePoint="RIGHT"> |
||
223 | <Offset> |
||
224 | <AbsDimension x="5" y="1"/> |
||
225 | </Offset> |
||
226 | </Anchor> |
||
227 | </Anchors> |
||
228 | </FontString> |
||
229 | <FontString name="$parentInfo1" inherits="GameFontNormal" justifyH="LEFT"> |
||
230 | <Anchors> |
||
231 | <Anchor point="BOTTOMLEFT"> |
||
232 | <Offset> |
||
233 | <AbsDimension x="8" y="9"/> |
||
234 | </Offset> |
||
235 | </Anchor> |
||
236 | </Anchors> |
||
237 | </FontString> |
||
238 | <FontString name="$parentInfo2" inherits="GameFontNormal" justifyH="LEFT"> |
||
239 | <Anchors> |
||
240 | <Anchor point="TOPLEFT" relativeTo="$parentInfo1" relativePoint="TOPRIGHT"> |
||
241 | <Offset> |
||
242 | <AbsDimension x="5" y="0"/> |
||
243 | </Offset> |
||
244 | </Anchor> |
||
245 | </Anchors> |
||
246 | </FontString> |
||
247 | <FontString name="$parentInfo3" inherits="GameFontNormal" justifyH="LEFT"> |
||
248 | <Anchors> |
||
249 | <Anchor point="TOPLEFT" relativeTo="$parentInfo2" relativePoint="TOPRIGHT"> |
||
250 | <Offset> |
||
251 | <AbsDimension x="5" y="0"/> |
||
252 | </Offset> |
||
253 | </Anchor> |
||
254 | </Anchors> |
||
255 | </FontString> |
||
256 | <FontString name="$parentInfo4" inherits="GameFontNormal" justifyH="LEFT"> |
||
257 | <Anchors> |
||
258 | <Anchor point="TOPLEFT" relativeTo="$parentInfo3" relativePoint="TOPRIGHT"> |
||
259 | <Offset> |
||
260 | <AbsDimension x="5" y="0"/> |
||
261 | </Offset> |
||
262 | </Anchor> |
||
263 | </Anchors> |
||
264 | </FontString> |
||
265 | </Layer> |
||
266 | </Layers> |
||
267 | <Scripts> |
||
268 | <OnLoad> |
||
269 | tinsert(UISpecialFrames,this:GetName()) |
||
270 | this:RegisterForDrag("LeftButton") |
||
271 | </OnLoad> |
||
272 | <OnDragStart> |
||
273 | if not this.handler.db.profile.locked then |
||
274 | this:StartMoving() |
||
275 | this.isMoving = true |
||
276 | |||
277 | for bag = -1, 10 do |
||
278 | if this.bags[bag] then |
||
279 | for slot = 1, this.bags[bag].size do |
||
280 | if this.bags[bag][slot] then |
||
281 | this.bags[bag][slot]:EnableMouse(false) |
||
282 | end |
||
283 | end |
||
284 | end |
||
285 | end |
||
286 | end |
||
287 | </OnDragStart> |
||
288 | <OnDragStop> |
||
289 | this:StopMovingOrSizing() |
||
290 | if this.isMoving then |
||
291 | local point = {} |
||
292 | point.top = this:GetTop() |
||
293 | point.left = this:GetLeft() |
||
294 | point.parent = this:GetParent():GetName() |
||
295 | |||
296 | this.handler.db.profile.point = point |
||
297 | |||
298 | for bag = -1, 10 do |
||
299 | if this.bags[bag] then |
||
300 | for slot = 1, this.bags[bag].size do |
||
301 | if this.bags[bag][slot] then |
||
302 | this.bags[bag][slot]:EnableMouse(true) |
||
303 | end |
||
304 | end |
||
305 | end |
||
306 | end |
||
307 | |||
308 | end |
||
309 | this.isMoving = false |
||
310 | </OnDragStop> |
||
311 | <OnHide> |
||
312 | this.handler:OnHide() |
||
313 | </OnHide> |
||
314 | <OnShow> |
||
315 | this.handler:OnShow() |
||
316 | </OnShow> |
||
317 | </Scripts> |
||
318 | </Frame> |
||
319 | |||
320 | </Ui> |