vanilla-wow-addons – Rev 1
?pathlinks?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>DewdropLib API Documentation</title>
<style type="text/css">
dl {margin-top:0;margin-bottom:0}
dd.example {font-family:monospace}
dd {margin-bottom:1em}
dl.level-1 dt {font-size:17pt}
dl.level-1 dd {font-size:16pt}
dl.level-1 dd dt {font-size:16pt}
dl.level-1 dd dd {font-size:15pt}
dl.level-1 dd dd dt {font-size:15pt}
dl.level-1 dd dd dd {font-size:14pt}
dl.level-1 dd dd dd dt {font-size:14pt}
dl.level-1 dd dd dd dd {font-size:13pt}
dl.level-1 dd dd dd dd dt {font-size:13pt}
dl.level-1 dd dd dd dd dd {font-size:12pt}
</style>
</head>
<body>
<dl class="level-1">
<dt>Embed Methods:</dt>
<dd>
<a href="#DewdropLib_GetInstance">DewdropLib:GetInstance("version")</a><br />
</dd>
<dt>Library Functions:</dt>
<dd>
<a href="#Register">Register(parent, ...)</a><br />
<a href="#Unregister">Unregister(parent)</a><br />
<a href="#Open">Open(parent, ...)</a><br />
<a href="#Close">Close([level])</a><br />
<a href="#Refresh">Refresh([level])</a><br />
<a href="#AddLine">AddLine(...)</a><br />
<a href="#IsOpen">IsOpen(parent)</a><br />
<a href="#IsRegistered">IsRegistered(parent)</a><br />
</dd>
<dt>Register/Open arguments;</dt>
<dd>
<a href="#children">children</a>
<a href="#point">point</a>
<a href="#relativePoint">relativePoint</a>
<a href="#cursorX">cursorX</a>
<a href="#cursorY">cursorY</a>
<a href="#dontHook">dontHook <i>Register only</i></a>
</dd>
<dt>AddLine arguments:</dt>
<dd>
<a href="#text">text</a><br />
<a href="#level">level</a><br />
<a href="#disabled">disabled</a><br />
<a href="#isTitle">isTitle</a><br />
<a href="#notClickable">notClickable</a><br />
<a href="#textRGB">textR, textG, textB</a><br />
<a href="#notCheckable">notCheckable</a><br />
<a href="#isRadio">isRadio</a><br />
<a href="#checked">checked</a><br />
<a href="#checkIcon">checkIcon</a><br />
<a href="#func">func</a><br />
<a href="#arg123">arg1, arg2, arg3</a><br />
<a href="#hasColorSwatch">hasColorSwatch</a><br />
<a href="#rgb">r, g, b</a><br />
<a href="#swatchFunc">swatchFunc</a><br />
<a href="#hasOpacity">hasOpacity</a><br />
<a href="#opacityFunc">opacityFunc</a><br />
<a href="#opacity">opacity</a><br />
<a href="#cancelFunc">cancelFunc</a><br />
<a href="#hasArrow">hasArrow</a><br />
<a href="#value">value</a><br />
<a href="#hasSlider">hasSlider</a><br />
<a href="#sliderTop">sliderTop</a><br />
<a href="#sliderBottom">sliderBottom</a><br />
<a href="#sliderFunc">sliderFunc</a><br />
<a href="#sliderValue">sliderValue</a><br />
<a href="#textHeight">textHeight</a><br />
<a href="#justifyH">justifyH</a><br />
<a href="#tooltipTitle">tooltipTitle</a><br />
<a href="#tooltipText">tooltipText</a><br />
<a href="#closeWhenClicked">closeWhenClicked</a><br />
</dd>
</dl>
<dl class="level-1">
<dt>Embed Methods:</dt>
<dd>
<dl>
<dt id="DewdropLib_GetInstance">DewdropLib:GetInstance("version")</dt>
<dd>
<dl>
<dt>Returns an instance of DewdropLib with the specified version. If the version cannot be found, an error occurs.</dt>
<dd></dd>
<dt>Arguments:</dt>
<dd>
<dl>
<dt>("version")</dt>
<dd></dd>
<dt>"version":</dt>
<dd>String - the major version of the library, currently "1.0"</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>An instance of DewdropLib with the specified version</dd>
<dt>Example:</dt>
<dd>local dewdrop = DewdropLib:GetInstance("1.0")</dd>
</dl>
</dd>
</dl>
</dd>
<dt>Library Functions:</dt>
<dd>
<dl>
<dt id="Register">Register(parent, ...)</dt>
<dd>
<dl>
<dt>Registers a given parent with DewdropLib. Settings are initialized from the other arguments given.</dt>
<dd>
</dd>
<dt>Arguments:</dt>
<dd>
<dl>
<dt>(parent, ...)</dt>
<dd></dd>
<dt>parent:</dt>
<dd>Frame - parent frame to register.</dd>
<dt>...</dt>
<dd><a href="#Register_arguments">Register/Open arguments</a></dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>
nil
</dd>
<dt>Remarks:</dt>
<dd>
This automatically registers the right-click with with the parent frame.<br />
Unregistering will cause this not to happen.
</dd>
<dt>Example:</dt>
<dd>dewdrop:Register(Minimap,<br />
'children', function()<br />
dewdrop:AddLine('text', "Text")<br />
end<br />
)</dd>
</dl>
</dd>
<dt id="Unregister">Unregister(parent)</dt>
<dd>
<dl>
<dt>Unregisters a given parent from TabletLib.</dt>
<dd>
</dd>
<dt>Arguments:</dt>
<dd>
<dl>
<dt>(parent)</dt>
<dd></dd>
<dt>parent:</dt>
<dd>Frame - registered parent frame.</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>
nil
</dd>
<dt>Example:</dt>
<dd>tablet:Unregister(Minimap)</dd>
</dl>
</dd>
<dt id="Open">Open(parent, ... or parent, otherParent)</dt>
<dd>
<dl>
<dt>Opens the menu on the given parent, the innards are initialized either with data from Register(parent, ...) or from the given arguments.</dt>
<dd>
</dd>
<dt>Arguments:</dt>
<dd>
<dl>
<dt>(parent, ...) or (parent, otherParent)</dt>
<dd></dd>
<dt>parent:</dt>
<dd>Frame - parent frame to open.</dd>
<dt>...</dt>
<dd><a href="#Register_arguments">Register/Open arguments</a></dd>
<dt>otherParent:</dt>
<dd>Frame - parent frame to get information on.</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>
nil
</dd>
<dt>Remarks:</dt>
<dd>
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 />
</dd>
<dt>Example:</dt>
<dd>dewdrop:Open(Minimap) -- assuming data from the registry</dd>
</dl>
</dd>
<dt id="Close">Close([level])</dt>
<dd>
<dl>
<dt>Closes the given level.</dt>
<dd>
</dd>
<dt>Arguments:</dt>
<dd>
<dl>
<dt>([level])</dt>
<dd></dd>
<dt>level:</dt>
<dd>Integer - Number of the level [1, inf). Assume 1 if not given.</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>
nil
</dd>
<dt>Example:</dt>
<dd>dewdrop:Close(2) -- closes 2nd levels and any sublevels</dd>
</dl>
</dd>
<dt id="Refresh">Refresh([level])</dt>
<dd>
<dl>
<dt>Refreshes the contents of a given level</dt>
<dd>
</dd>
<dt>Arguments:</dt>
<dd>
<dl>
<dt>([level])</dt>
<dd></dd>
<dt>level:</dt>
<dd>Integer - Number of the level [1, inf). Assume 1 if not given.</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>
nil
</dd>
<dt>Example:</dt>
<dd>dewdrop:Refresh(1) -- refreshes the first level.</dd>
</dl>
</dd>
<dt id="AddLine">AddLine(...)</dt>
<dd>
<dl>
<dt>Adds a line to the dropdown menu.</dt>
<dd>
</dd>
<dt>Arguments:</dt>
<dd>
<dl>
<dt>(...)</dt>
<dd></dd>
<dt>A list of key-value pairs to represent information.</dt>
</dl>
</dd>
<dt>Returns:</dt>
<dd>
nil
</dd>
<dt>Remarks:</dt>
<dd>
This should <b>only</b> be called inside the init function of Open(frame, func).
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, World!"<br />
)<br />
</dd>
</dl>
</dd>
<dt id="IsOpen">IsOpen(parent)</dt>
<dd>
<dl>
<dt>Returns whether the given parent frame has an open dropdown menu on it.</dt>
<dd></dd>
<dt>Arguments:</dt>
<dd>
<dl>
<dt>(parent)</dt>
<dd></dd>
<dt>parent:</dt>
<dd>Frame - parent frame to check.</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>
Boolean - whether the given parent frame has an open dropdown menu.
</dd>
<dt>Example:</dt>
<dd>local open = dewdrop:IsOpen(Minimap)</dd>
</dl>
</dd>
<dt id="IsRegistered">IsRegistered(parent)</dt>
<dd>
<dl>
<dt>Returns whether the given parent frame has been registered with Dewdrop.</dt>
<dd></dd>
<dt>Arguments:</dt>
<dd>
<dl>
<dt>(parent)</dt>
<dd></dd>
<dt>parent:</dt>
<dd>Frame - parent frame to check.</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>
Boolean - whether the given parent frame has been registered with Dewdrop.
</dd>
<dt>Example:</dt>
<dd>local registered = dewdrop:IsRegistered(Minimap)</dd>
</dl>
</dd>
</dl>
</dd>
<dt>Register/Open arguments;</dt>
<dd>
<dl>
<dt id="children">children</dt>
<dd>
<dl>
<dt>function(level, value, valueN_1, valueN_2, valueN_3, valueN_4) - function to describe the innards of the menu.</dt>
<dd>
</dd>
<dt>Remarks:<dt>
<dd>
value is the value of the menu just opened, where the level number is N.<br />
valueN_1 is the value of level N-1, and so forth onto valueN_4, which is the value of level N-4.
</dd>
<dt>Example:</dt>
<dd>dewdrop:Register(Minimap, <br />
'children', function(level, value)<br />
dewdrop:AddLine('text', "Text")<br />
end<br />
)<br />
</dd>
</dl>
</dd>
<dt id="point">point</dt>
<dd>
<dl>
<dt>String - the main attach point of the menu.</dt>
<dt>Function - a function which returns the main attach point of the menu and, optionally, the relative attach point.</dt>
<dd></dd>
<dt>Example:</dt>
<dd>dewdrop:Register(Minimap,<br />
'point', function(parent)<br />
return "TOPRIGHT", "TOPLEFT"<br />
end<br />
)</dd>
</dl>
</dd>
<dt id="relativePoint">relativePoint</dt>
<dd>
<dl>
<dt>String - the relative attach point of the menu.</dt>
<dt>Function - a function which returns the relative attach point of the menu.</dt>
<dd></dd>
<dt>Example:</dt>
<dd>dewdrop:Register(Minimap,<br />
'point', function(parent)<br />
return "TOPRIGHT"<br />
end,<br />
'relativePoint', function(parent)<br />
return "TOPLEFT"<br />
end<br />
)</dd>
</dl>
</dd>
<dt id="cursorX">cursorX</dt>
<dd>
<dl>
<dt>Boolean - Whether the menu follows the cursor on the x-axis</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>In this case, point should be "BOTTOM" or "TOP", and relativePoint should be the opposite.</dd>
<dt>Example:</dt>
<dd>dewdrop:Register(Minimap,<br />
'point', "TOP",<br />
'relativePoint', "BOTTOM",<br />
'cursorX', true<br />
)</dd>
</dl>
</dd>
<dt id="cursorY">cursorY</dt>
<dd>
<dl>
<dt>Boolean - Whether the menu follows the cursor on the y-axis</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>In this case, point should be "LEFT" or "RIGHT", and relativePoint should be the opposite.</dd>
<dt>Example:</dt>
<dd>dewdrop:Register(Minimap,<br />
'point', "LEFT",<br />
'relativePoint', "RIGHT",<br />
'cursorY', true<br />
)</dd>
</dl>
</dd>
<dt id="dontHook">dontHook <i>Register only</i></dt>
<dd>
<dl>
<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>
<dd></dd>
<dt>Example:</dt>
<dd>dewdrop:Register(Minimap,<br />
'point', "LEFT",<br />
'dontHook', true<br />
)</dd>
</dl>
</dd>
</dl>
</dd>
<dt>AddLine arguments:</dt>
<dd>
<dl>
<dt id="text">text</dt>
<dd>
<dl>
<dt>String - the text on the button.</dt>
<dd>
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, World!",<br />
)<br />
</dd>
</dl>
</dd>
<dt id="level">level</dt>
<dd>
<dl>
<dt>Integer - the level the line should be added at.</dt>
<dd>
</dd>
<dt>Remarks:</dt>
<dd>
In most cases, you won't need this, as the level is inferred automatically.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, World!",<br />
'level', 2<br />
)<br />
</dd>
</dl>
</dd>
<dt id="disabled">disabled</dt>
<dd>
<dl>
<dt>Boolean - whether the button is disabled.</dt>
<dd>
</dd>
<dt>Remarks:</dt>
<dd>
Disabling causes the button to be unclickable and makes the text gray.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, World!",<br />
'disabled', true<br />
)<br />
</dd>
</dl>
</dd>
<dt id="isTitle">isTitle</dt>
<dd>
<dl>
<dt>Boolean - whether the button is a title.</dt>
<dd>
</dd>
<dt>Remarks:</dt>
<dd>
Being a title causes the button to be disabled, but have the standard yellow color.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "I am a title",<br />
'isTitle', true<br />
)<br />
</dd>
</dl>
</dd>
<dt id="notClickable">notClickable</dt>
<dd>
<dl>
<dt>Boolean - whether the button is clickable or not.</dt>
<dd>
</dd>
<dt>Remarks:</dt>
<dd>
Being unclickable causes the button to be disabled, but have the standard white color, so it would look like other buttons.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'notClickable', true<br />
)<br />
</dd>
</dl>
</dd>
<dt id="textRGB">textR, textG, textB</dt>
<dd>
<dl>
<dt>textR</dt>
<dd>Number - The red value. [0, 1]</dd>
<dt>textG</dt>
<dd>Number - The green value. [0, 1]</dd>
<dt>textB</dt>
<dd>Number - The blue value. [0, 1]</dd>
<dt>Remarks:</dt>
<dd>
Sets the text color of the button, overriding disabled, isTitle, or notClickable's colors.<br />
This only works if all three colors are set.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'textR', 1,<br />
'textG', 1,<br />
'textB', 1<br />
)<br />
</dd>
</dl>
</dd>
<dt id="notCheckable">notCheckable</dt>
<dd>
<dl>
<dt>Boolean - whether the button is checkable or not.</dt>
<dd>
</dd>
<dt>Remarks:</dt>
<dd>
Really, this being set just causes the blank space that would be normally for a checkbox to not be there.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'notCheckable', true<br />
)<br />
</dd>
</dl>
</dd>
<dt id="isRadio">isRadio</dt>
<dd>
<dl>
<dt>Boolean - whether the button is a radio button.</dt>
<dd>
</dd>
<dt>Remarks:</dt>
<dd>
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.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'isRadio', true,<br />
)<br />
</dd>
</dl>
</dd>
<dt id="checked">checked</dt>
<dd>
<dl>
<dt>Boolean - whether the button is checked or not.</dt>
<dd>
</dd>
<dt>Remarks:</dt>
<dd>
If set to true, it sets the check's alpha to fully visible, otherwise makes it invisible.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'checked', math.random() < 0.5<br />
)<br />
</dd>
</dl>
</dd>
<dt id="checkIcon">checkIcon</dt>
<dd>
<dl>
<dt>String - path to the check texture.</dt>
<dd>
</dd>
<dt>Remarks:</dt>
<dd>
If not set, assume "Interface\\Buttons\\UI-CheckBox-Check"
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'checkIcon', "Interface\\Buttons\\UI-CheckBox-Check"<br />
)<br />
</dd>
</dl>
</dd>
<dt id="func">func</dt>
<dd>
<dl>
<dt>function(arg1, arg2, arg3) - function to call when button is clicked.</dt>
<dd>
</dd>
<dt>Remarks:</dt>
<dd>
The args fed in are the ones given by arg1, arg2, and arg3.<br />
After being called, the menu level is refreshed, so any checks or whatnot are updated.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'func', function()<br />
print("Click!")<br />
end<br />
)<br />
</dd>
</dl>
</dd>
<dt id="arg123">arg1, arg2, arg3</dt>
<dd>
<dl>
<dt>arg1</dt>
<dd>Value - First value fed into the given func</dd>
<dt>arg2</dt>
<dd>Value - Second value fed into the given func</dd>
<dt>arg3</dt>
<dd>Value - Third value fed into the given func</dd>
<dt>Remarks:</dt>
<dd>
You don't need all 3 to work, you may only specify if needed.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'func', function(val)<br />
print("Click! " .. val)<br />
end,<br />
'arg1', math.random()<br />
)<br />
</dd>
</dl>
</dd>
<dt id="hasColorSwatch">hasColorSwatch</dt>
<dd>
<dl>
<dt>Boolean - whether the button has a color swatch.</dt>
<dd>
</dd>
<dt>Remarks:</dt>
<dd>
If hasColorSwatch is true, then func has no purpose, since clicking opens up a color picker.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'hasColorSwatch', true<br />
)<br />
</dd>
</dl>
</dd>
<dt id="rgb">r, g, b</dt>
<dd>
<dl>
<dt>r</dt>
<dd>Number - The red value. [0, 1]</dd>
<dt>g</dt>
<dd>Number - The green value. [0, 1]</dd>
<dt>b</dt>
<dd>Number - The blue value. [0, 1]</dd>
<dt>Remarks:</dt>
<dd>
Sets the color of the color swatch, and conseqently, the color picker.<br />
This only works if all three colors are set.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'hasColorSwatch', true,<br />
'r', 1,<br />
'g', 1,<br />
'b', 1<br />
)<br />
</dd>
</dl>
</dd>
<dt id="swatchFunc">swatchFunc</dt>
<dd>
<dl>
<dt>function(r, g, b) - function called when the color changes.</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
Requires that hasColorSwatch is true.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'hasColorSwatch', true,<br />
'swatchFunc', function(r, g, b)<br />
print("New color: " .. r .. "-" .. g .. "-" .. b)
end<br />
)<br />
</dd>
</dl>
</dd>
<dt id="hasOpacity">hasOpacity</dt>
<dd>
<dl>
<dt>Boolean - whether the color picker includes opacity.</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
Requires that hasColorSwatch is true.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'hasColorSwatch', true,<br />
'hasOpacity', true<br />
)<br />
</dd>
</dl>
</dd>
<dt id="opacityFunc">opacityFunc</dt>
<dd>
<dl>
<dt>function(value) - function called when the opacity changes.</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
Requires that hasColorSwatch and hasOpacity are true.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'hasColorSwatch', true,<br />
'hasOpacity', true<br />
'opacityFunc', function(value)<br />
print("New alpha: " .. value)<br />
end<br />
)<br />
</dd>
</dl>
</dd>
<dt id="opacity">opacity</dt>
<dd>
<dl>
<dt>Number - current opacity level. [0, 1]</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
Requires that hasColorSwatch and hasOpacity are true.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'hasColorSwatch', true,<br />
'hasOpacity', true<br />
'opacity', math.random()<br />
)<br />
</dd>
</dl>
</dd>
<dt id="cancelFunc">cancelFunc</dt>
<dd>
<dl>
<dt>function(r, g, b, a) - function called when cancel is pushed. Arguments are the previous values.</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
Requires that hasColorSwatch and hasOpacity are true.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'hasColorSwatch', true,<br />
'hasOpacity', true<br />
'r', 0,<br />
'g', 0.5,<br />
'b', 1,<br />
'opacity', 1<br />
'cancelFunc', function(r, g, b, a)<br />
assert(r == 0 and g == 0.5 and b == 1 and a == 1)
end
)<br />
</dd>
</dl>
</dd>
<dt id="hasArrow">hasArrow</dt>
<dd>
<dl>
<dt>Boolean - whether button has an arrow.</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
Requires that either value is not nil or hasSlider is true.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'hasArrow', true,<br />
'value', "hello"<br />
)<br />
</dd>
</dl>
</dd>
<dt id="value">value</dt>
<dd>
<dl>
<dt>Value - any unique, identifiable value.</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
Requires that hasArrow is true.<br />
The same value will be fed in to the initalizer function when the sublevel is opened.
</dd>
<dt>Example:</dt>
<dd>if level == 1 then
dewdrop:AddLine(<br />
'text', "Hello,",<br />
'hasArrow', true,<br />
'value', "hello"<br />
)<br />
elseif level == 2<br />
if value == "hello" then
dewdrop:AddLine(<br />
'text', "World!"<br />
)<br />
end<br />
end<br />
</dd>
</dl>
</dd>
<dt id="hasSlider">hasSlider</dt>
<dd>
<dl>
<dt>Boolean - whether the sublevel is a slider.</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
Requires that hasArrow is true.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'hasArrow', true,<br />
'hasSlider', true<br />
)<br />
</dd>
</dl>
</dd>
<dt id="sliderTop">sliderTop</dt>
<dd>
<dl>
<dt>String - the text representing the high value</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
Requires that hasArrow and hasSlider are true.<br />
If not given, "100%" is assumed.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'hasArrow', true,<br />
'hasSlider', true<br />
'sliderTop', '100%'<br />
)<br />
</dd>
</dl>
</dd>
<dt id="sliderBottom">sliderBottom</dt>
<dd>
<dl>
<dt>String - the text representing the high value</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
Requires that hasArrow and hasSlider are true.<br />
If not given, "0%" is assumed.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'hasArrow', true,<br />
'hasSlider', true<br />
'sliderBottom', '0%'<br />
)<br />
</dd>
</dl>
</dd>
<dt id="sliderValue">sliderValue</dt>
<dd>
<dl>
<dt>Number - the current value of the slider. [0, 1]</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
Requires that hasArrow and hasSlider are true.<br />
If not given, 0.5 is assumed.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'hasArrow', true,<br />
'hasSlider', true<br />
'sliderValue', 0.5<br />
)<br />
</dd>
</dl>
</dd>
<dt id="sliderFunc">sliderFunc</dt>
<dd>
<dl>
<dt>function(value) - function to call when the value changed.</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
Requires that hasArrow and hasSlider are true.<br />
If sliderFunc(value) returns a string, then that is used to set the current value string on the slider.<br />
value will always be within [0, 1].<br />
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'hasArrow', true,<br />
'hasSlider', true<br />
'sliderFunc', function(value)<br />
print("New value: " .. value)<br />
return format("%.0f%%", value)<br />
end<br />
)<br />
</dd>
</dl>
</dd>
<dt id="textHeight">textHeight</dt>
<dd>
<dl>
<dt>Number - height of the text.</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
If not provided, 10 is assumed.<br />
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'textHeight', 10<br />
)<br />
</dd>
</dl>
</dd>
<dt id="justifyH">justifyH</dt>
<dd>
<dl>
<dt>String - horizontal justification of the text.</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
Must be either "LEFT", "RIGHT", or "CENTER"<br />
If not provided, "LEFT" is assumed.<br />
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'justifyH', "CENTER"<br />
)<br />
</dd>
</dl>
</dd>
<dt id="tooltipTitle">tooltipTitle</dt>
<dd>
<dl>
<dt>String - title of the newbie tooltip.</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
If not provided, the tooltip won't show up.<br />
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'tooltipTitle', "Hello"<br />
)<br />
</dd>
</dl>
</dd>
<dt id="tooltipText">tooltipText</dt>
<dd>
<dl>
<dt>String - text of the newbie tooltip.</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
Requires tooltipTitle to be set.<br />
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'tooltipTitle', "Hello",<br />
'tooltipText', "world!"<br />
)<br />
</dd>
</dl>
</dd>
<dt id="closeWhenClicked">closeWhenClicked</dt>
<dd>
<dl>
<dt>Boolean - whether to close menu when clicked.</dt>
<dd></dd>
<dt>Remarks:</dt>
<dd>
This closes the whole menu, not just the one level.
</dd>
<dt>Example:</dt>
<dd>dewdrop:AddLine(<br />
'text', "Hello, world!",<br />
'closeWhenClicked', true<br />
)<br />
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>