Mercurial > wow > devian
comparison Devian.xml @ 13:080dfa4990fb
necessary abstractions for running multiple console buffers in place
message prefix can act as a channel selector when tagged in savedvars
more frame vars defined in the XML
XML parentKey names organized
author | Nenue |
---|---|
date | Sat, 19 Dec 2015 07:59:12 -0500 |
parents | 65fcb81f4e0a |
children | 5254d1ba6013 |
comparison
equal
deleted
inserted
replaced
12:0f91c3679c01 | 13:080dfa4990fb |
---|---|
1 <Ui> | 1 <Ui> |
2 <Frame name="DevianConsole" parent="UIParent" enableMouse="true" enableMouseWheel="true" movable="true" resizable="true" toplevel="true" hidden="true" clampedToScreen="true"> | 2 <Frame |
3 name="DevianConsole" | |
4 parent="UIParent" | |
5 enableMouse="true" | |
6 enableMouseWheel="true" | |
7 clampedToScreen="true" | |
8 movable="true" | |
9 resizable="true" | |
10 toplevel="true" | |
11 hidden="true" | |
12 virtual="true"> | |
3 <KeyValues> | 13 <KeyValues> |
14 <KeyValue key="index" type="number" value="1" /> | |
15 <KeyValue key="name" value="Devian" /> | |
4 <KeyValue key="format" value="Devian [%s]" /> | 16 <KeyValue key="format" value="Devian [%s]" /> |
5 </KeyValues> | 17 </KeyValues> |
6 <ResizeBounds> | 18 <ResizeBounds> |
7 <minResize x="200" y="20" /> | 19 <minResize x="200" y="20" /> |
8 <maxResize x="1920" y="1200" /> | 20 <maxResize x="1920" y="1200" /> |
9 </ResizeBounds> | 21 </ResizeBounds> |
10 <Scripts> | 22 <Scripts> |
11 <OnMouseDown> | 23 <OnMouseDown> |
12 if button == 'LeftButton' then | 24 if button == 'LeftButton' then |
13 if self.sizer:IsMouseOver() then | 25 if self.grip:IsMouseOver() then |
14 return self:StartSizing() | 26 return self:StartSizing() |
15 end | 27 end |
16 return self:StartMoving() | 28 return self:StartMoving() |
17 end | 29 end |
18 </OnMouseDown> | 30 </OnMouseDown> |
19 <OnMouseUp> | 31 <OnMouseUp> |
20 if button == 'RightButton' then | 32 if button == 'RightButton' then |
21 return Devian:ToggleMinMax() | 33 return self:MinMax() |
22 end | 34 end |
23 self:StopMovingOrSizing() | 35 self:StopMovingOrSizing() |
24 Devian:SavePos() | 36 self:Save() |
25 </OnMouseUp> | 37 </OnMouseUp> |
26 <OnMouseWheel> | 38 <OnMouseWheel> |
27 local up = delta > 0 | 39 local up = delta > 0 |
28 if IsControlKeyDown() then | 40 if IsControlKeyDown() then |
29 if up then self.console:ScrollToTop() | 41 if up then self.out:ScrollToTop() |
30 else self.console:ScrollToBottom() end | 42 else self.out:ScrollToBottom() end |
31 elseif IsShiftKeyDown() then | 43 elseif IsShiftKeyDown() then |
32 if up then self.console:PageUp() | 44 if up then self.out:PageUp() |
33 else self.console:PageDown() end | 45 else self.out:PageDown() end |
34 else | 46 else |
35 if up then self.console:ScrollUp() | 47 if up then self.out:ScrollUp() |
36 else self.console:ScrollDown() end | 48 else self.out:ScrollDown() end |
37 end | 49 end |
38 </OnMouseWheel> | 50 </OnMouseWheel> |
39 <OnUpdate> | 51 <OnUpdate> |
40 if not self.throttle then | 52 if not self.throttle then |
41 self.throttle = GetTime() | 53 self.throttle = GetTime() |
43 return | 55 return |
44 else | 56 else |
45 self.throttle = GetTime() | 57 self.throttle = GetTime() |
46 end | 58 end |
47 | 59 |
48 self.text:SetText(string.format(self.format, GetTime())) | 60 self.header:SetText(string.format(self.format, GetTime())) |
49 </OnUpdate> | 61 </OnUpdate> |
50 </Scripts> | 62 </Scripts> |
51 | 63 |
52 <Frames> | 64 <Frames> |
53 <ScrollingMessageFrame name="$parentBuffer" parentkey="console" maxLines="500" displayduration="2000000"> | 65 <ScrollingMessageFrame |
66 name="$parentScrollFrame" | |
67 parentkey="out" | |
68 maxLines="500" | |
69 fade="false" | |
70 displayduration="2147483647" | |
71 insertMode="BOTTOM"> | |
54 <Anchors> | 72 <Anchors> |
55 <Anchor point="TOPLEFT" y="-20" /> | 73 <Anchor point="TOPLEFT" y="-20" /> |
56 <Anchor point="BOTTOMRIGHT" /> | 74 <Anchor point="BOTTOMRIGHT" /> |
57 </Anchors> | 75 </Anchors> |
58 <FontString font="Interface\Addons\Devian\font\SourceCodePro-Regular.ttf" wordwrap="true" | 76 <FontString font="Interface\Addons\Devian\font\SourceCodePro-Regular.ttf" wordwrap="true" |
64 </FontHeight> | 82 </FontHeight> |
65 </FontString> | 83 </FontString> |
66 | 84 |
67 <Layers> | 85 <Layers> |
68 <Layer level="BACKGROUND"> | 86 <Layer level="BACKGROUND"> |
69 <Texture name="DevianConsoleBG" parentKey="backdrop" setAllPoints="true" alphaMode="BLEND"> | 87 <Texture name="$parentbg" parentKey="backdrop" setAllPoints="true" alphaMode="BLEND"> |
70 <Color r="1" g="1" b="1" a="1"/> | 88 <Color r="1" g="1" b="1" a="1"/> |
71 <Gradient orientation="VERTICAL"> | 89 <Gradient orientation="VERTICAL"> |
72 <MinColor r="0" g="0" b="0" a="0.7"/> | 90 <MinColor r="0" g="0" b="0" a="0.7"/> |
73 <MaxColor r="0" g="0" b="0" a="0.3"/> | 91 <MaxColor r="0" g="0" b="0" a="0.3"/> |
74 </Gradient> | 92 </Gradient> |
76 </Layer> | 94 </Layer> |
77 </Layers> | 95 </Layers> |
78 </ScrollingMessageFrame> | 96 </ScrollingMessageFrame> |
79 </Frames> | 97 </Frames> |
80 <Layers> | 98 <Layers> |
81 <Layer level="OVERLAY"> | 99 <Layer level="BORDER"> |
82 <Texture parentKey="tbar" alphaMode="BLEND"> | 100 <Texture parentKey="titlebar" alphaMode="BLEND"> |
83 <Anchors> | 101 <Anchors> |
84 <Anchor point="TOPLEFT" /> | 102 <Anchor point="TOPLEFT" /> |
85 <Anchor point="TOPRIGHT" /> | 103 <Anchor point="TOPRIGHT" /> |
86 </Anchors> | 104 </Anchors> |
87 <Size y="20" /> | 105 <Size y="20" /> |
89 <Gradient orientation="VERTICAL"> | 107 <Gradient orientation="VERTICAL"> |
90 <MinColor r="0" g="0" b="0" a="0.7"/> | 108 <MinColor r="0" g="0" b="0" a="0.7"/> |
91 <MaxColor r="0.3" g="0.3" b="0.3" a="0.7"/> | 109 <MaxColor r="0.3" g="0.3" b="0.3" a="0.7"/> |
92 </Gradient> | 110 </Gradient> |
93 </Texture> | 111 </Texture> |
94 <FontString parentKey="text" font="Interface\Addons\Devian\font\SourceCodePro-Bold.ttf" wordwrap="true" | 112 <FontString parentKey="header" font="Interface\Addons\Devian\font\SourceCodePro-Bold.ttf" wordwrap="true" |
95 justifyH="LEFT" | 113 justifyH="LEFT" |
96 indented="true"> | 114 indented="true"> |
97 <Anchors> | 115 <Anchors> |
98 <Anchor point="TOPLEFT" x="4" y="-2" /> | 116 <Anchor point="TOPLEFT" x="4" y="-2" /> |
99 <Anchor point="TOPRIGHT" x="-4" /> | 117 <Anchor point="TOPRIGHT" x="-4" /> |
102 <FontHeight> | 120 <FontHeight> |
103 <AbsValue val="12"/> | 121 <AbsValue val="12"/> |
104 </FontHeight> | 122 </FontHeight> |
105 </FontString> | 123 </FontString> |
106 </Layer> | 124 </Layer> |
107 <Layer level="HIGHLIGHT"> | 125 <Layer level="OVERLAY"> |
108 <Texture parentKey="sizer" strata="HIGH" alphaMode="ADD"> | 126 <Texture parentKey="grip" strata="HIGH" alphaMode="ADD"> |
109 <Anchors> | 127 <Anchors> |
110 <Anchor point="BOTTOMRIGHT" /> | 128 <Anchor point="BOTTOMRIGHT" x="-1" y="1" /> |
111 </Anchors> | 129 </Anchors> |
112 <Size x="20" y="20" /> | 130 <Size x="18" y="18" /> |
113 <Color r="1" g="1" b="1" a="0.7"/> | 131 <Color r="1" g="1" b="1" a="1"/> |
132 <Gradient orientation="VERTICAL"> | |
133 <MaxColor r="0.2" g="0.2" b="0.2" a="1"/> | |
134 <MinColor r="0.5" g="0.5" b="0.5" a="1"/> | |
135 </Gradient> | |
114 </Texture> | 136 </Texture> |
115 </Layer> | 137 </Layer> |
116 </Layers> | 138 </Layers> |
117 </Frame> | 139 </Frame> |
118 </Ui> | 140 </Ui> |