mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 18:37:44 +02:00
Merge pull request #31 from AGulev/feature/druid-refactor
Feature/druid refactor
This commit is contained in:
commit
ac63d8f6f7
103
docs/index.html
103
docs/index.html
@ -29,6 +29,28 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Modules</h2>
|
||||||
|
<ul class="nowrap">
|
||||||
|
<li><a href="modules/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="modules/constants.html">constants</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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -37,12 +59,91 @@
|
|||||||
|
|
||||||
<h2>Documentation for Druid Library</h2>
|
<h2>Documentation for Druid Library</h2>
|
||||||
|
|
||||||
|
<h2>Modules</h2>
|
||||||
|
<table class="module_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/base.back_handler.html">base.back_handler</a></td>
|
||||||
|
<td class="summary">Component to handle back key (android, backspace)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/base.blocker.html">base.blocker</a></td>
|
||||||
|
<td class="summary">Component to block input on specify zone (node)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/base.button.html">base.button</a></td>
|
||||||
|
<td class="summary">Component to handle basic GUI button</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/base.checkbox.html">base.checkbox</a></td>
|
||||||
|
<td class="summary">Druid checkbox component</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/base.checkbox_group.html">base.checkbox_group</a></td>
|
||||||
|
<td class="summary">Checkboux group module</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/base.grid.html">base.grid</a></td>
|
||||||
|
<td class="summary">Component to handle placing components by row and columns.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/base.progress.html">base.progress</a></td>
|
||||||
|
<td class="summary">Basic progress bar component</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/base.checkbox_group.html">base.checkbox_group</a></td>
|
||||||
|
<td class="summary">Radio group module</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/base.scroll.html">base.scroll</a></td>
|
||||||
|
<td class="summary">Component to handle scroll content</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/base.slider.html">base.slider</a></td>
|
||||||
|
<td class="summary">Druid slider component</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/base.text.html">base.text</a></td>
|
||||||
|
<td class="summary">Component to handle all GUI texts Good working with localization system</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/base.timer.html">base.timer</a></td>
|
||||||
|
<td class="summary">Component to handle GUI timers</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/constants.html">constants</a></td>
|
||||||
|
<td class="summary">Druid constants</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/druid.html">druid</a></td>
|
||||||
|
<td class="summary">Druid UI Library.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/helper.html">helper</a></td>
|
||||||
|
<td class="summary">Druid helper module</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/helper.animate.html">helper.animate</a></td>
|
||||||
|
<td class="summary">Druid helper module for animating GUI nodes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/helper.formats.html">helper.formats</a></td>
|
||||||
|
<td class="summary">Druid module with utils on string formats</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/rich.progress_rich.html">rich.progress_rich</a></td>
|
||||||
|
<td class="summary">Component for rich progress component</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="modules/settings.html">settings</a></td>
|
||||||
|
<td class="summary">Druid settings file</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
</div> <!-- id="content" -->
|
</div> <!-- id="content" -->
|
||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
||||||
<i style="float:right;">Last updated 2019-09-25 19:57:43 </i>
|
<i style="float:right;">Last updated 2019-12-05 22:04:11 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
155
docs/modules/back_handler.html
Normal file
155
docs/modules/back_handler.html
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
<!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><strong>back_handler</strong></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>back_handler</code></h1>
|
||||||
|
<p>Component to handle back key</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#init">init(self, callback[, Callback])</a></td>
|
||||||
|
<td class="summary">Component init function</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#on_input">on_input(action_id, action)</a></td>
|
||||||
|
<td class="summary">Input handler for component</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "init"></a>
|
||||||
|
<strong>init(self, callback[, Callback])</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">callback</span>
|
||||||
|
<span class="types"><span class="type">callback</span></span>
|
||||||
|
On back button
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">Callback</span>
|
||||||
|
<span class="types"><span class="type">params</span></span>
|
||||||
|
argument
|
||||||
|
(<em>optional</em>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "on_input"></a>
|
||||||
|
<strong>on_input(action_id, action)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Input handler for component
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">action_id</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
|
||||||
|
on_input action id
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">action</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
|
||||||
|
on_input action
|
||||||
|
</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 2019-12-05 21:37:51 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
156
docs/modules/base.back_handler.html
Normal file
156
docs/modules/base.back_handler.html
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
<!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><strong>base.back_handler</strong></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>base.back_handler</code></h1>
|
||||||
|
<p>Component to handle back key (android, backspace)</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#init">init(self, callback[, Callback])</a></td>
|
||||||
|
<td class="summary">Component init function</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#on_input">on_input(action_id, action)</a></td>
|
||||||
|
<td class="summary">Input handler for component</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "init"></a>
|
||||||
|
<strong>init(self, callback[, Callback])</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">callback</span>
|
||||||
|
<span class="types"><span class="type">callback</span></span>
|
||||||
|
On back button
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">Callback</span>
|
||||||
|
<span class="types"><span class="type">params</span></span>
|
||||||
|
argument
|
||||||
|
(<em>optional</em>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "on_input"></a>
|
||||||
|
<strong>on_input(action_id, action)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Input handler for component
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">action_id</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
|
||||||
|
on_input action id
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">action</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
|
||||||
|
on_input action
|
||||||
|
</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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
82
docs/modules/base.blocker.html
Normal file
82
docs/modules/base.blocker.html
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<!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>Modules</h2>
|
||||||
|
<ul class="nowrap">
|
||||||
|
<li><a href="../modules/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><strong>base.blocker</strong></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>base.blocker</code></h1>
|
||||||
|
<p>Component to block input on specify zone (node)</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
195
docs/modules/base.button.html
Normal file
195
docs/modules/base.button.html
Normal file
@ -0,0 +1,195 @@
|
|||||||
|
<!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/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><strong>base.button</strong></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>base.button</code></h1>
|
||||||
|
<p>Component to handle basic GUI button</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#init">init(self, node, callback[, params[, anim_node[, event]]])</a></td>
|
||||||
|
<td class="summary">Component init function</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#disable_animation">disable_animation(self)</a></td>
|
||||||
|
<td class="summary">Disable all button animations</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(self, zone)</a></td>
|
||||||
|
<td class="summary">Strict button click area.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "init"></a>
|
||||||
|
<strong>init(self, node, callback[, params[, anim_node[, event]]])</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"><span class="type">node</span></span>
|
||||||
|
Gui node
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">callback</span>
|
||||||
|
<span class="types"><span class="type">function</span></span>
|
||||||
|
Button callback
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">params</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
|
||||||
|
Button callback params
|
||||||
|
(<em>optional</em>)
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">anim_node</span>
|
||||||
|
<span class="types"><span class="type">node</span></span>
|
||||||
|
Button anim node (node, if not provided)
|
||||||
|
(<em>optional</em>)
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">event</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
|
||||||
|
Button react event, const.ACTION_TOUCH by default
|
||||||
|
(<em>optional</em>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "disable_animation"></a>
|
||||||
|
<strong>disable_animation(self)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Disable all button animations
|
||||||
|
|
||||||
|
|
||||||
|
<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 = "set_click_zone"></a>
|
||||||
|
<strong>set_click_zone(self, zone)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Strict button click area. Useful for no click events outside stencil node
|
||||||
|
|
||||||
|
|
||||||
|
<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">zone</span>
|
||||||
|
<span class="types"><span class="type">node</span></span>
|
||||||
|
Gui node
|
||||||
|
</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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
82
docs/modules/base.checkbox.html
Normal file
82
docs/modules/base.checkbox.html
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<!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>Modules</h2>
|
||||||
|
<ul class="nowrap">
|
||||||
|
<li><a href="../modules/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><strong>base.checkbox</strong></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>base.checkbox</code></h1>
|
||||||
|
<p>Druid checkbox component</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
82
docs/modules/base.checkbox_group.html
Normal file
82
docs/modules/base.checkbox_group.html
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<!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>Modules</h2>
|
||||||
|
<ul class="nowrap">
|
||||||
|
<li><a href="../modules/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><strong>base.checkbox_group</strong></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><strong>base.checkbox_group</strong></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>base.checkbox_group</code></h1>
|
||||||
|
<p>Radio group module</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
82
docs/modules/base.grid.html
Normal file
82
docs/modules/base.grid.html
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<!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>Modules</h2>
|
||||||
|
<ul class="nowrap">
|
||||||
|
<li><a href="../modules/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><strong>base.grid</strong></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>base.grid</code></h1>
|
||||||
|
<p>Component to handle placing components by row and columns.</p>
|
||||||
|
<p>Grid can anchor your elements, get content size and other</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
155
docs/modules/base.html
Normal file
155
docs/modules/base.html
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
<!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><strong>base</strong></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>base</code></h1>
|
||||||
|
<p>Component to handle back key</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#back_handler:init">back_handler:init(self, callback[, Callback])</a></td>
|
||||||
|
<td class="summary">Component init function</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#back_handler:on_input">back_handler:on_input(action_id, action)</a></td>
|
||||||
|
<td class="summary">Input handler for component</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "back_handler:init"></a>
|
||||||
|
<strong>back_handler:init(self, callback[, Callback])</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">callback</span>
|
||||||
|
<span class="types"><span class="type">callback</span></span>
|
||||||
|
On back button
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">Callback</span>
|
||||||
|
<span class="types"><span class="type">params</span></span>
|
||||||
|
argument
|
||||||
|
(<em>optional</em>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "back_handler:on_input"></a>
|
||||||
|
<strong>back_handler:on_input(action_id, action)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Input handler for component
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">action_id</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
|
||||||
|
on_input action id
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">action</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
|
||||||
|
on_input action
|
||||||
|
</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 2019-12-05 21:36:59 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
301
docs/modules/base.progress.html
Normal file
301
docs/modules/base.progress.html
Normal file
@ -0,0 +1,301 @@
|
|||||||
|
<!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/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><strong>base.progress</strong></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>base.progress</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="#init">init(self, node, key, init_value)</a></td>
|
||||||
|
<td class="summary">Component init function</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#empty">empty(self)</a></td>
|
||||||
|
<td class="summary">Fill a progress bar and stop progress animation</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#empty">empty(self)</a></td>
|
||||||
|
<td class="summary">Empty a progress bar</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_to">set_to(self, to)</a></td>
|
||||||
|
<td class="summary">Instant fill progress bar to value</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#get">get(self)</a></td>
|
||||||
|
<td class="summary">Return current progress bar value</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_steps">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="#to">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 = "init"></a>
|
||||||
|
<strong>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 = "empty"></a>
|
||||||
|
<strong>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 = "empty"></a>
|
||||||
|
<strong>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 = "set_to"></a>
|
||||||
|
<strong>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 = "get"></a>
|
||||||
|
<strong>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 = "set_steps"></a>
|
||||||
|
<strong>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 = "to"></a>
|
||||||
|
<strong>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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
278
docs/modules/base.scroll.html
Normal file
278
docs/modules/base.scroll.html
Normal file
@ -0,0 +1,278 @@
|
|||||||
|
<!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/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><strong>base.scroll</strong></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>base.scroll</code></h1>
|
||||||
|
<p>Component to handle scroll content</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#scroll_to">scroll_to(vector3[, is_instant])</a></td>
|
||||||
|
<td class="summary">Start scroll to target point</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#init">init(self, index[, skip_cb])</a></td>
|
||||||
|
<td class="summary">Scroll to item in scroll by point index</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_points">set_points(self, points)</a></td>
|
||||||
|
<td class="summary">Set points of interest.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_inert">set_inert(self, state)</a></td>
|
||||||
|
<td class="summary">Enable or disable scroll inert.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#on_point_move">on_point_move(self, callback)</a></td>
|
||||||
|
<td class="summary">Set the callback on scrolling to point (if exist)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_border">set_border(self, border)</a></td>
|
||||||
|
<td class="summary">Set the scroll possibly area</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "scroll_to"></a>
|
||||||
|
<strong>scroll_to(vector3[, is_instant])</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Start scroll to target point
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">vector3</span>
|
||||||
|
<span class="types"><span class="type">point</span></span>
|
||||||
|
target point
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">is_instant</span>
|
||||||
|
<span class="types"><span class="type">bool</span></span>
|
||||||
|
instant scroll flag
|
||||||
|
(<em>optional</em>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Usage:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><pre class="example">scroll:scroll_to(vmath.vector3(<span class="number">0</span>, <span class="number">50</span>, <span class="number">0</span>))</pre></li>
|
||||||
|
<li><pre class="example">scroll:scroll_to(vmath.vector3(<span class="number">0</span>), <span class="keyword">true</span>)</pre></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "init"></a>
|
||||||
|
<strong>init(self, index[, skip_cb])</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Scroll to item in scroll by point index
|
||||||
|
|
||||||
|
|
||||||
|
<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">index</span>
|
||||||
|
<span class="types"><span class="type">number</span></span>
|
||||||
|
Point index
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">skip_cb</span>
|
||||||
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
|
If true, skip the point callback
|
||||||
|
(<em>optional</em>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "set_points"></a>
|
||||||
|
<strong>set_points(self, points)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set points of interest. Scroll will always centered on closer points
|
||||||
|
|
||||||
|
|
||||||
|
<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">points</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
|
||||||
|
Array of vector3 points
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "set_inert"></a>
|
||||||
|
<strong>set_inert(self, state)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Enable or disable scroll inert. If disabled, scroll through points (if exist) If no points, just simple drag without inertion
|
||||||
|
|
||||||
|
|
||||||
|
<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">state</span>
|
||||||
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
|
Inert scroll state
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "on_point_move"></a>
|
||||||
|
<strong>on_point_move(self, callback)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set the callback on scrolling to point (if exist)
|
||||||
|
|
||||||
|
|
||||||
|
<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">callback</span>
|
||||||
|
<span class="types"><span class="type">function</span></span>
|
||||||
|
Callback on scroll to point of interest
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "set_border"></a>
|
||||||
|
<strong>set_border(self, border)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set the scroll possibly area
|
||||||
|
|
||||||
|
|
||||||
|
<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">border</span>
|
||||||
|
<span class="types"><span class="type">vmath.vector3</span></span>
|
||||||
|
Size of scrolling area
|
||||||
|
</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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
82
docs/modules/base.slider.html
Normal file
82
docs/modules/base.slider.html
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<!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>Modules</h2>
|
||||||
|
<ul class="nowrap">
|
||||||
|
<li><a href="../modules/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><strong>base.slider</strong></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>base.slider</code></h1>
|
||||||
|
<p>Druid slider component</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
238
docs/modules/base.text.html
Normal file
238
docs/modules/base.text.html
Normal file
@ -0,0 +1,238 @@
|
|||||||
|
<!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/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><strong>base.text</strong></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>base.text</code></h1>
|
||||||
|
<p>Component to handle all GUI texts Good working with localization system</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#translate">translate(self, locale_id)</a></td>
|
||||||
|
<td class="summary">Translate the text by locale_id</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_to">set_to(self, set_to)</a></td>
|
||||||
|
<td class="summary">Set text to text field</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_color">set_color(self, color)</a></td>
|
||||||
|
<td class="summary">Set color</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_alpha">set_alpha(self, alpha)</a></td>
|
||||||
|
<td class="summary">Set alpha</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_scale">set_scale(self, scale)</a></td>
|
||||||
|
<td class="summary">Set scale</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "translate"></a>
|
||||||
|
<strong>translate(self, locale_id)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Translate the text by locale_id
|
||||||
|
|
||||||
|
|
||||||
|
<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">locale_id</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
|
||||||
|
Locale id
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "set_to"></a>
|
||||||
|
<strong>set_to(self, set_to)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set text to text field
|
||||||
|
|
||||||
|
|
||||||
|
<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">set_to</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
|
||||||
|
Text for node
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "set_color"></a>
|
||||||
|
<strong>set_color(self, color)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set color
|
||||||
|
|
||||||
|
|
||||||
|
<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">color</span>
|
||||||
|
<span class="types"><span class="type">vmath.vector4</span></span>
|
||||||
|
Color for node
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "set_alpha"></a>
|
||||||
|
<strong>set_alpha(self, alpha)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set alpha
|
||||||
|
|
||||||
|
|
||||||
|
<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">alpha</span>
|
||||||
|
<span class="types"><span class="type">number</span></span>
|
||||||
|
Alpha for node
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "set_scale"></a>
|
||||||
|
<strong>set_scale(self, scale)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set scale
|
||||||
|
|
||||||
|
|
||||||
|
<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">scale</span>
|
||||||
|
<span class="types"><span class="type">vmath.vector3</span></span>
|
||||||
|
Scale for node
|
||||||
|
</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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
184
docs/modules/base.timer.html
Normal file
184
docs/modules/base.timer.html
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
<!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/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><strong>base.timer</strong></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>base.timer</code></h1>
|
||||||
|
<p>Component to handle GUI timers</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_to">set_to(self, set_to)</a></td>
|
||||||
|
<td class="summary">Set text to text field</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_state">set_state(self, is_on)</a></td>
|
||||||
|
<td class="summary">Called when update</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_interval">set_interval(self, from, to)</a></td>
|
||||||
|
<td class="summary">Set time interval</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "set_to"></a>
|
||||||
|
<strong>set_to(self, set_to)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set text to text field
|
||||||
|
|
||||||
|
|
||||||
|
<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">set_to</span>
|
||||||
|
<span class="types"><span class="type">number</span></span>
|
||||||
|
Value in seconds
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "set_state"></a>
|
||||||
|
<strong>set_state(self, is_on)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Called when update
|
||||||
|
|
||||||
|
|
||||||
|
<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">is_on</span>
|
||||||
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
|
Timer enable state
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "set_interval"></a>
|
||||||
|
<strong>set_interval(self, from, to)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set time interval
|
||||||
|
|
||||||
|
|
||||||
|
<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">from</span>
|
||||||
|
<span class="types"><span class="type">number</span></span>
|
||||||
|
Start time in seconds
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">to</span>
|
||||||
|
<span class="types"><span class="type">number</span></span>
|
||||||
|
Target time in seconds
|
||||||
|
</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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
155
docs/modules/components.back_handler.html
Normal file
155
docs/modules/components.back_handler.html
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
<!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><strong>components.back_handler</strong></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>components.back_handler</code></h1>
|
||||||
|
<p>Component to handle back key</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#init">init(self, callback[, Callback])</a></td>
|
||||||
|
<td class="summary">Component init function</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#on_input">on_input(action_id, action)</a></td>
|
||||||
|
<td class="summary">Input handler for component</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "init"></a>
|
||||||
|
<strong>init(self, callback[, Callback])</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">callback</span>
|
||||||
|
<span class="types"><span class="type">callback</span></span>
|
||||||
|
On back button
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">Callback</span>
|
||||||
|
<span class="types"><span class="type">params</span></span>
|
||||||
|
argument
|
||||||
|
(<em>optional</em>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "on_input"></a>
|
||||||
|
<strong>on_input(action_id, action)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Input handler for component
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">action_id</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
|
||||||
|
on_input action id
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">action</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
|
||||||
|
on_input action
|
||||||
|
</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 2019-12-05 21:38:00 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
111
docs/modules/constants.html
Normal file
111
docs/modules/constants.html
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
<!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="#Fields">Fields</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Modules</h2>
|
||||||
|
<ul class="nowrap">
|
||||||
|
<li><a href="../modules/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><strong>constants</strong></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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>constants</code></h1>
|
||||||
|
<p>Druid constants</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="#Fields">Fields</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#ON_MESSAGE">ON_MESSAGE</a></td>
|
||||||
|
<td class="summary">Interests</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "ON_MESSAGE"></a>
|
||||||
|
<strong>ON_MESSAGE</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Interests
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
309
docs/modules/druid.html
Normal file
309
docs/modules/druid.html
Normal file
@ -0,0 +1,309 @@
|
|||||||
|
<!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>
|
||||||
|
<li><a href="#Tables">Tables</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Modules</h2>
|
||||||
|
<ul class="nowrap">
|
||||||
|
<li><a href="../modules/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</a></li>
|
||||||
|
<li><strong>druid</strong></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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>druid</code></h1>
|
||||||
|
<p>Druid UI Library.</p>
|
||||||
|
<p>Component based UI library to make your life easier. Contains a lot of base components and give API to create your own rich components.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#register">register(name, module)</a></td>
|
||||||
|
<td class="summary">Register external module</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#new">new(component_script)</a></td>
|
||||||
|
<td class="summary">Create UI instance for ui elements</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#_fct_metatable.on_message">_fct_metatable.on_message(self, message_id, message, sender)</a></td>
|
||||||
|
<td class="summary">Called on_message</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#_fct_metatable.on_input">_fct_metatable.on_input(self, action_id, action)</a></td>
|
||||||
|
<td class="summary">Called ON_INPUT</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#_fct_metatable.update">_fct_metatable.update(self, dt)</a></td>
|
||||||
|
<td class="summary">Called on_update</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h2><a href="#Tables">Tables</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#comps">comps</a></td>
|
||||||
|
<td class="summary">Basic components</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "register"></a>
|
||||||
|
<strong>register(name, module)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Register external module
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">name</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
|
||||||
|
module name
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">module</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
|
||||||
|
lua table with module
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "new"></a>
|
||||||
|
<strong>new(component_script)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Create UI instance for ui elements
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">component_script</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
instance with all ui components
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "_fct_metatable.on_message"></a>
|
||||||
|
<strong>_fct_metatable.on_message(self, message_id, message, sender)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Called on_message
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">message_id</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">message</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">sender</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "_fct_metatable.on_input"></a>
|
||||||
|
<strong>_fct_metatable.on_input(self, action_id, action)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Called ON_INPUT
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">action_id</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">action</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "_fct_metatable.update"></a>
|
||||||
|
<strong>_fct_metatable.update(self, dt)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Called on_update
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">dt</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "comps"></a>
|
||||||
|
<strong>comps</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Basic components
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Fields:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">button</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">blocker</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">back_handler</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">text</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">timer</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">progress</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">grid</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">scroll</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">slider</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">checkbox</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">checkbox_group</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">radio_group</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">progress_rich</span>
|
||||||
|
|
||||||
|
</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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
82
docs/modules/helper.animate.html
Normal file
82
docs/modules/helper.animate.html
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<!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>Modules</h2>
|
||||||
|
<ul class="nowrap">
|
||||||
|
<li><a href="../modules/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</a></li>
|
||||||
|
<li><a href="../modules/druid.html">druid</a></li>
|
||||||
|
<li><a href="../modules/helper.html">helper</a></li>
|
||||||
|
<li><strong>helper.animate</strong></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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>helper.animate</code></h1>
|
||||||
|
<p>Druid helper module for animating GUI nodes</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
191
docs/modules/helper.formats.html
Normal file
191
docs/modules/helper.formats.html
Normal file
@ -0,0 +1,191 @@
|
|||||||
|
<!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/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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><strong>helper.formats</strong></li>
|
||||||
|
<li><a href="../modules/rich.progress_rich.html">rich.progress_rich</a></li>
|
||||||
|
<li><a href="../modules/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>helper.formats</code></h1>
|
||||||
|
<p>Druid module with utils on string formats</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#add_prefix_zeros">add_prefix_zeros(num, count)</a></td>
|
||||||
|
<td class="summary">Return number with zero number prefix</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#second_string_min">second_string_min(sec)</a></td>
|
||||||
|
<td class="summary">Convert seconds to string minutes:seconds</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#second_string_min">second_string_min(s, tab)</a></td>
|
||||||
|
<td class="summary">Interpolate string with named Parameters in Table</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "add_prefix_zeros"></a>
|
||||||
|
<strong>add_prefix_zeros(num, count)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Return number with zero number prefix
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">num</span>
|
||||||
|
<span class="types"><span class="type">number</span></span>
|
||||||
|
Number for conversion
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">count</span>
|
||||||
|
<span class="types"><span class="type">number</span></span>
|
||||||
|
Count of numerals
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
string with need count of zero (1,3) -> 001
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "second_string_min"></a>
|
||||||
|
<strong>second_string_min(sec)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Convert seconds to string minutes:seconds
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">sec</span>
|
||||||
|
<span class="types"><span class="type">number</span></span>
|
||||||
|
Seconds
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
string minutes:seconds
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "second_string_min"></a>
|
||||||
|
<strong>second_string_min(s, tab)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Interpolate string with named Parameters in Table
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">s</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
|
||||||
|
Target string
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">tab</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
|
||||||
|
Table with parameters
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
string with replaced parameters
|
||||||
|
</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.6</a></i>
|
||||||
|
<i style="float:right;">Last updated 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
153
docs/modules/helper.html
Normal file
153
docs/modules/helper.html
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
<!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/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</a></li>
|
||||||
|
<li><a href="../modules/druid.html">druid</a></li>
|
||||||
|
<li><strong>helper</strong></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/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>helper</code></h1>
|
||||||
|
<p>Druid helper module</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#centrate_text_with_icon">centrate_text_with_icon(text_node, icon_node, margin)</a></td>
|
||||||
|
<td class="summary">Text node or icon node can be nil</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#centrate_icon_with_text">centrate_icon_with_text(icon_node, text_node, margin)</a></td>
|
||||||
|
<td class="summary">Icon node or text node can be nil</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "centrate_text_with_icon"></a>
|
||||||
|
<strong>centrate_text_with_icon(text_node, icon_node, margin)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Text node or icon node can be nil
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">text_node</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">icon_node</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">margin</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "centrate_icon_with_text"></a>
|
||||||
|
<strong>centrate_icon_with_text(icon_node, text_node, margin)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Icon node or text node can be nil
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">icon_node</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">text_node</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">margin</span>
|
||||||
|
|
||||||
|
</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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
181
docs/modules/rich.progress_rich.html
Normal file
181
docs/modules/rich.progress_rich.html
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
<!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/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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><strong>rich.progress_rich</strong></li>
|
||||||
|
<li><a href="../modules/settings.html">settings</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>rich.progress_rich</code></h1>
|
||||||
|
<p>Component for rich progress component</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_to">set_to(self, value)</a></td>
|
||||||
|
<td class="summary">Instant fill progress bar to value</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#empty">empty(self)</a></td>
|
||||||
|
<td class="summary">Empty a progress bar</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#to">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 = "set_to"></a>
|
||||||
|
<strong>set_to(self, value)</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">value</span>
|
||||||
|
<span class="types"><span class="type">number</span></span>
|
||||||
|
Progress bar value, from 0 to 1
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "empty"></a>
|
||||||
|
<strong>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 = "to"></a>
|
||||||
|
<strong>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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
82
docs/modules/settings.html
Normal file
82
docs/modules/settings.html
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<!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>Modules</h2>
|
||||||
|
<ul class="nowrap">
|
||||||
|
<li><a href="../modules/base.back_handler.html">base.back_handler</a></li>
|
||||||
|
<li><a href="../modules/base.blocker.html">base.blocker</a></li>
|
||||||
|
<li><a href="../modules/base.button.html">base.button</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox.html">base.checkbox</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.grid.html">base.grid</a></li>
|
||||||
|
<li><a href="../modules/base.progress.html">base.progress</a></li>
|
||||||
|
<li><a href="../modules/base.checkbox_group.html">base.checkbox_group</a></li>
|
||||||
|
<li><a href="../modules/base.scroll.html">base.scroll</a></li>
|
||||||
|
<li><a href="../modules/base.slider.html">base.slider</a></li>
|
||||||
|
<li><a href="../modules/base.text.html">base.text</a></li>
|
||||||
|
<li><a href="../modules/base.timer.html">base.timer</a></li>
|
||||||
|
<li><a href="../modules/constants.html">constants</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><strong>settings</strong></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<h1>Module <code>settings</code></h1>
|
||||||
|
<p>Druid settings file</p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</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 2019-12-05 22:04:11 </i>
|
||||||
|
</div> <!-- id="about" -->
|
||||||
|
</div> <!-- id="container" -->
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1,4 +1,4 @@
|
|||||||
--- Component to handle back key
|
--- Component to handle back key (android, backspace)
|
||||||
-- @module base.back_handler
|
-- @module base.back_handler
|
||||||
|
|
||||||
local const = require("druid.const")
|
local const = require("druid.const")
|
||||||
@ -9,9 +9,10 @@ M.interest = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
--- Component init function
|
--- Component init function
|
||||||
-- @tparam table self component instance
|
-- @function back_handler:init
|
||||||
-- @tparam callback callback on back button
|
-- @tparam table self Component instance
|
||||||
-- @tparam[opt] params callback argument
|
-- @tparam callback callback On back button
|
||||||
|
-- @tparam[opt] params Callback argument
|
||||||
function M.init(self, callback, params)
|
function M.init(self, callback, params)
|
||||||
self.event = const.ACTION_BACK
|
self.event = const.ACTION_BACK
|
||||||
self.callback = callback
|
self.callback = callback
|
||||||
@ -20,6 +21,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Input handler for component
|
--- Input handler for component
|
||||||
|
-- @function back_handler:on_input
|
||||||
-- @tparam string action_id on_input action id
|
-- @tparam string action_id on_input action id
|
||||||
-- @tparam table action on_input action
|
-- @tparam table action on_input action
|
||||||
function M.on_input(self, action_id, action)
|
function M.on_input(self, action_id, action)
|
||||||
|
@ -12,7 +12,7 @@ M.interest = {
|
|||||||
|
|
||||||
|
|
||||||
function M.init(self, node)
|
function M.init(self, node)
|
||||||
self.node = helper.get_node(node)
|
self.node = helper.node(node)
|
||||||
self.event = const.ACTION_TOUCH
|
self.event = const.ACTION_TOUCH
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -22,10 +22,18 @@ M.DEFAULT_ACTIVATE_SCALE = vmath.vector3(1, 1, 1)
|
|||||||
M.DEFAULT_ACTIVATION_TIME = 0.2
|
M.DEFAULT_ACTIVATION_TIME = 0.2
|
||||||
|
|
||||||
|
|
||||||
|
--- Component init function
|
||||||
|
-- @function button:init
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam node node Gui node
|
||||||
|
-- @tparam function callback Button callback
|
||||||
|
-- @tparam[opt] table params Button callback params
|
||||||
|
-- @tparam[opt] node anim_node Button anim node (node, if not provided)
|
||||||
|
-- @tparam[opt] string event Button react event, const.ACTION_TOUCH by default
|
||||||
function M.init(self, node, callback, params, anim_node, event)
|
function M.init(self, node, callback, params, anim_node, event)
|
||||||
self.node = helper.get_node(node)
|
self.node = helper.node(node)
|
||||||
self.event = const.ACTION_TOUCH
|
self.event = const.ACTION_TOUCH
|
||||||
self.anim_node = anim_node and helper.get_node(anim_node) or self.node
|
self.anim_node = anim_node and helper.node(anim_node) or self.node
|
||||||
self.scale_from = gui.get_scale(self.anim_node)
|
self.scale_from = gui.get_scale(self.anim_node)
|
||||||
self.scale_to = self.scale_from + b_settings.SCALE_CHANGE
|
self.scale_to = self.scale_from + b_settings.SCALE_CHANGE
|
||||||
self.scale_hover_to = self.scale_from + b_settings.HOVER_SCALE
|
self.scale_hover_to = self.scale_from + b_settings.HOVER_SCALE
|
||||||
@ -79,9 +87,6 @@ local function on_button_release(self)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Set text to text field
|
|
||||||
-- @param action_id - input action id
|
|
||||||
-- @param action - input action
|
|
||||||
function M.on_input(self, action_id, action)
|
function M.on_input(self, action_id, action)
|
||||||
if not helper.is_enabled(self.node) then
|
if not helper.is_enabled(self.node) then
|
||||||
return false
|
return false
|
||||||
@ -197,6 +202,9 @@ function M.activate(self, is_animate, callback)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Disable all button animations
|
||||||
|
-- @function button:disable_animation
|
||||||
|
-- @tparam table self Component instance
|
||||||
function M.disable_animation(self)
|
function M.disable_animation(self)
|
||||||
self.hover_anim = false
|
self.hover_anim = false
|
||||||
self.tap_anim = nil
|
self.tap_anim = nil
|
||||||
@ -204,10 +212,13 @@ function M.disable_animation(self)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Set additional node, what need to be clicked on button click
|
--- Strict button click area. Useful for
|
||||||
-- Used, if need setup, what button can be clicked only in special zone
|
-- no click events outside stencil node
|
||||||
|
-- @function button:set_click_zone
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam node zone Gui node
|
||||||
function M.set_click_zone(self, zone)
|
function M.set_click_zone(self, zone)
|
||||||
self.click_zone = helper.get_node(zone)
|
self.click_zone = helper.node(zone)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function M.init(self, node, callback, click_node)
|
function M.init(self, node, callback, click_node)
|
||||||
self.node = helper.get_node(node)
|
self.node = helper.node(node)
|
||||||
self.click_node = helper.get_node(click_node)
|
self.click_node = helper.node(click_node)
|
||||||
self.callback = callback
|
self.callback = callback
|
||||||
|
|
||||||
self.button = self.parent:new_button(self.click_node or self.node, on_click, self)
|
self.button = self.parent:new_button(self.click_node or self.node, on_click, self)
|
||||||
|
@ -8,13 +8,13 @@ local M = {}
|
|||||||
|
|
||||||
|
|
||||||
function M.init(self, parent, element, in_row)
|
function M.init(self, parent, element, in_row)
|
||||||
self.parent = helper.get_node(parent)
|
self.parent = helper.node(parent)
|
||||||
self.nodes = {}
|
self.nodes = {}
|
||||||
|
|
||||||
self.offset = vmath.vector3(0)
|
self.offset = vmath.vector3(0)
|
||||||
self.anchor = vmath.vector3(0.5, 0, 0)
|
self.anchor = vmath.vector3(0.5, 0, 0)
|
||||||
self.in_row = in_row or 1
|
self.in_row = in_row or 1
|
||||||
self.node_size = gui.get_size(helper.get_node(element))
|
self.node_size = gui.get_size(helper.node(element))
|
||||||
self.border = vmath.vector4(0)
|
self.border = vmath.vector4(0)
|
||||||
self.border_offset = vmath.vector3(0)
|
self.border_offset = vmath.vector3(0)
|
||||||
end
|
end
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
--- Component to handle progress bars
|
--- Basic progress bar component
|
||||||
-- @module base.progress
|
-- @module base.progress
|
||||||
|
|
||||||
local const = require("druid.const")
|
local const = require("druid.const")
|
||||||
@ -12,25 +12,28 @@ M.interest = {
|
|||||||
const.ON_UPDATE,
|
const.ON_UPDATE,
|
||||||
}
|
}
|
||||||
|
|
||||||
local PROP_Y = "y"
|
|
||||||
local PROP_X = "x"
|
|
||||||
|
|
||||||
|
--- Component init function
|
||||||
function M.init(self, name, key, init_value)
|
-- @function progress:init
|
||||||
if key ~= PROP_X and key ~= PROP_Y then
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam string|node node Progress bar fill node or node name
|
||||||
|
-- @tparam string key Progress bar direction (x or y)
|
||||||
|
-- @tparam number init_value Initial value of progress bar
|
||||||
|
function M.init(self, node, key, init_value)
|
||||||
|
if key ~= const.SIDE.X and key ~= const.SIDE.Y then
|
||||||
settings.log("progress component: key must be 'x' or 'y'. Passed:", key)
|
settings.log("progress component: key must be 'x' or 'y'. Passed:", key)
|
||||||
key = PROP_X
|
key = const.SIDE.X
|
||||||
end
|
end
|
||||||
|
|
||||||
self.prop = hash("scale."..key)
|
self.prop = hash("scale."..key)
|
||||||
self.key = key
|
self.key = key
|
||||||
|
|
||||||
self.node = helper.get_node(name)
|
self.node = helper.node(node)
|
||||||
self.scale = gui.get_scale(self.node)
|
self.scale = gui.get_scale(self.node)
|
||||||
self.size = gui.get_size(self.node)
|
self.size = gui.get_size(self.node)
|
||||||
self.max_size = self.size[self.key]
|
self.max_size = self.size[self.key]
|
||||||
self.slice = gui.get_slice9(self.node)
|
self.slice = gui.get_slice9(self.node)
|
||||||
if key == PROP_X then
|
if key == const.SIDE.X then
|
||||||
self.slice_size = self.slice.x + self.slice.z
|
self.slice_size = self.slice.x + self.slice.z
|
||||||
else
|
else
|
||||||
self.slice_size = self.slice.y + self.slice.w
|
self.slice_size = self.slice.y + self.slice.w
|
||||||
@ -83,38 +86,54 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Fill a progress bar and stop progress animation
|
--- Fill a progress bar and stop progress animation
|
||||||
|
-- @function progress:empty
|
||||||
|
-- @tparam table self Component instance
|
||||||
function M.fill(self)
|
function M.fill(self)
|
||||||
set_bar_to(self, 1, true)
|
set_bar_to(self, 1, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- To empty a progress bar
|
--- Empty a progress bar
|
||||||
|
-- @function progress:empty
|
||||||
|
-- @tparam table self Component instance
|
||||||
function M.empty(self)
|
function M.empty(self)
|
||||||
set_bar_to(self, 0, true)
|
set_bar_to(self, 0, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Set fill a progress bar to value
|
--- Instant fill progress bar to value
|
||||||
-- @param to - value between 0..1
|
-- @function progress:set_to
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam number to Progress bar value, from 0 to 1
|
||||||
function M.set_to(self, to)
|
function M.set_to(self, to)
|
||||||
set_bar_to(self, to)
|
set_bar_to(self, to)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Return current progress bar value
|
||||||
|
-- @function progress:get
|
||||||
|
-- @tparam table self Component instance
|
||||||
function M.get(self)
|
function M.get(self)
|
||||||
return self.last_value
|
return self.last_value
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function M.set_steps(self, steps, step_callback)
|
--- Set points on progress bar to fire the callback
|
||||||
|
-- @function progress:set_steps
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam table steps Array of progress bar values
|
||||||
|
-- @tparam function callback Callback on intersect step value
|
||||||
|
function M.set_steps(self, steps, callback)
|
||||||
self.steps = steps
|
self.steps = steps
|
||||||
self.step_callback = step_callback
|
self.step_callback = callback
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Start animation of a progress bar
|
--- Start animation of a progress bar
|
||||||
-- @param to - value between 0..1
|
-- @function progress:to
|
||||||
-- @param callback - callback when progress ended if need
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam number to value between 0..1
|
||||||
|
-- @tparam[opt] function callback Callback on animation ends
|
||||||
function M.to(self, to, callback)
|
function M.to(self, to, callback)
|
||||||
to = helper.clamp(to, 0, 1)
|
to = helper.clamp(to, 0, 1)
|
||||||
-- cause of float error
|
-- cause of float error
|
||||||
|
@ -7,21 +7,19 @@ local settings = require("druid.settings").scroll
|
|||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
local SIDE_X = "x"
|
|
||||||
local SIDE_Y = "y"
|
|
||||||
|
|
||||||
M.interest = {
|
M.interest = {
|
||||||
const.ON_UPDATE,
|
const.ON_UPDATE,
|
||||||
const.ON_SWIPE,
|
const.ON_SWIPE,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Global on all scrolls
|
-- Global on all scrolls
|
||||||
|
-- TODO: remove it
|
||||||
M.current_scroll = nil
|
M.current_scroll = nil
|
||||||
|
|
||||||
|
|
||||||
function M.init(self, scroll_parent, input_zone, border)
|
function M.init(self, scroll_parent, input_zone, border)
|
||||||
self.node = helper.get_node(scroll_parent)
|
self.node = helper.node(scroll_parent)
|
||||||
self.input_zone = helper.get_node(input_zone)
|
self.input_zone = helper.node(input_zone)
|
||||||
self.zone_size = gui.get_size(self.input_zone)
|
self.zone_size = gui.get_size(self.input_zone)
|
||||||
self.soft_size = settings.SOFT_ZONE_SIZE
|
self.soft_size = settings.SOFT_ZONE_SIZE
|
||||||
|
|
||||||
@ -280,14 +278,11 @@ function M.on_input(self, action_id, action)
|
|||||||
if not M.current_scroll and dist >= settings.DEADZONE then
|
if not M.current_scroll and dist >= settings.DEADZONE then
|
||||||
local dx = math.abs(inp.start_x - action.x)
|
local dx = math.abs(inp.start_x - action.x)
|
||||||
local dy = math.abs(inp.start_y - action.y)
|
local dy = math.abs(inp.start_y - action.y)
|
||||||
if dx > dy then
|
inp.side = (dx > dy) and const.SIDE.X or const.SIDE.Y
|
||||||
inp.side = SIDE_X
|
|
||||||
else
|
|
||||||
inp.side = SIDE_Y
|
|
||||||
end
|
|
||||||
-- Check scroll side if we can scroll
|
-- Check scroll side if we can scroll
|
||||||
if (self.can_x and inp.side == SIDE_X or
|
if (self.can_x and inp.side == const.SIDE.X or
|
||||||
self.can_y and inp.side == SIDE_Y) then
|
self.can_y and inp.side == const.SIDE.Y) then
|
||||||
M.current_scroll = self
|
M.current_scroll = self
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -308,6 +303,7 @@ function M.on_input(self, action_id, action)
|
|||||||
M.current_scroll = nil
|
M.current_scroll = nil
|
||||||
result = true
|
result = true
|
||||||
end
|
end
|
||||||
|
|
||||||
check_threshold(self)
|
check_threshold(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -316,6 +312,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Start scroll to target point
|
--- Start scroll to target point
|
||||||
|
-- @function scroll:scroll_to
|
||||||
-- @tparam point vector3 target point
|
-- @tparam point vector3 target point
|
||||||
-- @tparam[opt] bool is_instant instant scroll flag
|
-- @tparam[opt] bool is_instant instant scroll flag
|
||||||
-- @usage scroll:scroll_to(vmath.vector3(0, 50, 0))
|
-- @usage scroll:scroll_to(vmath.vector3(0, 50, 0))
|
||||||
@ -343,7 +340,11 @@ function M.scroll_to(self, point, is_instant)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Scroll to item in scroll by points index
|
--- Scroll to item in scroll by point index
|
||||||
|
-- @function scroll:init
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam number index Point index
|
||||||
|
-- @tparam[opt] boolean skip_cb If true, skip the point callback
|
||||||
function M.scroll_to_index(self, index, skip_cb)
|
function M.scroll_to_index(self, index, skip_cb)
|
||||||
index = helper.clamp(index, 1, #self.points)
|
index = helper.clamp(index, 1, #self.points)
|
||||||
|
|
||||||
@ -359,8 +360,11 @@ function M.scroll_to_index(self, index, skip_cb)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Set points of interest
|
--- Set points of interest.
|
||||||
-- Scroll will always centered on closer points
|
-- Scroll will always centered on closer points
|
||||||
|
-- @function scroll:set_points
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam table points Array of vector3 points
|
||||||
function M.set_points(self, points)
|
function M.set_points(self, points)
|
||||||
self.points = points
|
self.points = points
|
||||||
-- cause of parent move in other side by y
|
-- cause of parent move in other side by y
|
||||||
@ -375,21 +379,30 @@ function M.set_points(self, points)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Enable or disable scroll inert
|
--- Enable or disable scroll inert.
|
||||||
-- If disabled, scroll through points (if exist)
|
-- If disabled, scroll through points (if exist)
|
||||||
-- If no points, just simple drag without inertion
|
-- If no points, just simple drag without inertion
|
||||||
|
-- @function scroll:set_inert
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam boolean state Inert scroll state
|
||||||
function M.set_inert(self, state)
|
function M.set_inert(self, state)
|
||||||
self.is_inert = state
|
self.is_inert = state
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Set the callback on scrolling to point (if exist)
|
--- Set the callback on scrolling to point (if exist)
|
||||||
|
-- @function scroll:on_point_move
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam function callback Callback on scroll to point of interest
|
||||||
function M.on_point_move(self, callback)
|
function M.on_point_move(self, callback)
|
||||||
self.on_point_callback = callback
|
self.on_point_callback = callback
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Set the scroll possibly area
|
--- Set the scroll possibly area
|
||||||
|
-- @function scroll:set_border
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam vmath.vector3 border Size of scrolling area
|
||||||
function M.set_border(self, border)
|
function M.set_border(self, border)
|
||||||
self.border = border
|
self.border = border
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function M.init(self, node, end_pos, callback)
|
function M.init(self, node, end_pos, callback)
|
||||||
self.node = helper.get_node(node)
|
self.node = helper.node(node)
|
||||||
|
|
||||||
self.start_pos = gui.get_position(self.node)
|
self.start_pos = gui.get_position(self.node)
|
||||||
self.pos = gui.get_position(self.node)
|
self.pos = gui.get_position(self.node)
|
||||||
|
@ -14,7 +14,7 @@ M.interest = {
|
|||||||
|
|
||||||
function M.init(self, node, value, is_locale, max_width)
|
function M.init(self, node, value, is_locale, max_width)
|
||||||
self.max_width = max_width
|
self.max_width = max_width
|
||||||
self.node = helper.get_node(node)
|
self.node = helper.node(node)
|
||||||
self.start_scale = gui.get_scale(self.node)
|
self.start_scale = gui.get_scale(self.node)
|
||||||
self.scale = self.start_scale
|
self.scale = self.start_scale
|
||||||
self.last_color = gui.get_color(self.node)
|
self.last_color = gui.get_color(self.node)
|
||||||
@ -29,6 +29,10 @@ function M.init(self, node, value, is_locale, max_width)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Translate the text by locale_id
|
||||||
|
-- @function text:translate
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam string locale_id Locale id
|
||||||
function M.translate(self, locale_id)
|
function M.translate(self, locale_id)
|
||||||
self.last_locale = locale_id or self.last_locale
|
self.last_locale = locale_id or self.last_locale
|
||||||
self:set_to(settings.get_text(self.last_locale))
|
self:set_to(settings.get_text(self.last_locale))
|
||||||
@ -56,7 +60,9 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Set text to text field
|
--- Set text to text field
|
||||||
-- @param set_to - set value to text field
|
-- @function text:set_to
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam string set_to Text for node
|
||||||
function M.set_to(self, set_to)
|
function M.set_to(self, set_to)
|
||||||
self.last_value = set_to
|
self.last_value = set_to
|
||||||
gui.set_text(self.node, set_to)
|
gui.set_text(self.node, set_to)
|
||||||
@ -68,7 +74,9 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Set color
|
--- Set color
|
||||||
-- @param color
|
-- @function text:set_color
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam vmath.vector4 color Color for node
|
||||||
function M.set_color(self, color)
|
function M.set_color(self, color)
|
||||||
self.last_color = color
|
self.last_color = color
|
||||||
gui.set_color(self.node, color)
|
gui.set_color(self.node, color)
|
||||||
@ -76,7 +84,9 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Set alpha
|
--- Set alpha
|
||||||
-- @param alpha, number [0-1]
|
-- @function text:set_alpha
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam number alpha Alpha for node
|
||||||
function M.set_alpha(self, alpha)
|
function M.set_alpha(self, alpha)
|
||||||
self.last_color.w = alpha
|
self.last_color.w = alpha
|
||||||
gui.set_color(self.node, self.last_color)
|
gui.set_color(self.node, self.last_color)
|
||||||
@ -84,7 +94,9 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Set scale
|
--- Set scale
|
||||||
-- @param scale
|
-- @function text:set_scale
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam vmath.vector3 scale Scale for node
|
||||||
function M.set_scale(self, scale)
|
function M.set_scale(self, scale)
|
||||||
self.last_scale = scale
|
self.last_scale = scale
|
||||||
gui.set_scale(self.node, scale)
|
gui.set_scale(self.node, scale)
|
||||||
|
@ -14,7 +14,7 @@ local empty = function() end
|
|||||||
|
|
||||||
|
|
||||||
function M.init(self, node, seconds_from, seconds_to, callback)
|
function M.init(self, node, seconds_from, seconds_to, callback)
|
||||||
self.node = helper.get_node(node)
|
self.node = helper.node(node)
|
||||||
seconds_from = math.max(seconds_from, 0)
|
seconds_from = math.max(seconds_from, 0)
|
||||||
seconds_to = math.max(seconds_to or 0, 0)
|
seconds_to = math.max(seconds_to or 0, 0)
|
||||||
callback = callback or empty
|
callback = callback or empty
|
||||||
@ -32,7 +32,9 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Set text to text field
|
--- Set text to text field
|
||||||
-- @param set_to - set value in seconds
|
-- @function timer:set_to
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam number set_to Value in seconds
|
||||||
function M.set_to(self, set_to)
|
function M.set_to(self, set_to)
|
||||||
self.last_value = set_to
|
self.last_value = set_to
|
||||||
gui.set_text(self.node, formats.second_string_min(set_to))
|
gui.set_text(self.node, formats.second_string_min(set_to))
|
||||||
@ -40,15 +42,19 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Called when update
|
--- Called when update
|
||||||
-- @param is_on - boolean is timer on
|
-- @function timer:set_state
|
||||||
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam boolean is_on Timer enable state
|
||||||
function M.set_state(self, is_on)
|
function M.set_state(self, is_on)
|
||||||
self.is_on = is_on
|
self.is_on = is_on
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Set time interval
|
--- Set time interval
|
||||||
-- @param from - "from" time in seconds
|
-- @function timer:set_interval
|
||||||
-- @param to - "to" time in seconds
|
-- @tparam table self Component instance
|
||||||
|
-- @tparam number from Start time in seconds
|
||||||
|
-- @tparam number to Target time in seconds
|
||||||
function M.set_interval(self, from, to)
|
function M.set_interval(self, from, to)
|
||||||
self.from = from
|
self.from = from
|
||||||
self.value = from
|
self.value = from
|
||||||
@ -59,8 +65,6 @@ function M.set_interval(self, from, to)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Called when update
|
|
||||||
-- @param dt - delta time
|
|
||||||
function M.update(self, dt)
|
function M.update(self, dt)
|
||||||
if self.is_on then
|
if self.is_on then
|
||||||
self.temp = self.temp + dt
|
self.temp = self.temp + dt
|
||||||
|
@ -12,6 +12,8 @@ M.ACTION_BACK = hash("back")
|
|||||||
|
|
||||||
M.RELEASED = "released"
|
M.RELEASED = "released"
|
||||||
M.PRESSED = "pressed"
|
M.PRESSED = "pressed"
|
||||||
|
M.STRING = "string"
|
||||||
|
M.ZERO = "0"
|
||||||
|
|
||||||
--- Interests
|
--- Interests
|
||||||
M.ON_MESSAGE = hash("on_message")
|
M.ON_MESSAGE = hash("on_message")
|
||||||
@ -21,7 +23,24 @@ M.ON_UPDATE = hash("on_update")
|
|||||||
M.ON_SWIPE = hash("on_swipe")
|
M.ON_SWIPE = hash("on_swipe")
|
||||||
M.ON_INPUT = hash("on_input")
|
M.ON_INPUT = hash("on_input")
|
||||||
|
|
||||||
M.ui_input = {
|
M.PIVOTS = {
|
||||||
|
[gui.PIVOT_CENTER] = vmath.vector3(0),
|
||||||
|
[gui.PIVOT_N] = vmath.vector3(0, 0.5, 0),
|
||||||
|
[gui.PIVOT_NE] = vmath.vector3(0.5, 0.5, 0),
|
||||||
|
[gui.PIVOT_E] = vmath.vector3(0.5, 0, 0),
|
||||||
|
[gui.PIVOT_SE] = vmath.vector3(0.5, -0.5, 0),
|
||||||
|
[gui.PIVOT_S] = vmath.vector3(0, -0.5, 0),
|
||||||
|
[gui.PIVOT_SW] = vmath.vector3(-0.5, -0.5, 0),
|
||||||
|
[gui.PIVOT_W] = vmath.vector3(-0.5, 0, 0),
|
||||||
|
[gui.PIVOT_NW] = vmath.vector3(-0.5, -0.5, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
M.SIDE = {
|
||||||
|
X = "x",
|
||||||
|
Y = "y"
|
||||||
|
}
|
||||||
|
|
||||||
|
M.UI_INPUT = {
|
||||||
[M.ON_SWIPE] = true,
|
[M.ON_SWIPE] = true,
|
||||||
[M.ON_INPUT] = true
|
[M.ON_INPUT] = true
|
||||||
}
|
}
|
||||||
@ -30,7 +49,7 @@ M.ui_input = {
|
|||||||
M.ON_CHANGE_LANGUAGE = hash("on_change_language")
|
M.ON_CHANGE_LANGUAGE = hash("on_change_language")
|
||||||
M.ON_LAYOUT_CHANGED = hash("on_layout_changed")
|
M.ON_LAYOUT_CHANGED = hash("on_layout_changed")
|
||||||
|
|
||||||
M.specific_ui_messages = {
|
M.SPECIFIC_UI_MESSAGES = {
|
||||||
[M.ON_CHANGE_LANGUAGE] = "on_change_language",
|
[M.ON_CHANGE_LANGUAGE] = "on_change_language",
|
||||||
[M.ON_LAYOUT_CHANGED] = "on_layout_changed"
|
[M.ON_LAYOUT_CHANGED] = "on_layout_changed"
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ local function create(self, module)
|
|||||||
end
|
end
|
||||||
self[v][#self[v] + 1] = instance
|
self[v][#self[v] + 1] = instance
|
||||||
|
|
||||||
if const.ui_input[v] then
|
if const.UI_INPUT[v] then
|
||||||
input_init(self)
|
input_init(self)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -135,7 +135,7 @@ end
|
|||||||
|
|
||||||
--- Called on_message
|
--- Called on_message
|
||||||
function _fct_metatable.on_message(self, message_id, message, sender)
|
function _fct_metatable.on_message(self, message_id, message, sender)
|
||||||
local specific_ui_message = const.specific_ui_messages[message_id]
|
local specific_ui_message = const.SPECIFIC_UI_MESSAGES[message_id]
|
||||||
if specific_ui_message then
|
if specific_ui_message then
|
||||||
local array = self[message_id]
|
local array = self[message_id]
|
||||||
if array then
|
if array then
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- Druid helper module
|
--- Druid helper module
|
||||||
-- @module helper
|
-- @module helper
|
||||||
|
|
||||||
|
local const = require("druid.const")
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
--- Text node or icon node can be nil
|
--- Text node or icon node can be nil
|
||||||
@ -79,9 +81,8 @@ function M.after(count, callback)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local STRING = "string"
|
function M.node(node_or_name)
|
||||||
function M.get_node(node_or_name)
|
if type(node_or_name) == const.STRING then
|
||||||
if type(node_or_name) == STRING then
|
|
||||||
return gui.get_node(node_or_name)
|
return gui.get_node(node_or_name)
|
||||||
end
|
end
|
||||||
return node_or_name
|
return node_or_name
|
||||||
@ -142,19 +143,8 @@ function M.is_enabled(node)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local pivots = {
|
|
||||||
[gui.PIVOT_CENTER] = vmath.vector3(0),
|
|
||||||
[gui.PIVOT_N] = vmath.vector3(0, 0.5, 0),
|
|
||||||
[gui.PIVOT_NE] = vmath.vector3(0.5, 0.5, 0),
|
|
||||||
[gui.PIVOT_E] = vmath.vector3(0.5, 0, 0),
|
|
||||||
[gui.PIVOT_SE] = vmath.vector3(0.5, -0.5, 0),
|
|
||||||
[gui.PIVOT_S] = vmath.vector3(0, -0.5, 0),
|
|
||||||
[gui.PIVOT_SW] = vmath.vector3(-0.5, -0.5, 0),
|
|
||||||
[gui.PIVOT_W] = vmath.vector3(-0.5, 0, 0),
|
|
||||||
[gui.PIVOT_NW] = vmath.vector3(-0.5, -0.5, 0),
|
|
||||||
}
|
|
||||||
function M.get_pivot_offset(pivot)
|
function M.get_pivot_offset(pivot)
|
||||||
return pivots[pivot]
|
return const.PIVOTS[pivot]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,25 +1,27 @@
|
|||||||
--- Druid module with utils on string formats
|
--- Druid module with utils on string formats
|
||||||
-- @module helper.formats
|
-- @module helper.formats
|
||||||
|
|
||||||
|
local const = require("druid.const")
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
local ZERO = "0"
|
|
||||||
|
|
||||||
--- Return number with zero number prefix
|
--- Return number with zero number prefix
|
||||||
-- @param num number for conversion
|
-- @function formats.add_prefix_zeros
|
||||||
-- @param count count of numerals
|
-- @tparam number num Number for conversion
|
||||||
|
-- @tparam number count Count of numerals
|
||||||
-- @return string with need count of zero (1,3) -> 001
|
-- @return string with need count of zero (1,3) -> 001
|
||||||
function M.add_prefix_zeros(num, count)
|
function M.add_prefix_zeros(num, count)
|
||||||
local result = tostring(num)
|
local result = tostring(num)
|
||||||
for i = string.len(result), count - 1 do
|
for i = string.len(result), count - 1 do
|
||||||
result = ZERO..result
|
result = const.ZERO..result
|
||||||
end
|
end
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Convert seconds to string minutes:seconds
|
--- Convert seconds to string minutes:seconds
|
||||||
-- @param num number of seconds
|
-- @function formats.second_string_min
|
||||||
|
-- @tparam number sec Seconds
|
||||||
-- @return string minutes:seconds
|
-- @return string minutes:seconds
|
||||||
function M.second_string_min(sec)
|
function M.second_string_min(sec)
|
||||||
local mins = math.floor(sec / 60)
|
local mins = math.floor(sec / 60)
|
||||||
@ -29,8 +31,9 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Interpolate string with named Parameters in Table
|
--- Interpolate string with named Parameters in Table
|
||||||
-- @param s string for interpolate
|
-- @function formats.second_string_min
|
||||||
-- @param tab table with parameters
|
-- @tparam string s Target string
|
||||||
|
-- @tparam table tab Table with parameters
|
||||||
-- @return string with replaced parameters
|
-- @return string with replaced parameters
|
||||||
function M.interpolate_string(s, tab)
|
function M.interpolate_string(s, tab)
|
||||||
return (s:gsub('($%b{})', function(w) return tab[w:sub(3, -2)] or w end))
|
return (s:gsub('($%b{})', function(w) return tab[w:sub(3, -2)] or w end))
|
||||||
|
@ -1,51 +1,67 @@
|
|||||||
|
--- Component for rich progress component
|
||||||
|
-- @module rich.progress_rich
|
||||||
|
|
||||||
local settings = require("druid.settings")
|
local settings = require("druid.settings")
|
||||||
local pr_settings = settings.progress_rich
|
local pr_settings = settings.progress_rich
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
function M.init(instance, name, red, green, key)
|
|
||||||
instance.red = instance.parent:new_progress(red, key)
|
function M.init(self, name, red, green, key)
|
||||||
instance.green = instance.parent:new_progress(green, key)
|
self.red = self.parent:new_progress(red, key)
|
||||||
instance.fill = instance.parent:new_progress(name, key)
|
self.green = self.parent:new_progress(green, key)
|
||||||
|
self.fill = self.parent:new_progress(name, key)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function M.set_to(instance, value)
|
--- Instant fill progress bar to value
|
||||||
instance.red:set_to(value)
|
-- @function progress_rich:set_to
|
||||||
instance.green:set_to(value)
|
-- @tparam table self Component instance
|
||||||
instance.fill:set_to(value)
|
-- @tparam number value Progress bar value, from 0 to 1
|
||||||
|
function M.set_to(self, value)
|
||||||
|
self.red:set_to(value)
|
||||||
|
self.green:set_to(value)
|
||||||
|
self.fill:set_to(value)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function M.empty(instance)
|
--- Empty a progress bar
|
||||||
instance.red:empty()
|
-- @function progress_rich:empty
|
||||||
instance.green:empty()
|
-- @tparam table self Component instance
|
||||||
instance.fill:empty()
|
function M.empty(self)
|
||||||
|
self.red:empty()
|
||||||
|
self.green:empty()
|
||||||
|
self.fill:empty()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function M.to(instance, to, callback)
|
--- Start animation of a progress bar
|
||||||
if instance.timer then
|
-- @function progress_rich:to
|
||||||
timer.cancel(instance.timer)
|
-- @tparam table self Component instance
|
||||||
instance.timer = nil
|
-- @tparam number to value between 0..1
|
||||||
|
-- @tparam[opt] function callback Callback on animation ends
|
||||||
|
function M.to(self, to, callback)
|
||||||
|
if self.timer then
|
||||||
|
timer.cancel(self.timer)
|
||||||
|
self.timer = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
if instance.fill.last_value < to then
|
if self.fill.last_value < to then
|
||||||
instance.red:to(instance.fill.last_value)
|
self.red:to(self.fill.last_value)
|
||||||
instance.green:to(to, function()
|
self.green:to(to, function()
|
||||||
instance.timer = timer.delay(pr_settings.DELAY, false, function()
|
self.timer = timer.delay(pr_settings.DELAY, false, function()
|
||||||
instance.red:to(to)
|
self.red:to(to)
|
||||||
instance.fill:to(to, callback)
|
self.fill:to(to, callback)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
if instance.fill.last_value > to then
|
if self.fill.last_value > to then
|
||||||
instance.green:to(instance.red.last_value)
|
self.green:to(self.red.last_value)
|
||||||
instance.fill:to(to, function()
|
self.fill:to(to, function()
|
||||||
instance.timer = timer.delay(pr_settings.DELAY, false, function()
|
self.timer = timer.delay(pr_settings.DELAY, false, function()
|
||||||
instance.green:to(to)
|
self.green:to(to)
|
||||||
instance.red:to(to, callback)
|
self.red:to(to, callback)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user