Druid-Extension/docs/modules/.druidprogress.html
2020-02-05 02:42:58 +03:00

304 lines
8.2 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>Defold Druid UI Library</title>
<link rel="stylesheet" href="../ldoc_pale.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>Druid</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="nowrap">
<li><a href="../modules/.druidback_handler.html">.druidback_handler</a></li>
<li><a href="../modules/.druidblocker.html">.druidblocker</a></li>
<li><a href="../modules/.druidbutton.html">.druidbutton</a></li>
<li><a href="../modules/.druidcheckbox.html">.druidcheckbox</a></li>
<li><a href="../modules/.druidcheckbox_group.html">.druidcheckbox_group</a></li>
<li><a href="../modules/.druidgrid.html">.druidgrid</a></li>
<li><a href="../modules/.druidtext.html">.druidtext</a></li>
<li><strong>.druidprogress</strong></li>
<li><a href="../modules/.druidcheckbox_group.html">.druidcheckbox_group</a></li>
<li><a href="../modules/.druidscroll.html">.druidscroll</a></li>
<li><a href="../modules/.druidslider.html">.druidslider</a></li>
<li><a href="../modules/.druidtext.html">.druidtext</a></li>
<li><a href="../modules/.druidtimer.html">.druidtimer</a></li>
<li><a href="../modules/const.html">const</a></li>
<li><a href="../modules/druid.html">druid</a></li>
<li><a href="../modules/helper.html">helper</a></li>
<li><a href="../modules/helper.animate.html">helper.animate</a></li>
<li><a href="../modules/helper.formats.html">helper.formats</a></li>
<li><a href="../modules/rich.progress_rich.html">rich.progress_rich</a></li>
<li><a href="../modules/component.html">component</a></li>
<li><a href="../modules/settings.html">settings</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>.druidprogress</code></h1>
<p>Basic progress bar component</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#progress:init">progress:init(self, node, key, init_value)</a></td>
<td class="summary">Component init function</td>
</tr>
<tr>
<td class="name" nowrap><a href="#progress:empty">progress:empty(self)</a></td>
<td class="summary">Fill a progress bar and stop progress animation</td>
</tr>
<tr>
<td class="name" nowrap><a href="#progress:empty">progress:empty(self)</a></td>
<td class="summary">Empty a progress bar</td>
</tr>
<tr>
<td class="name" nowrap><a href="#progress:set_to">progress:set_to(self, to)</a></td>
<td class="summary">Instant fill progress bar to value</td>
</tr>
<tr>
<td class="name" nowrap><a href="#progress:get">progress:get(self)</a></td>
<td class="summary">Return current progress bar value</td>
</tr>
<tr>
<td class="name" nowrap><a href="#progress:set_steps">progress:set_steps(self, steps, callback)</a></td>
<td class="summary">Set points on progress bar to fire the callback</td>
</tr>
<tr>
<td class="name" nowrap><a href="#progress:to">progress:to(self, to[, callback])</a></td>
<td class="summary">Start animation of a progress bar</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "progress:init"></a>
<strong>progress:init(self, node, key, init_value)</strong>
</dt>
<dd>
Component init function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
Component instance
</li>
<li><span class="parameter">node</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a> or <span class="type">node</span></span>
Progress bar fill node or node name
</li>
<li><span class="parameter">key</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
Progress bar direction (x or y)
</li>
<li><span class="parameter">init_value</span>
<span class="types"><span class="type">number</span></span>
Initial value of progress bar
</li>
</ul>
</dd>
<dt>
<a name = "progress:empty"></a>
<strong>progress:empty(self)</strong>
</dt>
<dd>
Fill a progress bar and stop progress animation
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
Component instance
</li>
</ul>
</dd>
<dt>
<a name = "progress:empty"></a>
<strong>progress:empty(self)</strong>
</dt>
<dd>
Empty a progress bar
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
Component instance
</li>
</ul>
</dd>
<dt>
<a name = "progress:set_to"></a>
<strong>progress:set_to(self, to)</strong>
</dt>
<dd>
Instant fill progress bar to value
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
Component instance
</li>
<li><span class="parameter">to</span>
<span class="types"><span class="type">number</span></span>
Progress bar value, from 0 to 1
</li>
</ul>
</dd>
<dt>
<a name = "progress:get"></a>
<strong>progress:get(self)</strong>
</dt>
<dd>
Return current progress bar value
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
Component instance
</li>
</ul>
</dd>
<dt>
<a name = "progress:set_steps"></a>
<strong>progress:set_steps(self, steps, callback)</strong>
</dt>
<dd>
Set points on progress bar to fire the callback
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
Component instance
</li>
<li><span class="parameter">steps</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
Array of progress bar values
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
Callback on intersect step value
</li>
</ul>
</dd>
<dt>
<a name = "progress:to"></a>
<strong>progress:to(self, to[, callback])</strong>
</dt>
<dd>
Start animation of a progress bar
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
Component instance
</li>
<li><span class="parameter">to</span>
<span class="types"><span class="type">number</span></span>
value between 0..1
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
Callback on animation ends
(<em>optional</em>)
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-04 23:48:07 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>