vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
2 | |||
3 | <html> |
||
4 | <head> |
||
5 | <title>DewdropLib API Documentation</title> |
||
6 | <style type="text/css"> |
||
7 | dl {margin-top:0;margin-bottom:0} |
||
8 | dd.example {font-family:monospace} |
||
9 | dd {margin-bottom:1em} |
||
10 | dl.level-1 dt {font-size:17pt} |
||
11 | dl.level-1 dd {font-size:16pt} |
||
12 | dl.level-1 dd dt {font-size:16pt} |
||
13 | dl.level-1 dd dd {font-size:15pt} |
||
14 | dl.level-1 dd dd dt {font-size:15pt} |
||
15 | dl.level-1 dd dd dd {font-size:14pt} |
||
16 | dl.level-1 dd dd dd dt {font-size:14pt} |
||
17 | dl.level-1 dd dd dd dd {font-size:13pt} |
||
18 | dl.level-1 dd dd dd dd dt {font-size:13pt} |
||
19 | dl.level-1 dd dd dd dd dd {font-size:12pt} |
||
20 | </style> |
||
21 | </head> |
||
22 | <body> |
||
23 | |||
24 | <dl class="level-1"> |
||
25 | <dt>Embed Methods:</dt> |
||
26 | <dd> |
||
27 | <a href="#DewdropLib_GetInstance">DewdropLib:GetInstance("version")</a><br /> |
||
28 | </dd> |
||
29 | <dt>Library Functions:</dt> |
||
30 | <dd> |
||
31 | <a href="#Register">Register(parent, ...)</a><br /> |
||
32 | <a href="#Unregister">Unregister(parent)</a><br /> |
||
33 | <a href="#Open">Open(parent, ...)</a><br /> |
||
34 | <a href="#Close">Close([level])</a><br /> |
||
35 | <a href="#Refresh">Refresh([level])</a><br /> |
||
36 | <a href="#AddLine">AddLine(...)</a><br /> |
||
37 | <a href="#IsOpen">IsOpen(parent)</a><br /> |
||
38 | <a href="#IsRegistered">IsRegistered(parent)</a><br /> |
||
39 | </dd> |
||
40 | <dt>Register/Open arguments;</dt> |
||
41 | <dd> |
||
42 | <a href="#children">children</a> |
||
43 | <a href="#point">point</a> |
||
44 | <a href="#relativePoint">relativePoint</a> |
||
45 | <a href="#cursorX">cursorX</a> |
||
46 | <a href="#cursorY">cursorY</a> |
||
47 | <a href="#dontHook">dontHook <i>Register only</i></a> |
||
48 | </dd> |
||
49 | <dt>AddLine arguments:</dt> |
||
50 | <dd> |
||
51 | <a href="#text">text</a><br /> |
||
52 | <a href="#level">level</a><br /> |
||
53 | <a href="#disabled">disabled</a><br /> |
||
54 | <a href="#isTitle">isTitle</a><br /> |
||
55 | <a href="#notClickable">notClickable</a><br /> |
||
56 | <a href="#textRGB">textR, textG, textB</a><br /> |
||
57 | <a href="#notCheckable">notCheckable</a><br /> |
||
58 | <a href="#isRadio">isRadio</a><br /> |
||
59 | <a href="#checked">checked</a><br /> |
||
60 | <a href="#checkIcon">checkIcon</a><br /> |
||
61 | <a href="#func">func</a><br /> |
||
62 | <a href="#arg123">arg1, arg2, arg3</a><br /> |
||
63 | <a href="#hasColorSwatch">hasColorSwatch</a><br /> |
||
64 | <a href="#rgb">r, g, b</a><br /> |
||
65 | <a href="#swatchFunc">swatchFunc</a><br /> |
||
66 | <a href="#hasOpacity">hasOpacity</a><br /> |
||
67 | <a href="#opacityFunc">opacityFunc</a><br /> |
||
68 | <a href="#opacity">opacity</a><br /> |
||
69 | <a href="#cancelFunc">cancelFunc</a><br /> |
||
70 | <a href="#hasArrow">hasArrow</a><br /> |
||
71 | <a href="#value">value</a><br /> |
||
72 | <a href="#hasSlider">hasSlider</a><br /> |
||
73 | <a href="#sliderTop">sliderTop</a><br /> |
||
74 | <a href="#sliderBottom">sliderBottom</a><br /> |
||
75 | <a href="#sliderFunc">sliderFunc</a><br /> |
||
76 | <a href="#sliderValue">sliderValue</a><br /> |
||
77 | <a href="#textHeight">textHeight</a><br /> |
||
78 | <a href="#justifyH">justifyH</a><br /> |
||
79 | <a href="#tooltipTitle">tooltipTitle</a><br /> |
||
80 | <a href="#tooltipText">tooltipText</a><br /> |
||
81 | <a href="#closeWhenClicked">closeWhenClicked</a><br /> |
||
82 | </dd> |
||
83 | </dl> |
||
84 | |||
85 | |||
86 | <dl class="level-1"> |
||
87 | <dt>Embed Methods:</dt> |
||
88 | <dd> |
||
89 | <dl> |
||
90 | <dt id="DewdropLib_GetInstance">DewdropLib:GetInstance("version")</dt> |
||
91 | <dd> |
||
92 | <dl> |
||
93 | <dt>Returns an instance of DewdropLib with the specified version. If the version cannot be found, an error occurs.</dt> |
||
94 | <dd></dd> |
||
95 | <dt>Arguments:</dt> |
||
96 | <dd> |
||
97 | <dl> |
||
98 | <dt>("version")</dt> |
||
99 | <dd></dd> |
||
100 | <dt>"version":</dt> |
||
101 | <dd>String - the major version of the library, currently "1.0"</dd> |
||
102 | </dl> |
||
103 | </dd> |
||
104 | <dt>Returns:</dt> |
||
105 | <dd>An instance of DewdropLib with the specified version</dd> |
||
106 | <dt>Example:</dt> |
||
107 | <dd>local dewdrop = DewdropLib:GetInstance("1.0")</dd> |
||
108 | </dl> |
||
109 | </dd> |
||
110 | </dl> |
||
111 | </dd> |
||
112 | <dt>Library Functions:</dt> |
||
113 | <dd> |
||
114 | <dl> |
||
115 | <dt id="Register">Register(parent, ...)</dt> |
||
116 | <dd> |
||
117 | <dl> |
||
118 | <dt>Registers a given parent with DewdropLib. Settings are initialized from the other arguments given.</dt> |
||
119 | <dd> |
||
120 | |||
121 | </dd> |
||
122 | <dt>Arguments:</dt> |
||
123 | <dd> |
||
124 | <dl> |
||
125 | <dt>(parent, ...)</dt> |
||
126 | <dd></dd> |
||
127 | <dt>parent:</dt> |
||
128 | <dd>Frame - parent frame to register.</dd> |
||
129 | <dt>...</dt> |
||
130 | <dd><a href="#Register_arguments">Register/Open arguments</a></dd> |
||
131 | </dl> |
||
132 | </dd> |
||
133 | <dt>Returns:</dt> |
||
134 | <dd> |
||
135 | nil |
||
136 | </dd> |
||
137 | <dt>Remarks:</dt> |
||
138 | <dd> |
||
139 | This automatically registers the right-click with with the parent frame.<br /> |
||
140 | Unregistering will cause this not to happen. |
||
141 | </dd> |
||
142 | <dt>Example:</dt> |
||
143 | <dd>dewdrop:Register(Minimap,<br /> |
||
144 | 'children', function()<br /> |
||
145 | dewdrop:AddLine('text', "Text")<br /> |
||
146 | end<br /> |
||
147 | )</dd> |
||
148 | </dl> |
||
149 | </dd> |
||
150 | <dt id="Unregister">Unregister(parent)</dt> |
||
151 | <dd> |
||
152 | <dl> |
||
153 | <dt>Unregisters a given parent from TabletLib.</dt> |
||
154 | <dd> |
||
155 | |||
156 | </dd> |
||
157 | <dt>Arguments:</dt> |
||
158 | <dd> |
||
159 | <dl> |
||
160 | <dt>(parent)</dt> |
||
161 | <dd></dd> |
||
162 | <dt>parent:</dt> |
||
163 | <dd>Frame - registered parent frame.</dd> |
||
164 | </dl> |
||
165 | </dd> |
||
166 | <dt>Returns:</dt> |
||
167 | <dd> |
||
168 | nil |
||
169 | </dd> |
||
170 | <dt>Example:</dt> |
||
171 | <dd>tablet:Unregister(Minimap)</dd> |
||
172 | </dl> |
||
173 | </dd> |
||
174 | <dt id="Open">Open(parent, ... or parent, otherParent)</dt> |
||
175 | <dd> |
||
176 | <dl> |
||
177 | <dt>Opens the menu on the given parent, the innards are initialized either with data from Register(parent, ...) or from the given arguments.</dt> |
||
178 | <dd> |
||
179 | |||
180 | </dd> |
||
181 | <dt>Arguments:</dt> |
||
182 | <dd> |
||
183 | <dl> |
||
184 | <dt>(parent, ...) or (parent, otherParent)</dt> |
||
185 | <dd></dd> |
||
186 | <dt>parent:</dt> |
||
187 | <dd>Frame - parent frame to open.</dd> |
||
188 | <dt>...</dt> |
||
189 | <dd><a href="#Register_arguments">Register/Open arguments</a></dd> |
||
190 | <dt>otherParent:</dt> |
||
191 | <dd>Frame - parent frame to get information on.</dd> |
||
192 | </dl> |
||
193 | </dd> |
||
194 | <dt>Returns:</dt> |
||
195 | <dd> |
||
196 | nil |
||
197 | </dd> |
||
198 | <dt>Remarks:</dt> |
||
199 | <dd> |
||
200 | If you called Register(parent, ...) on the same parent, you do not need to give extra arguments, but if you do, they will take precedent.<br /> |
||
201 | |||
202 | </dd> |
||
203 | <dt>Example:</dt> |
||
204 | <dd>dewdrop:Open(Minimap) -- assuming data from the registry</dd> |
||
205 | </dl> |
||
206 | </dd> |
||
207 | <dt id="Close">Close([level])</dt> |
||
208 | <dd> |
||
209 | <dl> |
||
210 | <dt>Closes the given level.</dt> |
||
211 | <dd> |
||
212 | |||
213 | </dd> |
||
214 | <dt>Arguments:</dt> |
||
215 | <dd> |
||
216 | <dl> |
||
217 | <dt>([level])</dt> |
||
218 | <dd></dd> |
||
219 | <dt>level:</dt> |
||
220 | <dd>Integer - Number of the level [1, inf). Assume 1 if not given.</dd> |
||
221 | </dl> |
||
222 | </dd> |
||
223 | <dt>Returns:</dt> |
||
224 | <dd> |
||
225 | nil |
||
226 | </dd> |
||
227 | <dt>Example:</dt> |
||
228 | <dd>dewdrop:Close(2) -- closes 2nd levels and any sublevels</dd> |
||
229 | </dl> |
||
230 | </dd> |
||
231 | <dt id="Refresh">Refresh([level])</dt> |
||
232 | <dd> |
||
233 | <dl> |
||
234 | <dt>Refreshes the contents of a given level</dt> |
||
235 | <dd> |
||
236 | |||
237 | </dd> |
||
238 | <dt>Arguments:</dt> |
||
239 | <dd> |
||
240 | <dl> |
||
241 | <dt>([level])</dt> |
||
242 | <dd></dd> |
||
243 | <dt>level:</dt> |
||
244 | <dd>Integer - Number of the level [1, inf). Assume 1 if not given.</dd> |
||
245 | </dl> |
||
246 | </dd> |
||
247 | <dt>Returns:</dt> |
||
248 | <dd> |
||
249 | nil |
||
250 | </dd> |
||
251 | <dt>Example:</dt> |
||
252 | <dd>dewdrop:Refresh(1) -- refreshes the first level.</dd> |
||
253 | </dl> |
||
254 | </dd> |
||
255 | <dt id="AddLine">AddLine(...)</dt> |
||
256 | <dd> |
||
257 | <dl> |
||
258 | <dt>Adds a line to the dropdown menu.</dt> |
||
259 | <dd> |
||
260 | |||
261 | </dd> |
||
262 | <dt>Arguments:</dt> |
||
263 | <dd> |
||
264 | <dl> |
||
265 | <dt>(...)</dt> |
||
266 | <dd></dd> |
||
267 | <dt>A list of key-value pairs to represent information.</dt> |
||
268 | </dl> |
||
269 | </dd> |
||
270 | <dt>Returns:</dt> |
||
271 | <dd> |
||
272 | nil |
||
273 | </dd> |
||
274 | <dt>Remarks:</dt> |
||
275 | <dd> |
||
276 | This should <b>only</b> be called inside the init function of Open(frame, func). |
||
277 | </dd> |
||
278 | <dt>Example:</dt> |
||
279 | <dd>dewdrop:AddLine(<br /> |
||
280 | 'text', "Hello, World!"<br /> |
||
281 | )<br /> |
||
282 | </dd> |
||
283 | </dl> |
||
284 | </dd> |
||
285 | <dt id="IsOpen">IsOpen(parent)</dt> |
||
286 | <dd> |
||
287 | <dl> |
||
288 | <dt>Returns whether the given parent frame has an open dropdown menu on it.</dt> |
||
289 | <dd></dd> |
||
290 | <dt>Arguments:</dt> |
||
291 | <dd> |
||
292 | <dl> |
||
293 | <dt>(parent)</dt> |
||
294 | <dd></dd> |
||
295 | <dt>parent:</dt> |
||
296 | <dd>Frame - parent frame to check.</dd> |
||
297 | </dl> |
||
298 | </dd> |
||
299 | <dt>Returns:</dt> |
||
300 | <dd> |
||
301 | Boolean - whether the given parent frame has an open dropdown menu. |
||
302 | </dd> |
||
303 | <dt>Example:</dt> |
||
304 | <dd>local open = dewdrop:IsOpen(Minimap)</dd> |
||
305 | </dl> |
||
306 | </dd> |
||
307 | <dt id="IsRegistered">IsRegistered(parent)</dt> |
||
308 | <dd> |
||
309 | <dl> |
||
310 | <dt>Returns whether the given parent frame has been registered with Dewdrop.</dt> |
||
311 | <dd></dd> |
||
312 | <dt>Arguments:</dt> |
||
313 | <dd> |
||
314 | <dl> |
||
315 | <dt>(parent)</dt> |
||
316 | <dd></dd> |
||
317 | <dt>parent:</dt> |
||
318 | <dd>Frame - parent frame to check.</dd> |
||
319 | </dl> |
||
320 | </dd> |
||
321 | <dt>Returns:</dt> |
||
322 | <dd> |
||
323 | Boolean - whether the given parent frame has been registered with Dewdrop. |
||
324 | </dd> |
||
325 | <dt>Example:</dt> |
||
326 | <dd>local registered = dewdrop:IsRegistered(Minimap)</dd> |
||
327 | </dl> |
||
328 | </dd> |
||
329 | </dl> |
||
330 | </dd> |
||
331 | <dt>Register/Open arguments;</dt> |
||
332 | <dd> |
||
333 | <dl> |
||
334 | <dt id="children">children</dt> |
||
335 | <dd> |
||
336 | <dl> |
||
337 | <dt>function(level, value, valueN_1, valueN_2, valueN_3, valueN_4) - function to describe the innards of the menu.</dt> |
||
338 | <dd> |
||
339 | |||
340 | </dd> |
||
341 | <dt>Remarks:<dt> |
||
342 | <dd> |
||
343 | value is the value of the menu just opened, where the level number is N.<br /> |
||
344 | valueN_1 is the value of level N-1, and so forth onto valueN_4, which is the value of level N-4. |
||
345 | </dd> |
||
346 | <dt>Example:</dt> |
||
347 | <dd>dewdrop:Register(Minimap, <br /> |
||
348 | 'children', function(level, value)<br /> |
||
349 | dewdrop:AddLine('text', "Text")<br /> |
||
350 | end<br /> |
||
351 | )<br /> |
||
352 | </dd> |
||
353 | </dl> |
||
354 | </dd> |
||
355 | <dt id="point">point</dt> |
||
356 | <dd> |
||
357 | <dl> |
||
358 | <dt>String - the main attach point of the menu.</dt> |
||
359 | <dt>Function - a function which returns the main attach point of the menu and, optionally, the relative attach point.</dt> |
||
360 | <dd></dd> |
||
361 | <dt>Example:</dt> |
||
362 | <dd>dewdrop:Register(Minimap,<br /> |
||
363 | 'point', function(parent)<br /> |
||
364 | return "TOPRIGHT", "TOPLEFT"<br /> |
||
365 | end<br /> |
||
366 | )</dd> |
||
367 | </dl> |
||
368 | </dd> |
||
369 | <dt id="relativePoint">relativePoint</dt> |
||
370 | <dd> |
||
371 | <dl> |
||
372 | <dt>String - the relative attach point of the menu.</dt> |
||
373 | <dt>Function - a function which returns the relative attach point of the menu.</dt> |
||
374 | <dd></dd> |
||
375 | <dt>Example:</dt> |
||
376 | <dd>dewdrop:Register(Minimap,<br /> |
||
377 | 'point', function(parent)<br /> |
||
378 | return "TOPRIGHT"<br /> |
||
379 | end,<br /> |
||
380 | 'relativePoint', function(parent)<br /> |
||
381 | return "TOPLEFT"<br /> |
||
382 | end<br /> |
||
383 | )</dd> |
||
384 | </dl> |
||
385 | </dd> |
||
386 | <dt id="cursorX">cursorX</dt> |
||
387 | <dd> |
||
388 | <dl> |
||
389 | <dt>Boolean - Whether the menu follows the cursor on the x-axis</dt> |
||
390 | <dd></dd> |
||
391 | <dt>Remarks:</dt> |
||
392 | <dd>In this case, point should be "BOTTOM" or "TOP", and relativePoint should be the opposite.</dd> |
||
393 | <dt>Example:</dt> |
||
394 | <dd>dewdrop:Register(Minimap,<br /> |
||
395 | 'point', "TOP",<br /> |
||
396 | 'relativePoint', "BOTTOM",<br /> |
||
397 | 'cursorX', true<br /> |
||
398 | )</dd> |
||
399 | </dl> |
||
400 | </dd> |
||
401 | <dt id="cursorY">cursorY</dt> |
||
402 | <dd> |
||
403 | <dl> |
||
404 | <dt>Boolean - Whether the menu follows the cursor on the y-axis</dt> |
||
405 | <dd></dd> |
||
406 | <dt>Remarks:</dt> |
||
407 | <dd>In this case, point should be "LEFT" or "RIGHT", and relativePoint should be the opposite.</dd> |
||
408 | <dt>Example:</dt> |
||
409 | <dd>dewdrop:Register(Minimap,<br /> |
||
410 | 'point', "LEFT",<br /> |
||
411 | 'relativePoint', "RIGHT",<br /> |
||
412 | 'cursorY', true<br /> |
||
413 | )</dd> |
||
414 | </dl> |
||
415 | </dd> |
||
416 | <dt id="dontHook">dontHook <i>Register only</i></dt> |
||
417 | <dd> |
||
418 | <dl> |
||
419 | <dt>Boolean - whether the mouse click scripts will be hooked to open/close the menu. You will need to manually call Open() if you do this.</dt> |
||
420 | <dd></dd> |
||
421 | <dt>Example:</dt> |
||
422 | <dd>dewdrop:Register(Minimap,<br /> |
||
423 | 'point', "LEFT",<br /> |
||
424 | 'dontHook', true<br /> |
||
425 | )</dd> |
||
426 | </dl> |
||
427 | </dd> |
||
428 | </dl> |
||
429 | </dd> |
||
430 | <dt>AddLine arguments:</dt> |
||
431 | <dd> |
||
432 | <dl> |
||
433 | <dt id="text">text</dt> |
||
434 | <dd> |
||
435 | <dl> |
||
436 | <dt>String - the text on the button.</dt> |
||
437 | <dd> |
||
438 | |||
439 | </dd> |
||
440 | <dt>Example:</dt> |
||
441 | <dd>dewdrop:AddLine(<br /> |
||
442 | 'text', "Hello, World!",<br /> |
||
443 | )<br /> |
||
444 | </dd> |
||
445 | </dl> |
||
446 | </dd> |
||
447 | <dt id="level">level</dt> |
||
448 | <dd> |
||
449 | <dl> |
||
450 | <dt>Integer - the level the line should be added at.</dt> |
||
451 | <dd> |
||
452 | |||
453 | </dd> |
||
454 | <dt>Remarks:</dt> |
||
455 | <dd> |
||
456 | In most cases, you won't need this, as the level is inferred automatically. |
||
457 | </dd> |
||
458 | <dt>Example:</dt> |
||
459 | <dd>dewdrop:AddLine(<br /> |
||
460 | 'text', "Hello, World!",<br /> |
||
461 | 'level', 2<br /> |
||
462 | )<br /> |
||
463 | </dd> |
||
464 | </dl> |
||
465 | </dd> |
||
466 | <dt id="disabled">disabled</dt> |
||
467 | <dd> |
||
468 | <dl> |
||
469 | <dt>Boolean - whether the button is disabled.</dt> |
||
470 | <dd> |
||
471 | |||
472 | </dd> |
||
473 | <dt>Remarks:</dt> |
||
474 | <dd> |
||
475 | Disabling causes the button to be unclickable and makes the text gray. |
||
476 | </dd> |
||
477 | <dt>Example:</dt> |
||
478 | <dd>dewdrop:AddLine(<br /> |
||
479 | 'text', "Hello, World!",<br /> |
||
480 | 'disabled', true<br /> |
||
481 | )<br /> |
||
482 | </dd> |
||
483 | </dl> |
||
484 | </dd> |
||
485 | <dt id="isTitle">isTitle</dt> |
||
486 | <dd> |
||
487 | <dl> |
||
488 | <dt>Boolean - whether the button is a title.</dt> |
||
489 | <dd> |
||
490 | |||
491 | </dd> |
||
492 | <dt>Remarks:</dt> |
||
493 | <dd> |
||
494 | Being a title causes the button to be disabled, but have the standard yellow color. |
||
495 | </dd> |
||
496 | <dt>Example:</dt> |
||
497 | <dd>dewdrop:AddLine(<br /> |
||
498 | 'text', "I am a title",<br /> |
||
499 | 'isTitle', true<br /> |
||
500 | )<br /> |
||
501 | </dd> |
||
502 | </dl> |
||
503 | </dd> |
||
504 | <dt id="notClickable">notClickable</dt> |
||
505 | <dd> |
||
506 | <dl> |
||
507 | <dt>Boolean - whether the button is clickable or not.</dt> |
||
508 | <dd> |
||
509 | |||
510 | </dd> |
||
511 | <dt>Remarks:</dt> |
||
512 | <dd> |
||
513 | Being unclickable causes the button to be disabled, but have the standard white color, so it would look like other buttons. |
||
514 | </dd> |
||
515 | <dt>Example:</dt> |
||
516 | <dd>dewdrop:AddLine(<br /> |
||
517 | 'text', "Hello, world!",<br /> |
||
518 | 'notClickable', true<br /> |
||
519 | )<br /> |
||
520 | </dd> |
||
521 | </dl> |
||
522 | </dd> |
||
523 | <dt id="textRGB">textR, textG, textB</dt> |
||
524 | <dd> |
||
525 | <dl> |
||
526 | <dt>textR</dt> |
||
527 | <dd>Number - The red value. [0, 1]</dd> |
||
528 | <dt>textG</dt> |
||
529 | <dd>Number - The green value. [0, 1]</dd> |
||
530 | <dt>textB</dt> |
||
531 | <dd>Number - The blue value. [0, 1]</dd> |
||
532 | <dt>Remarks:</dt> |
||
533 | <dd> |
||
534 | Sets the text color of the button, overriding disabled, isTitle, or notClickable's colors.<br /> |
||
535 | This only works if all three colors are set. |
||
536 | </dd> |
||
537 | <dt>Example:</dt> |
||
538 | <dd>dewdrop:AddLine(<br /> |
||
539 | 'text', "Hello, world!",<br /> |
||
540 | 'textR', 1,<br /> |
||
541 | 'textG', 1,<br /> |
||
542 | 'textB', 1<br /> |
||
543 | )<br /> |
||
544 | </dd> |
||
545 | </dl> |
||
546 | </dd> |
||
547 | <dt id="notCheckable">notCheckable</dt> |
||
548 | <dd> |
||
549 | <dl> |
||
550 | <dt>Boolean - whether the button is checkable or not.</dt> |
||
551 | <dd> |
||
552 | |||
553 | </dd> |
||
554 | <dt>Remarks:</dt> |
||
555 | <dd> |
||
556 | Really, this being set just causes the blank space that would be normally for a checkbox to not be there. |
||
557 | </dd> |
||
558 | <dt>Example:</dt> |
||
559 | <dd>dewdrop:AddLine(<br /> |
||
560 | 'text', "Hello, world!",<br /> |
||
561 | 'notCheckable', true<br /> |
||
562 | )<br /> |
||
563 | </dd> |
||
564 | </dl> |
||
565 | </dd> |
||
566 | <dt id="isRadio">isRadio</dt> |
||
567 | <dd> |
||
568 | <dl> |
||
569 | <dt>Boolean - whether the button is a radio button.</dt> |
||
570 | <dd> |
||
571 | |||
572 | </dd> |
||
573 | <dt>Remarks:</dt> |
||
574 | <dd> |
||
575 | If set to true, it uses a texture similar to "Interface\Buttons\UI-RadioButton", which is 4 buttons side-by-side, unchecked, checked, highlight, and blank. |
||
576 | </dd> |
||
577 | <dt>Example:</dt> |
||
578 | <dd>dewdrop:AddLine(<br /> |
||
579 | 'text', "Hello, world!",<br /> |
||
580 | 'isRadio', true,<br /> |
||
581 | )<br /> |
||
582 | </dd> |
||
583 | </dl> |
||
584 | </dd> |
||
585 | <dt id="checked">checked</dt> |
||
586 | <dd> |
||
587 | <dl> |
||
588 | <dt>Boolean - whether the button is checked or not.</dt> |
||
589 | <dd> |
||
590 | |||
591 | </dd> |
||
592 | <dt>Remarks:</dt> |
||
593 | <dd> |
||
594 | If set to true, it sets the check's alpha to fully visible, otherwise makes it invisible. |
||
595 | </dd> |
||
596 | <dt>Example:</dt> |
||
597 | <dd>dewdrop:AddLine(<br /> |
||
598 | 'text', "Hello, world!",<br /> |
||
599 | 'checked', math.random() < 0.5<br /> |
||
600 | )<br /> |
||
601 | </dd> |
||
602 | </dl> |
||
603 | </dd> |
||
604 | <dt id="checkIcon">checkIcon</dt> |
||
605 | <dd> |
||
606 | <dl> |
||
607 | <dt>String - path to the check texture.</dt> |
||
608 | <dd> |
||
609 | |||
610 | </dd> |
||
611 | <dt>Remarks:</dt> |
||
612 | <dd> |
||
613 | If not set, assume "Interface\\Buttons\\UI-CheckBox-Check" |
||
614 | </dd> |
||
615 | <dt>Example:</dt> |
||
616 | <dd>dewdrop:AddLine(<br /> |
||
617 | 'text', "Hello, world!",<br /> |
||
618 | 'checkIcon', "Interface\\Buttons\\UI-CheckBox-Check"<br /> |
||
619 | )<br /> |
||
620 | </dd> |
||
621 | </dl> |
||
622 | </dd> |
||
623 | <dt id="func">func</dt> |
||
624 | <dd> |
||
625 | <dl> |
||
626 | <dt>function(arg1, arg2, arg3) - function to call when button is clicked.</dt> |
||
627 | <dd> |
||
628 | |||
629 | </dd> |
||
630 | <dt>Remarks:</dt> |
||
631 | <dd> |
||
632 | The args fed in are the ones given by arg1, arg2, and arg3.<br /> |
||
633 | After being called, the menu level is refreshed, so any checks or whatnot are updated. |
||
634 | </dd> |
||
635 | <dt>Example:</dt> |
||
636 | <dd>dewdrop:AddLine(<br /> |
||
637 | 'text', "Hello, world!",<br /> |
||
638 | 'func', function()<br /> |
||
639 | print("Click!")<br /> |
||
640 | end<br /> |
||
641 | )<br /> |
||
642 | </dd> |
||
643 | </dl> |
||
644 | </dd> |
||
645 | <dt id="arg123">arg1, arg2, arg3</dt> |
||
646 | <dd> |
||
647 | <dl> |
||
648 | <dt>arg1</dt> |
||
649 | <dd>Value - First value fed into the given func</dd> |
||
650 | <dt>arg2</dt> |
||
651 | <dd>Value - Second value fed into the given func</dd> |
||
652 | <dt>arg3</dt> |
||
653 | <dd>Value - Third value fed into the given func</dd> |
||
654 | <dt>Remarks:</dt> |
||
655 | <dd> |
||
656 | You don't need all 3 to work, you may only specify if needed. |
||
657 | </dd> |
||
658 | <dt>Example:</dt> |
||
659 | <dd>dewdrop:AddLine(<br /> |
||
660 | 'text', "Hello, world!",<br /> |
||
661 | 'func', function(val)<br /> |
||
662 | print("Click! " .. val)<br /> |
||
663 | end,<br /> |
||
664 | 'arg1', math.random()<br /> |
||
665 | )<br /> |
||
666 | </dd> |
||
667 | </dl> |
||
668 | </dd> |
||
669 | <dt id="hasColorSwatch">hasColorSwatch</dt> |
||
670 | <dd> |
||
671 | <dl> |
||
672 | <dt>Boolean - whether the button has a color swatch.</dt> |
||
673 | <dd> |
||
674 | |||
675 | </dd> |
||
676 | <dt>Remarks:</dt> |
||
677 | <dd> |
||
678 | If hasColorSwatch is true, then func has no purpose, since clicking opens up a color picker. |
||
679 | </dd> |
||
680 | <dt>Example:</dt> |
||
681 | <dd>dewdrop:AddLine(<br /> |
||
682 | 'text', "Hello, world!",<br /> |
||
683 | 'hasColorSwatch', true<br /> |
||
684 | )<br /> |
||
685 | </dd> |
||
686 | </dl> |
||
687 | </dd> |
||
688 | <dt id="rgb">r, g, b</dt> |
||
689 | <dd> |
||
690 | <dl> |
||
691 | <dt>r</dt> |
||
692 | <dd>Number - The red value. [0, 1]</dd> |
||
693 | <dt>g</dt> |
||
694 | <dd>Number - The green value. [0, 1]</dd> |
||
695 | <dt>b</dt> |
||
696 | <dd>Number - The blue value. [0, 1]</dd> |
||
697 | <dt>Remarks:</dt> |
||
698 | <dd> |
||
699 | Sets the color of the color swatch, and conseqently, the color picker.<br /> |
||
700 | This only works if all three colors are set. |
||
701 | </dd> |
||
702 | <dt>Example:</dt> |
||
703 | <dd>dewdrop:AddLine(<br /> |
||
704 | 'text', "Hello, world!",<br /> |
||
705 | 'hasColorSwatch', true,<br /> |
||
706 | 'r', 1,<br /> |
||
707 | 'g', 1,<br /> |
||
708 | 'b', 1<br /> |
||
709 | )<br /> |
||
710 | </dd> |
||
711 | </dl> |
||
712 | </dd> |
||
713 | <dt id="swatchFunc">swatchFunc</dt> |
||
714 | <dd> |
||
715 | <dl> |
||
716 | <dt>function(r, g, b) - function called when the color changes.</dt> |
||
717 | <dd></dd> |
||
718 | <dt>Remarks:</dt> |
||
719 | <dd> |
||
720 | Requires that hasColorSwatch is true. |
||
721 | </dd> |
||
722 | <dt>Example:</dt> |
||
723 | <dd>dewdrop:AddLine(<br /> |
||
724 | 'text', "Hello, world!",<br /> |
||
725 | 'hasColorSwatch', true,<br /> |
||
726 | 'swatchFunc', function(r, g, b)<br /> |
||
727 | print("New color: " .. r .. "-" .. g .. "-" .. b) |
||
728 | end<br /> |
||
729 | )<br /> |
||
730 | </dd> |
||
731 | </dl> |
||
732 | </dd> |
||
733 | <dt id="hasOpacity">hasOpacity</dt> |
||
734 | <dd> |
||
735 | <dl> |
||
736 | <dt>Boolean - whether the color picker includes opacity.</dt> |
||
737 | <dd></dd> |
||
738 | <dt>Remarks:</dt> |
||
739 | <dd> |
||
740 | Requires that hasColorSwatch is true. |
||
741 | </dd> |
||
742 | <dt>Example:</dt> |
||
743 | <dd>dewdrop:AddLine(<br /> |
||
744 | 'text', "Hello, world!",<br /> |
||
745 | 'hasColorSwatch', true,<br /> |
||
746 | 'hasOpacity', true<br /> |
||
747 | )<br /> |
||
748 | </dd> |
||
749 | </dl> |
||
750 | </dd> |
||
751 | <dt id="opacityFunc">opacityFunc</dt> |
||
752 | <dd> |
||
753 | <dl> |
||
754 | <dt>function(value) - function called when the opacity changes.</dt> |
||
755 | <dd></dd> |
||
756 | <dt>Remarks:</dt> |
||
757 | <dd> |
||
758 | Requires that hasColorSwatch and hasOpacity are true. |
||
759 | </dd> |
||
760 | <dt>Example:</dt> |
||
761 | <dd>dewdrop:AddLine(<br /> |
||
762 | 'text', "Hello, world!",<br /> |
||
763 | 'hasColorSwatch', true,<br /> |
||
764 | 'hasOpacity', true<br /> |
||
765 | 'opacityFunc', function(value)<br /> |
||
766 | print("New alpha: " .. value)<br /> |
||
767 | end<br /> |
||
768 | )<br /> |
||
769 | </dd> |
||
770 | </dl> |
||
771 | </dd> |
||
772 | <dt id="opacity">opacity</dt> |
||
773 | <dd> |
||
774 | <dl> |
||
775 | <dt>Number - current opacity level. [0, 1]</dt> |
||
776 | <dd></dd> |
||
777 | <dt>Remarks:</dt> |
||
778 | <dd> |
||
779 | Requires that hasColorSwatch and hasOpacity are true. |
||
780 | </dd> |
||
781 | <dt>Example:</dt> |
||
782 | <dd>dewdrop:AddLine(<br /> |
||
783 | 'text', "Hello, world!",<br /> |
||
784 | 'hasColorSwatch', true,<br /> |
||
785 | 'hasOpacity', true<br /> |
||
786 | 'opacity', math.random()<br /> |
||
787 | )<br /> |
||
788 | </dd> |
||
789 | </dl> |
||
790 | </dd> |
||
791 | <dt id="cancelFunc">cancelFunc</dt> |
||
792 | <dd> |
||
793 | <dl> |
||
794 | <dt>function(r, g, b, a) - function called when cancel is pushed. Arguments are the previous values.</dt> |
||
795 | <dd></dd> |
||
796 | <dt>Remarks:</dt> |
||
797 | <dd> |
||
798 | Requires that hasColorSwatch and hasOpacity are true. |
||
799 | </dd> |
||
800 | <dt>Example:</dt> |
||
801 | <dd>dewdrop:AddLine(<br /> |
||
802 | 'text', "Hello, world!",<br /> |
||
803 | 'hasColorSwatch', true,<br /> |
||
804 | 'hasOpacity', true<br /> |
||
805 | 'r', 0,<br /> |
||
806 | 'g', 0.5,<br /> |
||
807 | 'b', 1,<br /> |
||
808 | 'opacity', 1<br /> |
||
809 | 'cancelFunc', function(r, g, b, a)<br /> |
||
810 | assert(r == 0 and g == 0.5 and b == 1 and a == 1) |
||
811 | end |
||
812 | )<br /> |
||
813 | </dd> |
||
814 | </dl> |
||
815 | </dd> |
||
816 | <dt id="hasArrow">hasArrow</dt> |
||
817 | <dd> |
||
818 | <dl> |
||
819 | <dt>Boolean - whether button has an arrow.</dt> |
||
820 | <dd></dd> |
||
821 | <dt>Remarks:</dt> |
||
822 | <dd> |
||
823 | Requires that either value is not nil or hasSlider is true. |
||
824 | </dd> |
||
825 | <dt>Example:</dt> |
||
826 | <dd>dewdrop:AddLine(<br /> |
||
827 | 'text', "Hello, world!",<br /> |
||
828 | 'hasArrow', true,<br /> |
||
829 | 'value', "hello"<br /> |
||
830 | )<br /> |
||
831 | </dd> |
||
832 | </dl> |
||
833 | </dd> |
||
834 | <dt id="value">value</dt> |
||
835 | <dd> |
||
836 | <dl> |
||
837 | <dt>Value - any unique, identifiable value.</dt> |
||
838 | <dd></dd> |
||
839 | <dt>Remarks:</dt> |
||
840 | <dd> |
||
841 | Requires that hasArrow is true.<br /> |
||
842 | The same value will be fed in to the initalizer function when the sublevel is opened. |
||
843 | </dd> |
||
844 | <dt>Example:</dt> |
||
845 | <dd>if level == 1 then |
||
846 | dewdrop:AddLine(<br /> |
||
847 | 'text', "Hello,",<br /> |
||
848 | 'hasArrow', true,<br /> |
||
849 | 'value', "hello"<br /> |
||
850 | )<br /> |
||
851 | elseif level == 2<br /> |
||
852 | if value == "hello" then |
||
853 | dewdrop:AddLine(<br /> |
||
854 | 'text', "World!"<br /> |
||
855 | )<br /> |
||
856 | end<br /> |
||
857 | end<br /> |
||
858 | </dd> |
||
859 | </dl> |
||
860 | </dd> |
||
861 | <dt id="hasSlider">hasSlider</dt> |
||
862 | <dd> |
||
863 | <dl> |
||
864 | <dt>Boolean - whether the sublevel is a slider.</dt> |
||
865 | <dd></dd> |
||
866 | <dt>Remarks:</dt> |
||
867 | <dd> |
||
868 | Requires that hasArrow is true. |
||
869 | </dd> |
||
870 | <dt>Example:</dt> |
||
871 | <dd>dewdrop:AddLine(<br /> |
||
872 | 'text', "Hello, world!",<br /> |
||
873 | 'hasArrow', true,<br /> |
||
874 | 'hasSlider', true<br /> |
||
875 | )<br /> |
||
876 | </dd> |
||
877 | </dl> |
||
878 | </dd> |
||
879 | <dt id="sliderTop">sliderTop</dt> |
||
880 | <dd> |
||
881 | <dl> |
||
882 | <dt>String - the text representing the high value</dt> |
||
883 | <dd></dd> |
||
884 | <dt>Remarks:</dt> |
||
885 | <dd> |
||
886 | Requires that hasArrow and hasSlider are true.<br /> |
||
887 | If not given, "100%" is assumed. |
||
888 | </dd> |
||
889 | <dt>Example:</dt> |
||
890 | <dd>dewdrop:AddLine(<br /> |
||
891 | 'text', "Hello, world!",<br /> |
||
892 | 'hasArrow', true,<br /> |
||
893 | 'hasSlider', true<br /> |
||
894 | 'sliderTop', '100%'<br /> |
||
895 | )<br /> |
||
896 | </dd> |
||
897 | </dl> |
||
898 | </dd> |
||
899 | <dt id="sliderBottom">sliderBottom</dt> |
||
900 | <dd> |
||
901 | <dl> |
||
902 | <dt>String - the text representing the high value</dt> |
||
903 | <dd></dd> |
||
904 | <dt>Remarks:</dt> |
||
905 | <dd> |
||
906 | Requires that hasArrow and hasSlider are true.<br /> |
||
907 | If not given, "0%" is assumed. |
||
908 | </dd> |
||
909 | <dt>Example:</dt> |
||
910 | <dd>dewdrop:AddLine(<br /> |
||
911 | 'text', "Hello, world!",<br /> |
||
912 | 'hasArrow', true,<br /> |
||
913 | 'hasSlider', true<br /> |
||
914 | 'sliderBottom', '0%'<br /> |
||
915 | )<br /> |
||
916 | </dd> |
||
917 | </dl> |
||
918 | </dd> |
||
919 | <dt id="sliderValue">sliderValue</dt> |
||
920 | <dd> |
||
921 | <dl> |
||
922 | <dt>Number - the current value of the slider. [0, 1]</dt> |
||
923 | <dd></dd> |
||
924 | <dt>Remarks:</dt> |
||
925 | <dd> |
||
926 | Requires that hasArrow and hasSlider are true.<br /> |
||
927 | If not given, 0.5 is assumed. |
||
928 | </dd> |
||
929 | <dt>Example:</dt> |
||
930 | <dd>dewdrop:AddLine(<br /> |
||
931 | 'text', "Hello, world!",<br /> |
||
932 | 'hasArrow', true,<br /> |
||
933 | 'hasSlider', true<br /> |
||
934 | 'sliderValue', 0.5<br /> |
||
935 | )<br /> |
||
936 | </dd> |
||
937 | </dl> |
||
938 | </dd> |
||
939 | <dt id="sliderFunc">sliderFunc</dt> |
||
940 | <dd> |
||
941 | <dl> |
||
942 | <dt>function(value) - function to call when the value changed.</dt> |
||
943 | <dd></dd> |
||
944 | <dt>Remarks:</dt> |
||
945 | <dd> |
||
946 | Requires that hasArrow and hasSlider are true.<br /> |
||
947 | If sliderFunc(value) returns a string, then that is used to set the current value string on the slider.<br /> |
||
948 | value will always be within [0, 1].<br /> |
||
949 | </dd> |
||
950 | <dt>Example:</dt> |
||
951 | <dd>dewdrop:AddLine(<br /> |
||
952 | 'text', "Hello, world!",<br /> |
||
953 | 'hasArrow', true,<br /> |
||
954 | 'hasSlider', true<br /> |
||
955 | 'sliderFunc', function(value)<br /> |
||
956 | print("New value: " .. value)<br /> |
||
957 | return format("%.0f%%", value)<br /> |
||
958 | end<br /> |
||
959 | )<br /> |
||
960 | </dd> |
||
961 | </dl> |
||
962 | </dd> |
||
963 | <dt id="textHeight">textHeight</dt> |
||
964 | <dd> |
||
965 | <dl> |
||
966 | <dt>Number - height of the text.</dt> |
||
967 | <dd></dd> |
||
968 | <dt>Remarks:</dt> |
||
969 | <dd> |
||
970 | If not provided, 10 is assumed.<br /> |
||
971 | </dd> |
||
972 | <dt>Example:</dt> |
||
973 | <dd>dewdrop:AddLine(<br /> |
||
974 | 'text', "Hello, world!",<br /> |
||
975 | 'textHeight', 10<br /> |
||
976 | )<br /> |
||
977 | </dd> |
||
978 | </dl> |
||
979 | </dd> |
||
980 | <dt id="justifyH">justifyH</dt> |
||
981 | <dd> |
||
982 | <dl> |
||
983 | <dt>String - horizontal justification of the text.</dt> |
||
984 | <dd></dd> |
||
985 | <dt>Remarks:</dt> |
||
986 | <dd> |
||
987 | Must be either "LEFT", "RIGHT", or "CENTER"<br /> |
||
988 | If not provided, "LEFT" is assumed.<br /> |
||
989 | </dd> |
||
990 | <dt>Example:</dt> |
||
991 | <dd>dewdrop:AddLine(<br /> |
||
992 | 'text', "Hello, world!",<br /> |
||
993 | 'justifyH', "CENTER"<br /> |
||
994 | )<br /> |
||
995 | </dd> |
||
996 | </dl> |
||
997 | </dd> |
||
998 | <dt id="tooltipTitle">tooltipTitle</dt> |
||
999 | <dd> |
||
1000 | <dl> |
||
1001 | <dt>String - title of the newbie tooltip.</dt> |
||
1002 | <dd></dd> |
||
1003 | <dt>Remarks:</dt> |
||
1004 | <dd> |
||
1005 | If not provided, the tooltip won't show up.<br /> |
||
1006 | </dd> |
||
1007 | <dt>Example:</dt> |
||
1008 | <dd>dewdrop:AddLine(<br /> |
||
1009 | 'text', "Hello, world!",<br /> |
||
1010 | 'tooltipTitle', "Hello"<br /> |
||
1011 | )<br /> |
||
1012 | </dd> |
||
1013 | </dl> |
||
1014 | </dd> |
||
1015 | <dt id="tooltipText">tooltipText</dt> |
||
1016 | <dd> |
||
1017 | <dl> |
||
1018 | <dt>String - text of the newbie tooltip.</dt> |
||
1019 | <dd></dd> |
||
1020 | <dt>Remarks:</dt> |
||
1021 | <dd> |
||
1022 | Requires tooltipTitle to be set.<br /> |
||
1023 | </dd> |
||
1024 | <dt>Example:</dt> |
||
1025 | <dd>dewdrop:AddLine(<br /> |
||
1026 | 'text', "Hello, world!",<br /> |
||
1027 | 'tooltipTitle', "Hello",<br /> |
||
1028 | 'tooltipText', "world!"<br /> |
||
1029 | )<br /> |
||
1030 | </dd> |
||
1031 | </dl> |
||
1032 | </dd> |
||
1033 | <dt id="closeWhenClicked">closeWhenClicked</dt> |
||
1034 | <dd> |
||
1035 | <dl> |
||
1036 | <dt>Boolean - whether to close menu when clicked.</dt> |
||
1037 | <dd></dd> |
||
1038 | <dt>Remarks:</dt> |
||
1039 | <dd> |
||
1040 | This closes the whole menu, not just the one level. |
||
1041 | </dd> |
||
1042 | <dt>Example:</dt> |
||
1043 | <dd>dewdrop:AddLine(<br /> |
||
1044 | 'text', "Hello, world!",<br /> |
||
1045 | 'closeWhenClicked', true<br /> |
||
1046 | )<br /> |
||
1047 | </dd> |
||
1048 | </dl> |
||
1049 | </dd> |
||
1050 | </dl> |
||
1051 | </dd> |
||
1052 | </dl> |