Files
factorio-scenario-ExpCluster/doc/modules/expcore.gui.progress-bar.html
2019-05-29 22:28:53 +01:00

558 lines
19 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/Common.html">Common</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><a href="../modules/expcore.gui.dropdown.html">expcore.gui.dropdown</a></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><strong>expcore.gui.progress-bar</strong></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.progress-bar</code></h1>
<p>Gui element define for progess bars
[[</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#ProgressBar.set_maximum">ProgressBar.set_maximum (element, amount)</a></td>
<td class="summary">Sets the maximum value that represents the end value of the progress bar</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ProgressBar.increment">ProgressBar.increment (element[, amount=1])</a></td>
<td class="summary">Increases the value of the progressbar, if a define is given all of its instances are incremented</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ProgressBar.decrement">ProgressBar.decrement (element[, amount=1])</a></td>
<td class="summary">Decreases the value of the progressbar, if a define is given all of its instances are decresed</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ProgressBar.new_progressbar">ProgressBar.new_progressbar ([name])</a></td>
<td class="summary">Creates a new progressbar element define</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ProgressBar._prototype:set_default_maximum">ProgressBar._prototype:set_default_maximum (amount)</a></td>
<td class="summary">Sets the maximum value that represents the end value of the progress bar</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ProgressBar._prototype:use_count_down">ProgressBar._prototype:use_count_down ([state=true])</a></td>
<td class="summary">Will set the progress bar to start at 1 and trigger when it hits 0</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ProgressBar._prototype:increment">ProgressBar._prototype:increment ([amount=1[, category]])</a></td>
<td class="summary">Increases the value of the progressbar</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ProgressBar._prototype:increment_filtered">ProgressBar._prototype:increment_filtered ([amount=1], filter)</a></td>
<td class="summary">Increases the value of the progressbar, if the filter condition is met, does not work with store</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ProgressBar._prototype:decrement">ProgressBar._prototype:decrement ([amount=1[, category]])</a></td>
<td class="summary">Decreases the value of the progressbar</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ProgressBar._prototype:decrement_filtered">ProgressBar._prototype:decrement_filtered ([amount=1], filter)</a></td>
<td class="summary">Decreases the value of the progressbar, if the filter condition is met, does not work with store</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ProgressBar._prototype:add_element">ProgressBar._prototype:add_element (element[, maximum])</a></td>
<td class="summary">Adds an element into the list of instances that will are waiting to complete, does not work with store
note use store if you want persistent data, this only stores the elements not the values which they have</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ProgressBar._prototype:reset_element">ProgressBar._prototype:reset_element (element)</a></td>
<td class="summary">Resets an element, or its store, to be back at the start, either 1 or 0</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ProgressBar._prototype:event_counter">ProgressBar._prototype:event_counter ([filter])</a></td>
<td class="summary">Event handler factory that counts up by 1 every time the event triggeres, can filter which elements are incremented</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ProgressBar._prototype:event_countdown">ProgressBar._prototype:event_countdown ([filter])</a></td>
<td class="summary">Event handler factory that counts down by 1 every time the event triggeres, can filter which elements are decremented</td>
</tr>
</table>
<br/>
<br/>
<h2><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "ProgressBar.set_maximum"></a>
<strong>ProgressBar.set_maximum (element, amount)</strong>
</dt>
<dd>
Sets the maximum value that represents the end value of the progress bar
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">element</span>
<span class="types"><span class="type">LuaGuiElement</span> or <a class="type" href="http://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
either a gui element or a registered define
</li>
<li><span class="parameter">amount</span>
<span class="types"><span class="type">number</span></span>
the amount to have set as the maximum
</li>
</ul>
</dd>
<dt>
<a name = "ProgressBar.increment"></a>
<strong>ProgressBar.increment (element[, amount=1])</strong>
</dt>
<dd>
Increases the value of the progressbar, if a define is given all of its instances are incremented
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">element</span>
<span class="types"><span class="type">LuaGuiElement</span> or <a class="type" href="http://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
either a gui element or a registered define
</li>
<li><span class="parameter">amount</span>
<span class="types"><span class="type">number</span></span>
the amount to increase the progressbar by
(<em>default</em> 1)
</li>
</ul>
</dd>
<dt>
<a name = "ProgressBar.decrement"></a>
<strong>ProgressBar.decrement (element[, amount=1])</strong>
</dt>
<dd>
Decreases the value of the progressbar, if a define is given all of its instances are decresed
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">element</span>
<span class="types"><span class="type">LuaGuiElement</span> or <a class="type" href="http://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
either a gui element or a registered define
</li>
<li><span class="parameter">amount</span>
<span class="types"><span class="type">number</span></span>
the amount to decrease the progressbar by
(<em>default</em> 1)
</li>
</ul>
</dd>
<dt>
<a name = "ProgressBar.new_progressbar"></a>
<strong>ProgressBar.new_progressbar ([name])</strong>
</dt>
<dd>
Creates a new progressbar 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 progressbar elemente define
</ol>
</dd>
<dt>
<a name = "ProgressBar._prototype:set_default_maximum"></a>
<strong>ProgressBar._prototype:set_default_maximum (amount)</strong>
</dt>
<dd>
Sets the maximum value that represents the end value of the progress bar
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">amount</span>
<span class="types"><span class="type">number</span></span>
the amount to have set as the maximum
</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 define to allow chaining
</ol>
</dd>
<dt>
<a name = "ProgressBar._prototype:use_count_down"></a>
<strong>ProgressBar._prototype:use_count_down ([state=true])</strong>
</dt>
<dd>
Will set the progress bar to start at 1 and trigger when it hits 0
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">state</span>
<span class="types"><span class="type">boolean</span></span>
when true the bar will start filled, to be used with decrease
(<em>default</em> true)
</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 define to allow chaining
</ol>
</dd>
<dt>
<a name = "ProgressBar._prototype:increment"></a>
<strong>ProgressBar._prototype:increment ([amount=1[, category]])</strong>
</dt>
<dd>
Increases the value of the progressbar
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">amount</span>
<span class="types"><span class="type">number</span></span>
the amount to increase the progressbar by
(<em>default</em> 1)
</li>
<li><span class="parameter">category</span>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
the category that is used with a store
(<em>optional</em>)
</li>
</ul>
</dd>
<dt>
<a name = "ProgressBar._prototype:increment_filtered"></a>
<strong>ProgressBar._prototype:increment_filtered ([amount=1], filter)</strong>
</dt>
<dd>
Increases the value of the progressbar, if the filter condition is met, does not work with store
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">amount</span>
<span class="types"><span class="type">number</span></span>
the amount to increase the progressbar by
(<em>default</em> 1)
</li>
<li><span class="parameter">filter</span>
<span class="types"><span class="type">function</span></span>
the filter to be used
</li>
</ul>
</dd>
<dt>
<a name = "ProgressBar._prototype:decrement"></a>
<strong>ProgressBar._prototype:decrement ([amount=1[, category]])</strong>
</dt>
<dd>
Decreases the value of the progressbar
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">amount</span>
<span class="types"><span class="type">number</span></span>
the amount to decrease the progressbar by
(<em>default</em> 1)
</li>
<li><span class="parameter">category</span>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
the category that is used with a store
(<em>optional</em>)
</li>
</ul>
</dd>
<dt>
<a name = "ProgressBar._prototype:decrement_filtered"></a>
<strong>ProgressBar._prototype:decrement_filtered ([amount=1], filter)</strong>
</dt>
<dd>
Decreases the value of the progressbar, if the filter condition is met, does not work with store
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">amount</span>
<span class="types"><span class="type">number</span></span>
the amount to decrease the progressbar by
(<em>default</em> 1)
</li>
<li><span class="parameter">filter</span>
<span class="types"><span class="type">function</span></span>
the filter to be used
</li>
</ul>
</dd>
<dt>
<a name = "ProgressBar._prototype:add_element"></a>
<strong>ProgressBar._prototype:add_element (element[, maximum])</strong>
</dt>
<dd>
Adds an element into the list of instances that will are waiting to complete, does not work with store
note use store if you want persistent data, this only stores the elements not the values which they have
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">element</span>
<span class="types"><span class="type">LuaGuiElement</span></span>
the element that you want to add into the waiting to complete list
</li>
<li><span class="parameter">maximum</span>
<span class="types"><span class="type">number</span></span>
the maximum for this element if not given the default for this define is used
(<em>optional</em>)
</li>
</ul>
</dd>
<dt>
<a name = "ProgressBar._prototype:reset_element"></a>
<strong>ProgressBar._prototype:reset_element (element)</strong>
</dt>
<dd>
Resets an element, or its store, to be back at the start, either 1 or 0
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">element</span>
<span class="types"><span class="type">LuaGuiElement</span></span>
the element that you want to reset the progress of
</li>
</ul>
</dd>
<dt>
<a name = "ProgressBar._prototype:event_counter"></a>
<strong>ProgressBar._prototype:event_counter ([filter])</strong>
</dt>
<dd>
Event handler factory that counts up by 1 every time the event triggeres, can filter which elements are incremented
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">filter</span>
<span class="types"><span class="type">function</span></span>
when given will use filtered incerement
(<em>optional</em>)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">function</span></span>
the event handler
</ol>
</dd>
<dt>
<a name = "ProgressBar._prototype:event_countdown"></a>
<strong>ProgressBar._prototype:event_countdown ([filter])</strong>
</dt>
<dd>
Event handler factory that counts down by 1 every time the event triggeres, can filter which elements are decremented
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">filter</span>
<span class="types"><span class="type">function</span></span>
when given will use filtered decerement
(<em>optional</em>)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">function</span></span>
the event handler
</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:26:12 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>