vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 <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">
2  
3 <Script file="Menu.lua"/>
4  
5 <!-- General Slider -->
6 <Slider name="BagnonSlider" inherits="OptionsSliderTemplate" virtual="true">
7 <Size x="216" y="18"/>
8 <Layers>
9 <Layer level="ARTWORK">
10 <FontString name="$parentValText" inherits="GameFontNormalSmall">
11 <Anchors>
12 <Anchor point="BOTTOM">
13 <Offset x="0" y="-6"/>
14 </Anchor>
15 </Anchors>
16 </FontString>
17 </Layer>
18 </Layers>
19 </Slider>
20  
21 <CheckButton name="BagnonCheckButton" virtual="true">
22 <Size x="32" y="32"/>
23  
24 <Anchors>
25 <Anchor point="TOPLEFT" relativePoint="TOPLEFT">
26 <Offset x="18" y="-36"/>
27 </Anchor>
28 </Anchors>
29  
30 <ButtonText name="$parentText" inherits="GameFontNormalSmall">
31 <Anchors>
32 <Anchor point="LEFT" relativePoint="RIGHT">
33 <Offset x="-2" y="0"/>
34 </Anchor>
35 </Anchors>
36 </ButtonText>
37 <NormalFont font="GameFontNormalSmall"/>
38  
39 <NormalTexture file="Interface\Buttons\UI-CheckBox-Up"/>
40 <PushedTexture file="Interface\Buttons\UI-CheckBox-Down"/>
41 <HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD"/>
42 <CheckedTexture file="Interface\Buttons\UI-CheckBox-Check"/>
43 </CheckButton>
44  
45 <!--
46 The right click menu
47 -->
48  
49 <Button name="BagnonMenu" clampedToScreen="true" enableMouse="true" frameStrata="DIALOG" hidden="true" parent="UIParent">
50 <Size x="254" y="390"/>
51  
52 <Backdrop bgFile="Interface\CharacterFrame\UI-Party-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
53 <BackgroundInsets>
54 <AbsInset left="11" right="12" top="12" bottom="11"/>
55 </BackgroundInsets>
56 <TileSize>
57 <AbsValue val="32"/>
58 </TileSize>
59 <EdgeSize>
60 <AbsValue val="32"/>
61 </EdgeSize>
62 </Backdrop>
63  
64 <Layers>
65 <Layer level="ARTWORK">
66 <FontString name="$parentText" inherits="GameFontHighlightLarge">
67 <Anchors>
68 <Anchor point="TOP">
69 <Offset x="0" y="-16"/>
70 </Anchor>
71 </Anchors>
72 </FontString>
73 </Layer>
74 </Layers>
75  
76 <Frames>
77 <Button name="$parentCloseButton" inherits="UIPanelCloseButton">
78 <Anchors>
79 <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT">
80 <Offset x="-8" y="-8"/>
81 </Anchor>
82 </Anchors>
83 </Button>
84  
85 <!-- checkbox -->
86 <CheckButton name="$parentLocked" inherits="BagnonCheckButton" text="BAGNON_OPTIONS_LOCK">
87 <Anchors>
88 <Anchor point="TOPLEFT" relativePoint="TOPLEFT">
89 <Offset x="18" y="-36"/>
90 </Anchor>
91 </Anchors>
92  
93 <Scripts>
94 <OnClick>
95 BagnonMenu_ToggleLock(this:GetParent().frame, this:GetChecked());
96 </OnClick>
97 </Scripts>
98 </CheckButton>
99  
100  
101 <!-- texture -->
102 <CheckButton name="$parentReverse" inherits="BagnonCheckButton" text="BAGNON_OPTIONS_REVERSE">
103 <Anchors>
104 <Anchor point="TOPLEFT" relativeTo="$parentLocked" relativePoint="BOTTOMLEFT"/>
105 </Anchors>
106  
107 <Scripts>
108 <OnClick>
109 BagnonMenu_ToggleOrder(this:GetParent().frame, this:GetChecked());
110 </OnClick>
111 </Scripts>
112 </CheckButton>
113  
114 <CheckButton name="$parentStayOnScreen" inherits="BagnonCheckButton" text="BAGNON_OPTIONS_STAY_ON_SCREEN">
115 <Anchors>
116 <Anchor point="TOPLEFT" relativeTo="$parentReverse" relativePoint="BOTTOMLEFT"/>
117 </Anchors>
118  
119 <Scripts>
120 <OnClick>
121 BagnonMenu_ToggleStayOnScreen(this:GetParent().frame, this:GetChecked());
122 </OnClick>
123 </Scripts>
124 </CheckButton>
125  
126 <!-- texture -->
127 <Button name="$parentBGSettings" text="BAGNON_OPTIONS_BACKGROUND">
128 <Size x="32" y="32"/>
129  
130 <Anchors>
131 <Anchor point="TOPLEFT" relativeTo="$parentStayOnScreen" relativePoint="BOTTOMLEFT">
132 <Offset x="4" y="2"/>
133 </Anchor>
134 </Anchors>
135  
136 <Layers>
137 <Layer level="BACKGROUND">
138 <Texture name="$parentSwatchBackground">
139 <Size x="24" y="24"/>
140  
141 <Anchors>
142 <Anchor point="LEFT"/>
143 </Anchors>
144  
145 <Color r="0.5" g="0.5" b="0.5"/>
146 </Texture>
147 </Layer>
148 </Layers>
149  
150 <NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\ChatFrameColorSwatch">
151 <Size x="30" y="30"/>
152  
153 <Anchors>
154 <Anchor point="LEFT">
155 <Offset x="-3" y="0"/>
156 </Anchor>
157 </Anchors>
158 </NormalTexture>
159  
160 <ButtonText>
161 <Anchors>
162 <Anchor point="LEFT" relativeTo="$parentNormalTexture" relativePoint="RIGHT">
163 <Offset x="-2" y="0"/>
164 </Anchor>
165 </Anchors>
166 </ButtonText>
167  
168 <NormalFont font="GameFontNormalSmall" justifyH="RIGHT"/>
169 <HighlightFont font="GameFontHighlightSmall" justifyH="RIGHT"/>
170  
171 <Scripts>
172 <OnLoad>
173 this:RegisterForClicks("LeftButtonUp", "RightButtonUp");
174 </OnLoad>
175 <OnClick>
176 BagnonMenuBG_OnClick(this:GetParent().frame);
177 </OnClick>
178 <OnHide>
179 this:UnlockHighlight();
180 </OnHide>
181 </Scripts>
182 </Button>
183  
184 <!-- Columns -->
185 <Slider name="$parentColumns" inherits="BagnonSlider" minValue="1" maxValue="32" valuestep="1">
186  
187 <Anchors>
188 <Anchor point="TOPLEFT" relativeTo="$parentBGSettings" relativePoint="BOTTOMLEFT">
189 <Offset x="-4" y="-12"/>
190 </Anchor>
191 </Anchors>
192  
193 <Scripts>
194 <OnLoad>
195 getglobal(this:GetName() .. "Text"):SetText(BAGNON_OPTIONS_COLUMNS);
196 getglobal(this:GetName() .. "Low"):SetText("1");
197 getglobal(this:GetName() .. "High"):SetText("32");
198 </OnLoad>
199 <OnValueChanged>
200 if(not this:GetParent().onShow) then
201 local frame = this:GetParent().frame;
202 BagnonFrame_Layout(frame, this:GetValue(), frame.space);
203 end
204 getglobal(this:GetName() .. "ValText"):SetText( this:GetValue() );
205 </OnValueChanged>
206 </Scripts>
207 </Slider>
208  
209 <!-- Spacing -->
210 <Slider name="$parentSpacing" inherits="BagnonSlider" minValue="0" maxValue="32" valuestep="1">
211  
212 <Anchors>
213 <Anchor point="TOP" relativeTo="$parentColumns" relativePoint="BOTTOM">
214 <Offset x="0" y="-24"/>
215 </Anchor>
216 </Anchors>
217  
218 <Scripts>
219 <OnLoad>
220 getglobal(this:GetName() .. "Text"):SetText(BAGNON_OPTIONS_SPACING);
221 getglobal(this:GetName() .. "Low"):SetText("0");
222 getglobal(this:GetName() .. "High"):SetText("32");
223 </OnLoad>
224 <OnValueChanged>
225 if(not this:GetParent().onShow) then
226 local frame = this:GetParent().frame;
227 BagnonFrame_Layout(frame, frame.cols, this:GetValue() );
228 end
229 getglobal(this:GetName() .. "ValText"):SetText( this:GetValue() );
230 </OnValueChanged>
231 </Scripts>
232 </Slider>
233  
234 <!-- Scaler -->
235 <Slider name="$parentScale" inherits="BagnonSlider" minValue="50" maxValue="150" valuestep="1">
236 <Anchors>
237 <Anchor point="TOP" relativeTo="$parentSpacing" relativePoint="BOTTOM">
238 <Offset x="0" y="-24"/>
239 </Anchor>
240 </Anchors>
241  
242 <Scripts>
243 <OnLoad>
244 getglobal(this:GetName() .. "Text"):SetText(BAGNON_OPTIONS_SCALE);
245 getglobal(this:GetName() .. "Low"):SetText("50%");
246 getglobal(this:GetName() .. "High"):SetText("150%");
247 </OnLoad>
248 <OnValueChanged>
249 if(not this:GetParent().onShow) then
250 BagnonMenu_SetScale(this:GetParent().frame, this:GetValue() / 100 );
251 end
252 getglobal(this:GetName() .. "ValText"):SetText( this:GetValue() );
253 </OnValueChanged>
254 </Scripts>
255 </Slider>
256  
257 <!-- Opacity -->
258 <Slider name="$parentOpacity" inherits="BagnonSlider" minValue="0" maxValue="100" valuestep="1">
259 <Anchors>
260 <Anchor point="TOP" relativeTo="$parentScale" relativePoint="BOTTOM">
261 <Offset x="0" y="-24"/>
262 </Anchor>
263 </Anchors>
264  
265 <Scripts>
266 <OnLoad>
267 getglobal(this:GetName() .. "Text"):SetText(BAGNON_OPTIONS_OPACITY);
268 getglobal(this:GetName() .. "Low"):SetText("0%");
269 getglobal(this:GetName() .. "High"):SetText("100%");
270 </OnLoad>
271 <OnValueChanged>
272 if(not this:GetParent().onShow) then
273 BagnonMenu_SetAlpha(this:GetParent().frame, this:GetValue() / 100 );
274 end
275 getglobal(this:GetName() .. "ValText"):SetText( this:GetValue() );
276 </OnValueChanged>
277 </Scripts>
278 </Slider>
279  
280 <!-- Opacity -->
281 <Slider name="$parentStrata" inherits="BagnonSlider" minValue="1" maxValue="3" valuestep="1">
282 <Anchors>
283 <Anchor point="TOPLEFT" relativeTo="$parentOpacity" relativePoint="BOTTOMLEFT">
284 <Offset x="0" y="-24"/>
285 </Anchor>
286 </Anchors>
287  
288 <Scripts>
289 <OnLoad>
290 getglobal(this:GetName() .. "Text"):SetText(BAGNON_OPTIONS_STRATA);
291 getglobal(this:GetName() .. "Low"):SetText("Low");
292 getglobal(this:GetName() .. "High"):SetText("High");
293 </OnLoad>
294 <OnValueChanged>
295 if(not this:GetParent().onShow) then
296 BagnonFrame_SetStrata(this:GetParent().frame, this:GetValue() );
297 end
298 </OnValueChanged>
299 </Scripts>
300 </Slider>
301 </Frames>
302  
303 <!-- Setup all buttons to whatever the bar had the settings to -->
304 <Scripts>
305 <OnLoad>
306 this:RegisterForClicks("LeftButtonDown", "LeftButtonUp", "RightButtonUp");
307 </OnLoad>
308 <OnClick>
309 this:Hide();
310 </OnClick>
311 <OnHide>
312 this:SetParent(UIParent);
313 </OnHide>
314 </Scripts>
315 </Button>
316 </Ui>