mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 19:45:22 +09:00
367 lines
13 KiB
HTML
367 lines
13 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
<head>
|
|
<title>Reference</title>
|
|
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
|
</head>
|
|
<body>
|
|
|
|
<div id="container">
|
|
|
|
<div id="product">
|
|
<div id="product_logo"></div>
|
|
<div id="product_name"><big><b></b></big></div>
|
|
<div id="product_description"></div>
|
|
</div> <!-- id="product" -->
|
|
|
|
|
|
<div id="main">
|
|
|
|
|
|
<!-- Menu -->
|
|
|
|
<div id="navigation">
|
|
<br/>
|
|
<h1>ldoc</h1>
|
|
|
|
<ul>
|
|
<li><a href="../index.html">Index</a></li>
|
|
</ul>
|
|
|
|
<h2>Contents</h2>
|
|
<ul>
|
|
<li><a href="#Functions">Functions</a></li>
|
|
</ul>
|
|
|
|
|
|
<h2>Modules</h2>
|
|
<ul class="$(kind=='Topics' and '' or 'nowrap'">
|
|
<li><a href="../modules/config._file_loader.html">config._file_loader</a></li>
|
|
<li><a href="../modules/config.action_buttons.html">config.action_buttons</a></li>
|
|
<li><a href="../modules/config.advanced_start.html">config.advanced_start</a></li>
|
|
<li><a href="../modules/config.death_logger.html">config.death_logger</a></li>
|
|
<li><a href="../modules/config.expcore-commands.auth_admin.html">config.expcore-commands.auth_admin</a></li>
|
|
<li><a href="../modules/config.expcore-commands.auth_roles.html">config.expcore-commands.auth_roles</a></li>
|
|
<li><a href="../modules/config.expcore-commands.auth_runtime_disable.html">config.expcore-commands.auth_runtime_disable</a></li>
|
|
<li><a href="../modules/config.expcore-commands.parse_general.html">config.expcore-commands.parse_general</a></li>
|
|
<li><a href="../modules/config.expcore-commands.parse_roles.html">config.expcore-commands.parse_roles</a></li>
|
|
<li><a href="../modules/config.permission_groups.html">config.permission_groups</a></li>
|
|
<li><a href="../modules/config.popup_messages.html">config.popup_messages</a></li>
|
|
<li><a href="../modules/config.rockets.html">config.rockets</a></li>
|
|
<li><a href="../modules/config.roles.html">config.roles</a></li>
|
|
<li><a href="../modules/config.scorched_earth.html">config.scorched_earth</a></li>
|
|
<li><a href="../modules/config.spawn_area.html">config.spawn_area</a></li>
|
|
<li><a href="../modules/config.warnings.html">config.warnings</a></li>
|
|
<li><a href="../modules/control.html">control</a></li>
|
|
<li><a href="../modules/Commands.html">Commands</a></li>
|
|
<li><a href="../modules/Public.html">Public</a></li>
|
|
<li><a href="../modules/expcore.gui.html">expcore.gui</a></li>
|
|
<li><a href="../modules/expcore.gui.buttons.html">expcore.gui.buttons</a></li>
|
|
<li><a href="../modules/expcore.gui.center.html">expcore.gui.center</a></li>
|
|
<li><a href="../modules/expcore.gui.checkboxs.html">expcore.gui.checkboxs</a></li>
|
|
<li><a href="../modules/expcore.gui.core.html">expcore.gui.core</a></li>
|
|
<li><strong>expcore.gui.dropdown</strong></li>
|
|
<li><a href="../modules/expcore.gui.elem-button.html">expcore.gui.elem-button</a></li>
|
|
<li><a href="../modules/expcore.gui.instances.html">expcore.gui.instances</a></li>
|
|
<li><a href="../modules/expcore.gui.left.html">expcore.gui.left</a></li>
|
|
<li><a href="../modules/expcore.gui.popups.html">expcore.gui.popups</a></li>
|
|
<li><a href="../modules/expcore.gui.progress-bar.html">expcore.gui.progress-bar</a></li>
|
|
<li><a href="../modules/expcore.gui.slider.html">expcore.gui.slider</a></li>
|
|
<li><a href="../modules/expcore.gui.test.html">expcore.gui.test</a></li>
|
|
<li><a href="../modules/expcore.gui.text.html">expcore.gui.text</a></li>
|
|
<li><a href="../modules/expcore.gui.toolbar.html">expcore.gui.toolbar</a></li>
|
|
<li><a href="../modules/Permissions_Groups.html">Permissions_Groups</a></li>
|
|
<li><a href="../modules/Commands.html">Commands</a></li>
|
|
<li><a href="../modules/expcore.store.html">expcore.store</a></li>
|
|
<li><a href="../modules/modules.addons.advanced-start.html">modules.addons.advanced-start</a></li>
|
|
<li><a href="../modules/modules.addons.chat-popups.html">modules.addons.chat-popups</a></li>
|
|
<li><a href="../modules/modules.addons.damage-popups.html">modules.addons.damage-popups</a></li>
|
|
<li><a href="../modules/modules.gui.player-list.html">modules.gui.player-list</a></li>
|
|
<li><a href="../modules/modules.gui.rocket-info.html">modules.gui.rocket-info</a></li>
|
|
<li><a href="../modules/modules.gui.science-info.html">modules.gui.science-info</a></li>
|
|
<li><a href="../modules/modules.gui.task-list.html">modules.gui.task-list</a></li>
|
|
<li><a href="../modules/utils.alien_evolution_progress.html">utils.alien_evolution_progress</a></li>
|
|
<li><a href="../modules/utils.core.html">utils.core</a></li>
|
|
<li><a href="../modules/utils.debug.html">utils.debug</a></li>
|
|
<li><a href="../modules/utils.event.html">utils.event</a></li>
|
|
<li><a href="../modules/utils.event_core.html">utils.event_core</a></li>
|
|
<li><a href="../modules/utils.math.html">utils.math</a></li>
|
|
<li><a href="../modules/utils.recipe_locker.html">utils.recipe_locker</a></li>
|
|
<li><a href="../modules/utils.state_machine.html">utils.state_machine</a></li>
|
|
<li><a href="../modules/utils.table.html">utils.table</a></li>
|
|
<li><a href="../modules/utils.task.html">utils.task</a></li>
|
|
<li><a href="../modules/utils.timestamp.html">utils.timestamp</a></li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div id="content">
|
|
|
|
<h1>Module <code>expcore.gui.dropdown</code></h1>
|
|
<p>Gui class define for dropdowns and list boxs
|
|
[[</p>
|
|
<p></p>
|
|
|
|
|
|
<h2><a href="#Functions">Functions</a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Dropdown.new_dropdown">Dropdown.new_dropdown ([name])</a></td>
|
|
<td class="summary">Creates a new dropdown element define</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Dropdown.new_list_box">Dropdown.new_list_box ([name])</a></td>
|
|
<td class="summary">Creates a new list box element define</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Dropdown._prototype:new_static_options">Dropdown._prototype:new_static_options (options[, ...], the)</a></td>
|
|
<td class="summary">Adds new static options to the dropdown which will trigger the general callback</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Dropdown._prototype:new_dynamic_options">Dropdown._prototype:new_dynamic_options (callback)</a></td>
|
|
<td class="summary">Adds a callback which should return a table of values to be added as options for the dropdown (appended after static options)</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Dropdown._prototype:add_option_callback">Dropdown._prototype:add_option_callback (option, callback)</a></td>
|
|
<td class="summary">Adds a case specific callback which will only run when that option is selected (general case still triggered)</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Dropdown.select_value">Dropdown.select_value (element, value)</a></td>
|
|
<td class="summary">Selects the option from a dropdown or list box given the value rather than key</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Dropdown.get_selected_value">Dropdown.get_selected_value (element)</a></td>
|
|
<td class="summary">Returns the currently selected value rather than index</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
<h2><a name="Functions"></a>Functions</h2>
|
|
|
|
<dl class="function">
|
|
<dt>
|
|
<a name = "Dropdown.new_dropdown"></a>
|
|
<strong>Dropdown.new_dropdown ([name])</strong>
|
|
</dt>
|
|
<dd>
|
|
Creates a new dropdown element define
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">name</span>
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
|
the optional debug name that can be added
|
|
(<em>optional</em>)
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
|
the new dropdown element define
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Dropdown.new_list_box"></a>
|
|
<strong>Dropdown.new_list_box ([name])</strong>
|
|
</dt>
|
|
<dd>
|
|
Creates a new list box element define
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">name</span>
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
|
the optional debug name that can be added
|
|
(<em>optional</em>)
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
|
the new list box element define
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Dropdown._prototype:new_static_options"></a>
|
|
<strong>Dropdown._prototype:new_static_options (options[, ...], the)</strong>
|
|
</dt>
|
|
<dd>
|
|
Adds new static options to the dropdown which will trigger the general callback
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">options</span>
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
|
?string|table either a of option strings or the first option string, with a table values are the options
|
|
</li>
|
|
<li><span class="parameter">...</span>
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
|
when options is not a you can add the options one after each other
|
|
(<em>optional</em>)
|
|
</li>
|
|
<li><span class="parameter">the</span>
|
|
<span class="types"><span class="type">self</span></span>
|
|
define to allow chaining
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Dropdown._prototype:new_dynamic_options"></a>
|
|
<strong>Dropdown._prototype:new_dynamic_options (callback)</strong>
|
|
</dt>
|
|
<dd>
|
|
Adds a callback which should return a table of values to be added as options for the dropdown (appended after static options)
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">callback</span>
|
|
<span class="types"><span class="type">function</span></span>
|
|
the function that will run to get the options for the dropdown
|
|
callback param - player LuaPlayer - the player that the element is being drawn to
|
|
callback param - element LuaGuiElement - the element that is being drawn
|
|
callback return - table - the values of this table will be appended to the static options of the dropdown
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">self</span></span>
|
|
the define to allow chaining
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Dropdown._prototype:add_option_callback"></a>
|
|
<strong>Dropdown._prototype:add_option_callback (option, callback)</strong>
|
|
</dt>
|
|
<dd>
|
|
Adds a case specific callback which will only run when that option is selected (general case still triggered)
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">option</span>
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
|
the name of the option to trigger the callback on; if not already added then will be added as an option
|
|
</li>
|
|
<li><span class="parameter">callback</span>
|
|
<span class="types"><span class="type">function</span></span>
|
|
the function that will be called when that option is selected
|
|
callback param - player LuaPlayer - the player who owns the gui element
|
|
callback param - element LuaGuiElement - the element which is being effected
|
|
callback param - value string - the new option that has been selected
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">self</span></span>
|
|
the define to allow chaining
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Dropdown.select_value"></a>
|
|
<strong>Dropdown.select_value (element, value)</strong>
|
|
</dt>
|
|
<dd>
|
|
Selects the option from a dropdown or list box given the value rather than key
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">element</span>
|
|
<span class="types"><span class="type">LuaGuiElement</span></span>
|
|
the element that contains the option
|
|
</li>
|
|
<li><span class="parameter">value</span>
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
|
the option to select from the dropdown
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">number</span></span>
|
|
the key where the value was
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Dropdown.get_selected_value"></a>
|
|
<strong>Dropdown.get_selected_value (element)</strong>
|
|
</dt>
|
|
<dd>
|
|
Returns the currently selected value rather than index
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">element</span>
|
|
<span class="types"><span class="type">LuaGuiElement</span></span>
|
|
the gui element that you want to get the value of
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="http://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
|
the value that is currently selected
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
</div> <!-- id="content" -->
|
|
</div> <!-- id="main" -->
|
|
<div id="about">
|
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
|
<i style="float:right;">Last updated 2019-05-29 22:22:59 </i>
|
|
</div> <!-- id="about" -->
|
|
</div> <!-- id="container" -->
|
|
</body>
|
|
</html>
|