comparison Turok/Layout/Dialog.xml @ 6:a9b8b0866ece

clear out log jam
author Nenue
date Sun, 21 Feb 2016 08:32:53 -0500
parents
children 9400a0ff8540
comparison
equal deleted inserted replaced
5:8a9a6637f082 6:a9b8b0866ece
1 <Ui>
2 <!-- Visual element structures for configuration interfaces -->
3 <Script file="Dialog.lua" />
4 <Font name="TkDialogFieldFont" font="Interface\Addons\Turok\Media\font\ArchivoNarrow-Bold.ttf" outline="NORMAL">
5 <Color r="1" g="1" b="1" a="1" />
6 <FontHeight>
7 <AbsValue val="13"/>
8 </FontHeight>
9 </Font>
10
11
12 <Button name="TurokButton" virtual="true" parentArray="buttons" enableMouse="true">
13 <Scripts>
14 <OnShow>
15 self:RegisterForClicks("LeftButtonUp")
16 self.bname:SetText(self:GetName():match("_(%a+)$"))
17 </OnShow>
18 <OnClick>
19 self:GetParent().Click(self, self:GetParent())
20 </OnClick>
21 </Scripts>
22 <NormalTexture setAllPoints="true">
23 <Color r="0" g="0" b="0" a="1" />
24 </NormalTexture>
25 <PushedTexture setAllPoints="true" alphaMode="ADD">
26 <Color r="1" g="0.5" b="0" a="1" />
27 </PushedTexture>
28 <HighlightTexture setAllPoints="true" alphaMode="ADD">
29 <Color r="0.5" g="0.1" b=".4" a="1" />
30 </HighlightTexture>
31 <DisabledTexture setAllPoints="true">
32 <Color r="0.4" g="0.4" b="0.4" a="1" />
33 </DisabledTexture>
34 <Size x="100" y="20" />
35 <Layers>
36 <Layer level="BACKDROP">
37 </Layer>
38 <Layer level="OVERLAY">
39 <FontString inherits="TurokFont" parentKey="bname" justifyH="CENTER" justifyV="MIDDLE" setAllPoints="true" text="Foo" />
40 </Layer>
41 <Layer level="HIGHLIGHT">
42 </Layer>
43 </Layers>
44 </Button>
45
46 <Frame name="TurokDialogMenu" parent="UIParent" enableMouse="true" hidden="true">
47 <Size x="200" y="200" />
48 <Anchors>
49 <Anchor point="TOPLEFT" />
50 </Anchors>
51 <Layers>
52 <Layer level="BACKGROUND">
53 <Texture setAllPoints="true">
54 <Color r="0" g="0" b="0" a="0.2" />
55 </Texture>
56 </Layer>
57 </Layers>
58 </Frame>
59
60 <CheckButton name="TurokCheckButton" virtual="true" enableMouse="true">
61 <Scripts>
62 <OnClick>
63 if self:GetParent().Check then
64 self:GetParent().Check(self, self:GetParent())
65 else
66 self:GetParent():GetParent().Check(self, self:GetParent(), self:GetParent():GetParent())
67 end
68 </OnClick>
69 </Scripts>
70 <NormalTexture>
71 <Color r="0.3" g="0.05" b="0.6" a="1" />
72 <Size x="16" y="16" />
73 <Anchors>
74 <Anchor point="TOPLEFT" x="2" y="-2" />
75 </Anchors>
76 </NormalTexture>
77 <PushedTexture>
78 <Color r="0" g="0" b="0" a="1" />
79 <Size x="16" y="16" />
80 <Anchors>
81 <Anchor point="TOPLEFT" x="2" y="-2" />
82 </Anchors>
83 </PushedTexture>
84 <HighlightTexture>
85 <Color r="1" g="0" b="0" a="0.1" />
86 <Size x="16" y="16" />
87 <Anchors>
88 <Anchor point="TOPLEFT" x="2" y="-2" />
89 </Anchors>
90 </HighlightTexture>
91 <CheckedTexture>
92 <Color r="1" g="1" b="0.5" a="1" />
93 <Size x="16" y="16" />
94 <Anchors>
95 <Anchor point="TOPLEFT" x="2" y="-2" />
96 </Anchors>
97 </CheckedTexture>
98
99 <DisabledCheckedTexture>
100 <Color r="0.7" g=".7" b=".7" a="1" />
101 <Size x="18" y="18" />
102 <Anchor point="TOPLEFT" />
103 </DisabledCheckedTexture>
104 </CheckButton>
105
106 <CheckButton name="TurokCheckButtonInline" inherits="TurokCheckButton" virtual="true" enableMouse="true">
107 <Size x="20" y="20" />
108 <Layers>
109 <Layer level="BORDER">
110 <Texture name="$parentBorder">
111 <Anchors>
112 <Anchor point="TOPLEFT" x="1" y="-1" />
113 <Anchor point="BOTTOMRIGHT" x="-1" y="1" />
114 </Anchors>
115 <Size x="18" y="18" />
116 <Color r="1" g="1" b="1" a="1" />
117 <Gradient>
118 <MinColor r="1" g="0" b=".5" a="1" />
119 <MaxColor r="0.5" g="0.9" b="1" a="1" />
120 </Gradient>
121 </Texture>
122 </Layer>
123 <Layer level="OVERLAY">
124 <FontString name="$parentDescText" inherits="TurokFontDetail" justifyH="LEFT" parentKey="description" text="Inline CheckButton">
125 <Anchors>
126 <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="4" y="-3" />
127 </Anchors>
128 </FontString>
129 </Layer>
130 </Layers>
131 </CheckButton>
132
133 <!-- CheckButton designed to collapse on top of an EditBox -->
134 <CheckButton name="TurokCheckButtonOverlay" inherits="TurokCheckButton" virtual="true" enableMouse="true" frameStrata="HIGH">
135 <Size x="20" y="48" />
136 <Layers>
137 <Layer level="BORDER">
138 <Texture name="$parentBorder">
139 <Size x="18" y="18" />
140 <Anchors>
141 <Anchor point="TOPLEFT" x="1" y="-1" />
142 </Anchors>
143 <Color r="1" g="1" b="1" a="1" />
144 <Gradient>
145 <MinColor r="1" g="0" b=".5" a="1" />
146 <MaxColor r="0.5" g="0.9" b="1" a="1" />
147 </Gradient>
148 </Texture>
149 </Layer>
150 <Layer level="OVERLAY">
151 <FontString name="$parentDescText" inherits="TurokFontDetail" justifyH="LEFT" parentKey="description" text="Overlay CheckButton">
152 <Anchors>
153 <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="4" y="-3" />
154 </Anchors>
155 </FontString>
156 </Layer>
157 </Layers>
158 </CheckButton>
159
160 <Frame name="TurokDialogFrame" parent="UIParent" enableMouse="true" hidden="true" movable="true" virtual="true" toplevel="true" mouseWheel="true">
161 <Scripts>
162 <OnShow>
163 for i, g in pairs({self:GetChildren()}) do
164 g:Show()
165 end
166 self:RegisterForDrag("LeftButton")
167 </OnShow>
168 <OnDragStart>
169 self:StartMoving()
170 </OnDragStart>
171 <OnDragStop>
172 self:StopMovingOrSizing()
173 </OnDragStop>
174 <OnMouseWheel>
175 self:Wheel(delta)
176 </OnMouseWheel>
177 </Scripts>
178 <Anchors>
179 <Anchor point="CENTER" />
180 </Anchors>
181 <Size x="300" y="200" />
182 <Layers>
183 <Layer level="BACKGROUND">
184 <Texture setAllPoints="true" blendMode="ADD">
185 <Color r="1" b="1" g="1" a="1" />
186 <Gradient orientation="HORIZONTAL">
187 <MinColor r="1" g="0" b="0.5" a="0.5" />
188 <MaxColor r="1" g=".5" b="0" a="0.5" />
189 </Gradient>
190 </Texture>
191 <Texture blendMode="ADD" parentKey="controls">
192 <Anchors>
193 <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" />
194 <Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT" />
195 </Anchors>
196 <Color r="1" b="1" g="1" a="1" />
197 <Gradient orientation="HORIZONTAL">
198 <MinColor r=".4" g=".4" b="1" a="1" />
199 <MaxColor r="1" g="0" b=".5" a="1" />
200 </Gradient>
201 </Texture>
202 </Layer>
203 <Layer level="BORDER">
204 <Texture blendMode="BLEND">
205 <Color r="0" g="0" b="0" a="1" />
206 <Anchors>
207 <Anchor point="TOPLEFT" />
208 <Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" x="0" y="-25" />
209 </Anchors>
210 </Texture>
211 </Layer>
212 <Layer level="OVERLAY">
213 <FontString name="$parentTitle" parentKey="name" inherits="TurokFont" justifyV="TOP" justifyH="LEFT" text="Set Title!">
214 <Color r="1" g="1" b="1" a="1" />
215 <Anchors>
216 <Anchor point="TOPLEFT" x="5" y="-5" />
217 </Anchors>
218 <Size x="200" y="40" />
219 </FontString>
220 <FontString name="$parentTitle" parentKey="pagenum" inherits="TurokFont" justifyV="TOP" justifyH="RIGHT">
221 <Color r="1" g="1" b="1" a="1" />
222 <Anchors>
223 <Anchor point="TOPRIGHT" x="-25" y="-5" />
224 </Anchors>
225 </FontString>
226 </Layer>
227 </Layers>
228 <Frames>
229
230 <Button name="$parentButton_Close" inherits="UIPanelCloseButton">
231 <Size x="30" y="30" />
232 <Anchors>
233 <Anchor point="TOPRIGHT" x="3" y="3" />
234 </Anchors>
235 </Button>
236 </Frames>
237 </Frame>
238
239 <!-- LIST FRAME OVERHEAD -->
240 <Frame name="TurokListFrame" inherits="TurokDialogFrame" virtual="true">
241 <Frames>
242 <Button name="$parentButton_Prev" inherits="TurokButton" />
243 <Button name="$parentButton_Add" inherits="TurokButton" />
244 <Button name="$parentButton_Next" inherits="TurokButton" />
245 </Frames>
246 </Frame>
247
248 <!-- LIST FRAME ROW -->
249 <Frame name="TurokListItem" parent="UIParent" parentArray="tabs" enableMouse="true" hidden="true" virtual="true">
250 <Scripts>
251 <OnEnter>
252 GameTooltip:SetOwner(self, "ANCHOR_LEFT");
253 if self.spellID then
254 GameTooltip:SetSpellByID(self.spellID);
255 else
256 GameTooltip:SetText(self.desc)
257 end
258 GameTooltip:Show();
259 </OnEnter>
260 <OnLeave function="GameTooltip_Hide"/>
261 </Scripts>
262 <Size x="300" y="30" />
263 <Layers>
264 <Layer level="BACKGROUND">
265 <Texture parentKey="background" name="$parentTab" blendMode="BLEND">
266 <Size x="50" y="21" />
267 <Color r="0" g="0" b="0" a=".3" />
268 <Anchors>
269 <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentTab" />
270 </Anchors>
271 </Texture>
272 </Layer>
273 <Layer level="HIGHLIGHT">
274 <Texture name="$parent_Highlight" parentKey="highlight" selAllPoints="true" blendMode="ADD">
275 <Color r="1" g="1" b="1" a=".25" />
276 </Texture>
277 </Layer>
278
279 <Layer level="OVERLAY">
280 </Layer>
281 </Layers>
282 </Frame>
283
284 <Frame name="TkWidgetScripts" virtual="true">
285 <Scripts>
286 <OnValueChanged>
287 if self.value then
288 self.value:SetText(tostring(math.floor(value)))
289 self.value:SetPoint('LEFT', self:GetThumbTexture(), 'LEFT', 1, 0)
290 end
291 </OnValueChanged>
292 </Scripts>
293 </Frame>
294
295 <Slider name="TkSlider" orientation="HORIZONTAL" enableMouse="true"
296 parentArray="_scroller"
297 minValue="0" maxValue="800" valueStep="4" stepsPerPage="3" defaultValue="400" inherits="TkWidgetScripts" virtual="true">
298 <HitRectInsets left="0" right="0" bottom="0" top="0" />
299 <Anchors><Anchor point="CENTER" /></Anchors>
300 <Size x="350" y="30" />
301 <ThumbTexture parentKey="thumb" name="$parentThumb">
302 <Color r="1" g=".45" b="0" a="1" />
303 <Size x="30" y="30" />
304 <Anchors>
305 <Anchor point="BOTTOM" />
306 </Anchors>
307 </ThumbTexture>
308 <Layers>
309 <Layer level="BACKGROUND">
310 <Texture parentKey="background">
311 <Color r="0" g="0" b="0" a="0.5" />
312 <Anchors>
313 <Anchor point="TOPLEFT" x="0" y="-16" />
314 <Anchor point="BOTTOMRIGHT" x="0" y="0" />
315 </Anchors>
316 </Texture>
317 </Layer>
318 <Layer level="OVERLAY">
319 <FontString parentKey="value" inherits="TurokFontDetail" />
320 <FontString parentkey="name" inherits="TurokFont">
321 <Anchors>
322 <Anchor point="TOPLEFT" relativePoint="TOPLEFT" />
323 </Anchors>
324 </FontString>
325 </Layer>
326 <Layer level="HIGHLIGHT">
327
328 <Texture alphaMode="MOD">
329 <Anchors>
330 <Anchor point="TOPLEFT" x="0" y="-16" />
331 <Anchor point="BOTTOMRIGHT" x="0" y="0" />
332 </Anchors>
333 <Color r="0.5" b="0.5" g="0.5" a="0.25" />
334 </Texture>
335 </Layer>
336 </Layers>
337 </Slider>
338
339
340 <EditBox name="TkEditBox" font="TurokFont" inherits="TkWidgetScripts" virtual="true"
341 historyLines="3"
342 autoFocus="false"
343 parentArray="_inputs">
344 <Backdrop bgFile="Interface\Addons\Turok\Media\border\BG-Solid.blp" edgeFile="Interface\Addons\Turok\Media\border\BigBorder-Solid.blp" tile="true">
345 <EdgeSize val="12"/>
346 <TileSize val="12"/>
347 <BorderColor r="0" g="0" b="0" a="1" />
348 <Color r="1" g="1" b="1" a="1" />
349 <BackgroundInsets>
350 <AbsInset left="3" right="3" top="3" bottom="3"/>
351 </BackgroundInsets>
352 </Backdrop>
353 <Scripts>
354 <OnEscapePressed>
355 self:ClearFocus()
356 </OnEscapePressed>
357 <OnEnterPressed>
358 self:ClearFocus()
359 </OnEnterPressed>
360 <OnEditFocusGained>
361 print(self:GetName(),'gained focus')
362 self.__bg = {self.background:GetTexture()}
363 self.background:SetTexture(0,0,0,1)
364 </OnEditFocusGained>
365 <OnEditFocusLost>
366 print(self:GetName(),'lost focus')
367 self:GetParent():GetParent().EditBox(self)
368 self.background:SetTexture(unpack(self.__bg))
369 self.__bg = nil
370 </OnEditFocusLost>
371 </Scripts>
372 <Size x="350" y="48" />
373 <TextInsets>
374 <AbsInset left="4" top="22" right="4" bottom="0" />
375 </TextInsets>
376 <Layers>
377 <Layer level="BACKGROUND">
378 <Texture parentKey="border" alphaMode="MOD">
379 <Anchors>
380 <Anchor point="BOTTOMLEFT" x="3" y="3" />
381 <Anchor point="TOPRIGHT" x="-3" y="-3" />
382 </Anchors>
383 <Color r="1" g="1" b="1" a="1" />
384 <Gradient orientation="HORIZONTAL">
385 <MinColor r="0.4" g="0" b="0.2" a="1" />
386 <MaxColor r="1" g="0.35" b="0.15" a="1" />
387 </Gradient>
388 </Texture>
389 </Layer>
390 <Layer level="BORDER">
391 <Texture parentKey="background">
392 <Color r="0" g="0" b="0" a="0.5" />
393 <Anchors>
394 <Anchor point="TOPLEFT" x="3" y="-22" />
395 <Anchor point="BOTTOMRIGHT" x="-3" y="3" />
396 </Anchors>
397 </Texture>
398 </Layer>
399 <Layer level="OVERLAY">
400 <FontString parentkey="description" inherits="TkDialogFieldFont" justifyV="TOP" justifyH="LEFT">
401 <Anchors>
402 <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="5" y="-6" />
403 </Anchors>
404 </FontString>
405 </Layer>
406 </Layers>
407 </EditBox>
408
409
410 <Button name="TurokDDButton" inherits="TurokButton" parent="UIParent" enableMouse="true" virtual="true">
411 <NormalTexture setAllPoints="true">
412 <Color r=".35" g="0" b=".7" a="1" />
413 </NormalTexture>
414 </Button>
415
416 <Frame name="TurokDialogRow" enableMouse="true" hidden="true" movable="true" virtual="true" toplevel="true" mouseWheel="true">
417 <Size x="200" y="42" />
418 </Frame>
419
420 <!-- TIMER EDIT FRAME -->
421 <Frame name="TkTimerConfig" parent="UIParent" hidden="true" inherits="TurokDialogFrame">
422 <Scripts>
423 <OnLoad>
424 self.Wheel = function(self, delta) print(self:GetName(), 'wheel stuff')
425 if self._scroller then
426 for i, region in ipairs(self._scroller) do
427 if region:IsMouseOver() then
428 print(self:GetName(),'hit #', i, region:GetName())
429 region:SetValue(region:GetValue()+delta)
430 end
431 end
432 else
433 print(self:GetName(),'no scrollwheel regions')
434 end
435 end
436
437 print('uhmmm', type(self))
438 LibStub("LibFog-1.0").SetAnimationGroup(self)
439 -- Turok stuff
440 </OnLoad>
441 <OnShow>
442 TkPanel_Init(self)
443 self:RegisterForDrag("LeftButton")
444 self.name:SetText(self.timerName)
445 self.pagenum:SetText(self.timerID)
446 self:SetAlpha(0)
447 self:Fade(0.2, 1)
448 </OnShow>
449 </Scripts>
450 <Size x="400" y="300" />
451 <Anchors>
452 <Anchor point="CENTER" />
453 </Anchors>
454 <Frames>
455
456
457 <Button name="$parentButton_Spells" inherits="TurokButton" />
458 <Button name="$parentButton_Move" inherits="TurokButton" />
459 <Button name="$parentButton_Delete" inherits="TurokButton" />
460 </Frames>
461 </Frame>
462 </Ui>