Update docs, updated ldoc generated files

This commit is contained in:
Insality 2020-03-21 21:43:06 +03:00
parent ca78b10794
commit b7e58950aa
26 changed files with 2354 additions and 316 deletions

View File

@ -1,7 +1,12 @@
project='Druid'
title='Defold Druid UI Library'
description='Documentation for Druid Library'
file={"./druid"}
file={"./druid",
exclude = {
"./druid/styles/",
"./druid/system/middleclass.lua"
}
}
package='druid'
sort=false
dir='./docs'

View File

@ -37,6 +37,7 @@
<li><a href="modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="modules/druid.grid.html">druid.grid</a></li>
<li><a href="modules/druid.hover.html">druid.hover</a></li>
<li><a href="modules/druid.input.html">druid.input</a></li>
<li><a href="modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="modules/druid.progress.html">druid.progress</a></li>
@ -67,7 +68,7 @@
</tr>
<tr>
<td class="name" nowrap><a href="modules/druid.blocker.html">druid.blocker</a></td>
<td class="summary">Component to block input on specify zone (node)</td>
<td class="summary">Component to block input on specify zone by node</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/druid.button.html">druid.button</a></td>
@ -79,16 +80,20 @@
</tr>
<tr>
<td class="name" nowrap><a href="modules/druid.checkbox_group.html">druid.checkbox_group</a></td>
<td class="summary">Checkboux group module</td>
<td class="summary">Checkbox group module</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/druid.grid.html">druid.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/druid.input.html">druid.input</a></td>
<td class="name" nowrap><a href="modules/druid.hover.html">druid.hover</a></td>
<td class="summary">Component to handle hover node interaction</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/druid.input.html">druid.input</a></td>
<td class="summary">Druid input text component.</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/druid.lang_text.html">druid.lang_text</a></td>
<td class="summary">Component to handle all GUI texts
@ -96,7 +101,7 @@
</tr>
<tr>
<td class="name" nowrap><a href="modules/druid.progress.html">druid.progress</a></td>
<td class="summary">Basic progress bar component</td>
<td class="summary">Basic progress bar component.</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/druid.radio_group.html">druid.radio_group</a></td>
@ -104,7 +109,7 @@
</tr>
<tr>
<td class="name" nowrap><a href="modules/druid.scroll.html">druid.scroll</a></td>
<td class="summary">Component to handle scroll content</td>
<td class="summary">Component to handle scroll content.</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/druid.slider.html">druid.slider</a></td>
@ -112,12 +117,11 @@
</tr>
<tr>
<td class="name" nowrap><a href="modules/druid.text.html">druid.text</a></td>
<td class="summary">Component to handle all GUI texts
Good working with localization system</td>
<td class="summary">Component to handle all GUI texts.</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/druid.timer.html">druid.timer</a></td>
<td class="summary">Component to handle GUI timers</td>
<td class="summary">Component to handle GUI timers.</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/component.html">component</a></td>
@ -145,7 +149,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-03-21 20:02:23 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -44,6 +44,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -396,7 +397,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -33,6 +33,7 @@
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li>
</ul>
@ -44,6 +45,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -73,7 +75,7 @@
<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="name" nowrap><a href="#init">init(callback[, Callback])</a></td>
<td class="summary">Component init function</td>
</tr>
<tr>
@ -81,6 +83,17 @@
<td class="summary">Input handler for component</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Events">Events</a></td>
<td class="summary">Component events</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Fields">Fields</a></td>
<td class="summary">Component fields</td>
</tr>
</table>
<br/>
<br/>
@ -91,7 +104,7 @@
<dl class="function">
<dt>
<a name = "init"></a>
<strong>init(self, callback[, Callback])</strong>
<strong>init(callback[, Callback])</strong>
</dt>
<dd>
Component init function
@ -99,10 +112,6 @@
<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
@ -143,6 +152,52 @@
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "Events"></a>
<strong>Events</strong>
</dt>
<dd>
Component events
<h3>Fields:</h3>
<ul>
<li><span class="parameter">on_back</span>
<span class="types"><span class="type">druid_event</span></span>
On back handler callback
</li>
</ul>
</dd>
<dt>
<a name = "Fields"></a>
<strong>Fields</strong>
</dt>
<dd>
Component fields
<h3>Fields:</h3>
<ul>
<li><span class="parameter">params</span>
<span class="types"><span class="type">any</span></span>
Params to click callbacks
</li>
</ul>
</dd>
</dl>
@ -151,7 +206,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -30,6 +30,11 @@
<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>
@ -40,6 +45,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -60,24 +66,166 @@
<div id="content">
<h1>Module <code>druid.blocker</code></h1>
<p>Component to block input on specify zone (node)</p>
<p>Component to block input on specify zone by node</p>
<p>
</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#init">init(node)</a></td>
<td class="summary">Component init function</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_enabled">set_enabled(state)</a></td>
<td class="summary">Set enabled blocker component state</td>
</tr>
<tr>
<td class="name" nowrap><a href="#is_enabled">is_enabled()</a></td>
<td class="summary">Return blocked enabled state</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Events">Events</a></td>
<td class="summary">Component events</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Fields">Fields</a></td>
<td class="summary">Component fields</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(node)</strong>
</dt>
<dd>
Component init function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Gui node
</li>
</ul>
</dd>
<dt>
<a name = "set_enabled"></a>
<strong>set_enabled(state)</strong>
</dt>
<dd>
Set enabled blocker component state
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">state</span>
<span class="types"><span class="type">bool</span></span>
Enabled state
</li>
</ul>
</dd>
<dt>
<a name = "is_enabled"></a>
<strong>is_enabled()</strong>
</dt>
<dd>
Return blocked enabled state
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
True, if blocker is enabled
</ol>
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "Events"></a>
<strong>Events</strong>
</dt>
<dd>
Component events
<h3>Fields:</h3>
<ul>
<li><span class="parameter">on_click</span>
<span class="types"><span class="type">druid_event</span></span>
On release button callback
</li>
<li><span class="parameter">on_enable_change</span>
<span class="types"><span class="type">druid_event</span></span>
On enable/disable callback
</li>
</ul>
</dd>
<dt>
<a name = "Fields"></a>
<strong>Fields</strong>
</dt>
<dd>
Component fields
<h3>Fields:</h3>
<ul>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Trigger 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 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -45,6 +45,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -74,19 +75,27 @@
<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="name" nowrap><a href="#init">init(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>
<td class="name" nowrap><a href="#set_enabled">set_enabled(state)</a></td>
<td class="summary">Set enabled button component state</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(self, zone)</a></td>
<td class="name" nowrap><a href="#is_enabled">is_enabled()</a></td>
<td class="summary">Return button enabled state</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(zone)</a></td>
<td class="summary">Strict button click area.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_key_trigger">get_key_trigger(self)</a></td>
<td class="name" nowrap><a href="#set_key_trigger">set_key_trigger(key)</a></td>
<td class="summary">Set key-code to trigger this button</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_key_trigger">get_key_trigger()</a></td>
<td class="summary">Get key-code to trigger this button</td>
</tr>
</table>
@ -115,7 +124,7 @@
<dl class="function">
<dt>
<a name = "init"></a>
<strong>init(self, node, callback[, params[, anim_node[, event]]])</strong>
<strong>init(node, callback[, params[, anim_node[, event]]])</strong>
</dt>
<dd>
Component init function
@ -123,10 +132,6 @@
<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
@ -158,18 +163,18 @@
</dd>
<dt>
<a name = "disable_animation"></a>
<strong>disable_animation(self)</strong>
<a name = "set_enabled"></a>
<strong>set_enabled(state)</strong>
</dt>
<dd>
Disable all button animations
Set enabled button component state
<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><span class="parameter">state</span>
<span class="types"><span class="type">bool</span></span>
Enabled state
</li>
</ul>
@ -177,10 +182,30 @@
</dd>
<dt>
<a name = "is_enabled"></a>
<strong>is_enabled()</strong>
</dt>
<dd>
Return button enabled state
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
True, if button is enabled
</ol>
</dd>
<dt>
<a name = "set_click_zone"></a>
<strong>set_click_zone(self, zone)</strong>
<strong>set_click_zone(zone)</strong>
</dt>
<dd>
Strict button click area. Useful for
@ -189,10 +214,6 @@
<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
@ -203,24 +224,43 @@
</dd>
<dt>
<a name = "set_key_trigger"></a>
<strong>set_key_trigger(key)</strong>
</dt>
<dd>
Set key-code to trigger this button
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">key</span>
<span class="types"><span class="type">hash</span></span>
The action_id of the key
</li>
</ul>
</dd>
<dt>
<a name = "get_key_trigger"></a>
<strong>get_key_trigger(self)</strong>
<strong>get_key_trigger()</strong>
</dt>
<dd>
Get key-code to trigger this button
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<h3>Returns:</h3>
<ol>
</li>
</ul>
<span class="types"><span class="type">hash</span></span>
The action_id of the key
</ol>
@ -294,10 +334,6 @@
<span class="types"><span class="type">any</span></span>
Params to click callbacks
</li>
<li><span class="parameter">hover_anim</span>
<span class="types"><span class="type">boolean</span></span>
Is hover anim enabled
</li>
<li><span class="parameter">hover</span>
<span class="types"><span class="type">druid.hover</span></span>
Druid hover logic component
@ -360,7 +396,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -30,6 +30,11 @@
<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>
@ -40,6 +45,7 @@
<li><strong>druid.checkbox</strong></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -66,18 +72,203 @@
</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#init">init(node, callback[, click=node])</a></td>
<td class="summary">Component init function</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_state">set_state(state, is_silent)</a></td>
<td class="summary">Set checkbox state</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_state">get_state()</a></td>
<td class="summary">Return checkbox state</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Events">Events</a></td>
<td class="summary">Component events</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Fields">Fields</a></td>
<td class="summary">Component fields</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Style">Style</a></td>
<td class="summary">Component style params</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(node, callback[, click=node])</strong>
</dt>
<dd>
Component init function
<h3>Parameters:</h3>
<ul>
<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>
Checkbox callback
</li>
<li><span class="parameter">click</span>
<span class="types"><span class="type">node</span></span>
node Trigger node, by default equals to node
(<em>default</em> node)
</li>
</ul>
</dd>
<dt>
<a name = "set_state"></a>
<strong>set_state(state, is_silent)</strong>
</dt>
<dd>
Set checkbox state
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">state</span>
<span class="types"><span class="type">bool</span></span>
Checkbox state
</li>
<li><span class="parameter">is_silent</span>
<span class="types"><span class="type">bool</span></span>
Don't trigger on<em>change</em>state if true
</li>
</ul>
</dd>
<dt>
<a name = "get_state"></a>
<strong>get_state()</strong>
</dt>
<dd>
Return checkbox state
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
Checkbox state
</ol>
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "Events"></a>
<strong>Events</strong>
</dt>
<dd>
Component events
<h3>Fields:</h3>
<ul>
<li><span class="parameter">on_change_state</span>
<span class="types"><span class="type">druid_event</span></span>
On change state callback
</li>
</ul>
</dd>
<dt>
<a name = "Fields"></a>
<strong>Fields</strong>
</dt>
<dd>
Component fields
<h3>Fields:</h3>
<ul>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Visual node
</li>
<li><span class="parameter">click_node</span>
<span class="types"><span class="type">node</span></span>
Button trigger node
(<em>default</em> node)
</li>
<li><span class="parameter">button</span>
<span class="types"><span class="type">druid.button</span></span>
Button component from click_node
</li>
</ul>
</dd>
<dt>
<a name = "Style"></a>
<strong>Style</strong>
</dt>
<dd>
Component style params
<h3>Fields:</h3>
<ul>
<li><span class="parameter">on_change_state</span>
<span class="types"><span class="type">function</span></span>
(self, node, state)
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -30,6 +30,11 @@
<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>
@ -40,6 +45,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><strong>druid.checkbox_group</strong></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -60,24 +66,171 @@
<div id="content">
<h1>Module <code>druid.checkbox_group</code></h1>
<p>Checkboux group module</p>
<p>Checkbox group module</p>
<p>
</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#init">init(node, callback[, click=node])</a></td>
<td class="summary">Component init function</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_state">set_state(state)</a></td>
<td class="summary">Set checkbox group state</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_state">get_state()</a></td>
<td class="summary">Return checkbox group state</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Events">Events</a></td>
<td class="summary">Component events</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Fields">Fields</a></td>
<td class="summary">Component fields</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(node, callback[, click=node])</strong>
</dt>
<dd>
Component init function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node[]</span></span>
Array of gui node
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
Checkbox callback
</li>
<li><span class="parameter">click</span>
<span class="types"><span class="type">node[]</span></span>
node Array of trigger nodes, by default equals to nodes
(<em>default</em> node)
</li>
</ul>
</dd>
<dt>
<a name = "set_state"></a>
<strong>set_state(state)</strong>
</dt>
<dd>
Set checkbox group state
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">state</span>
<span class="types"><span class="type">bool[]</span></span>
Array of checkbox state
</li>
</ul>
</dd>
<dt>
<a name = "get_state"></a>
<strong>get_state()</strong>
</dt>
<dd>
Return checkbox group state
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool[]</span></span>
Array if checkboxes state
</ol>
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "Events"></a>
<strong>Events</strong>
</dt>
<dd>
Component events
<h3>Fields:</h3>
<ul>
<li><span class="parameter">on_checkbox_click</span>
<span class="types"><span class="type">druid_event</span></span>
On any checkbox click
</li>
</ul>
</dd>
<dt>
<a name = "Fields"></a>
<strong>Fields</strong>
</dt>
<dd>
Component fields
<h3>Fields:</h3>
<ul>
<li><span class="parameter">checkboxes</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
Array of checkbox components
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -30,6 +30,11 @@
<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>
@ -40,6 +45,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><strong>druid.grid</strong></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -64,18 +70,298 @@
<p> Grid can anchor your elements, get content size and other</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#init">init(parent, element[, in_row=1])</a></td>
<td class="summary">Component init function</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_offset">set_offset(offset)</a></td>
<td class="summary">Set grid items offset, the distance between items</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_anchor">set_anchor(acnhor)</a></td>
<td class="summary">Set grid anchor</td>
</tr>
<tr>
<td class="name" nowrap><a href="#add">add(item[, index])</a></td>
<td class="summary">Add new item to the grid</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_size">get_size()</a></td>
<td class="summary">Return grid content size</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_all_pos">get_all_pos()</a></td>
<td class="summary">Return array of all node positions</td>
</tr>
<tr>
<td class="name" nowrap><a href="#clear">clear()</a></td>
<td class="summary">Clear all items from the grid</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Events">Events</a></td>
<td class="summary">Component events</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Fields">Fields</a></td>
<td class="summary">Component fields</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(parent, element[, in_row=1])</strong>
</dt>
<dd>
Component init function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">parent</span>
<span class="types"><span class="type">node</span></span>
The gui node parent, where items will be placed
</li>
<li><span class="parameter">element</span>
<span class="types"><span class="type">node</span></span>
Element prefab. Need to get it size
</li>
<li><span class="parameter">in_row</span>
<span class="types"><span class="type">number</span></span>
How many nodes in row can be placed
(<em>default</em> 1)
</li>
</ul>
</dd>
<dt>
<a name = "set_offset"></a>
<strong>set_offset(offset)</strong>
</dt>
<dd>
Set grid items offset, the distance between items
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">offset</span>
<span class="types"><span class="type">vector3</span></span>
Offset
</li>
</ul>
</dd>
<dt>
<a name = "set_anchor"></a>
<strong>set_anchor(acnhor)</strong>
</dt>
<dd>
Set grid anchor
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">acnhor</span>
<span class="types"><span class="type">vector3</span></span>
Anchor
</li>
</ul>
</dd>
<dt>
<a name = "add"></a>
<strong>add(item[, index])</strong>
</dt>
<dd>
Add new item to the grid
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">item</span>
<span class="types"><span class="type">node</span></span>
Gui node
</li>
<li><span class="parameter">index</span>
<span class="types"><span class="type">number</span></span>
The item position. By default add as last item
(<em>optional</em>)
</li>
</ul>
</dd>
<dt>
<a name = "get_size"></a>
<strong>get_size()</strong>
</dt>
<dd>
Return grid content size
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">vector3</span></span>
The grid content size
</ol>
</dd>
<dt>
<a name = "get_all_pos"></a>
<strong>get_all_pos()</strong>
</dt>
<dd>
Return array of all node positions
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">vector3[]</span></span>
All grid node positions
</ol>
</dd>
<dt>
<a name = "clear"></a>
<strong>clear()</strong>
</dt>
<dd>
Clear all items from the grid
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "Events"></a>
<strong>Events</strong>
</dt>
<dd>
Component events
<h3>Fields:</h3>
<ul>
<li><span class="parameter">on_add_item</span>
<span class="types"><span class="type">druid_event</span></span>
On item add callback
</li>
<li><span class="parameter">on_remove_item</span>
<span class="types"><span class="type">druid_event</span></span>
On item remove callback
</li>
<li><span class="parameter">on_clear</span>
<span class="types"><span class="type">druid_event</span></span>
On grid clear callback
</li>
<li><span class="parameter">on_update_positions</span>
<span class="types"><span class="type">druid_event</span></span>
On update item positions callback
</li>
</ul>
</dd>
<dt>
<a name = "Fields"></a>
<strong>Fields</strong>
</dt>
<dd>
Component fields
<h3>Fields:</h3>
<ul>
<li><span class="parameter">parent</span>
<span class="types"><span class="type">node</span></span>
Parent gui node
</li>
<li><span class="parameter">nodes</span>
<span class="types"><span class="type">node[]</span></span>
List of all grid nodes
</li>
<li><span class="parameter">offset</span>
<span class="types"><span class="type">vector3</span></span>
Item distance between each other items
</li>
<li><span class="parameter">anchor</span>
<span class="types"><span class="type">vector3</span></span>
Item anchor
</li>
<li><span class="parameter">node_size</span>
<span class="types"><span class="type">vector3</span></span>
Item size
</li>
<li><span class="parameter">border</span>
<span class="types"><span class="type">vector4</span></span>
The size of item content
</li>
<li><span class="parameter">border_offer</span>
<span class="types"><span class="type">vector3</span></span>
The border offset for correct anchor calculations
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -44,6 +44,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -226,7 +227,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -0,0 +1,209 @@
<!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_fixed.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/druid.back_handler.html">druid.back_handler</a></li>
<li><a href="../modules/druid.blocker.html">druid.blocker</a></li>
<li><a href="../modules/druid.button.html">druid.button</a></li>
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><strong>druid.hover</strong></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
<li><a href="../modules/druid.radio_group.html">druid.radio_group</a></li>
<li><a href="../modules/druid.scroll.html">druid.scroll</a></li>
<li><a href="../modules/druid.slider.html">druid.slider</a></li>
<li><a href="../modules/druid.text.html">druid.text</a></li>
<li><a href="../modules/druid.timer.html">druid.timer</a></li>
<li><a href="../modules/component.html">component</a></li>
<li><a href="../modules/druid.html">druid</a></li>
<li><a href="../modules/druid_event.html">druid_event</a></li>
<li><a href="../modules/druid.helper.html">druid.helper</a></li>
<li><a href="../modules/druid_instance.html">druid_instance</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>druid.hover</code></h1>
<p>Component to handle hover node interaction</p>
<p>
</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#init">init(node, on_hover_callback)</a></td>
<td class="summary">Component init function</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_hover">set_hover(state)</a></td>
<td class="summary">Set hover state</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(zone)</a></td>
<td class="summary">Strict button click area.</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Events">Events</a></td>
<td class="summary">Component events</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(node, on_hover_callback)</strong>
</dt>
<dd>
Component init function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Gui node
</li>
<li><span class="parameter">on_hover_callback</span>
<span class="types"><span class="type">function</span></span>
Hover callback
</li>
</ul>
</dd>
<dt>
<a name = "set_hover"></a>
<strong>set_hover(state)</strong>
</dt>
<dd>
Set hover state
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">state</span>
<span class="types"><span class="type">bool</span></span>
The hover state
</li>
</ul>
</dd>
<dt>
<a name = "set_click_zone"></a>
<strong>set_click_zone(zone)</strong>
</dt>
<dd>
Strict button click area. Useful for
no click events outside stencil node
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">zone</span>
<span class="types"><span class="type">node</span></span>
Gui node
</li>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "Events"></a>
<strong>Events</strong>
</dt>
<dd>
Component events
<h3>Fields:</h3>
<ul>
<li><span class="parameter">on_hover</span>
<span class="types"><span class="type">druid_event</span></span>
On hover callback
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@ -44,6 +44,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -68,8 +69,8 @@
<p>
<p> Powerful Defold component based UI library. Use standart
components or make your own game-specific to make amazing
GUI in your games.</p>
components or make your own game-specific components to
make amazing GUI in your games.</p>
<p> Contains the several basic components and examples
to how to do your custom complex components to
@ -171,7 +172,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -30,10 +30,6 @@
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
@ -44,6 +40,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><strong>druid.input</strong></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -64,94 +61,23 @@
<div id="content">
<h1>Module <code>druid.input</code></h1>
<p>Component to handle hover node interaction</p>
<p>
</p>
<p>Druid input text component.</p>
<p> Carry on user text input
UNIMPLEMENTED</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#hover:init">hover:init(self, node, on_hover_callback)</a></td>
<td class="summary">Component init function</td>
</tr>
<tr>
<td class="name" nowrap><a href="#button:set_click_zone">button: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 = "hover:init"></a>
<strong>hover:init(self, node, on_hover_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">node</span>
<span class="types"><span class="type">node</span></span>
Gui node
</li>
<li><span class="parameter">on_hover_callback</span>
<span class="types"><span class="type">function</span></span>
Hover callback
</li>
</ul>
</dd>
<dt>
<a name = "button:set_click_zone"></a>
<strong>button: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 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -33,6 +33,7 @@
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li>
</ul>
@ -44,6 +45,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><strong>druid.lang_text</strong></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -74,10 +76,29 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#text:translate">text:translate(self, locale_id)</a></td>
<td class="name" nowrap><a href="#init">init(node, locale_id, no_adjust)</a></td>
<td class="summary">Component init function</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_to">set_to(text)</a></td>
<td class="summary">Setup raw text to lang_text component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#translate">translate(locale_id)</a></td>
<td class="summary">Translate the text by locale_id</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Events">Events</a></td>
<td class="summary">Component events</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Fields">Fields</a></td>
<td class="summary">Component fields</td>
</tr>
</table>
<br/>
<br/>
@ -87,8 +108,58 @@
<dl class="function">
<dt>
<a name = "text:translate"></a>
<strong>text:translate(self, locale_id)</strong>
<a name = "init"></a>
<strong>init(node, locale_id, no_adjust)</strong>
</dt>
<dd>
Component init function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
The text node
</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>
Default locale id
</li>
<li><span class="parameter">no_adjust</span>
<span class="types"><span class="type">bool</span></span>
If true, will not correct text size
</li>
</ul>
</dd>
<dt>
<a name = "set_to"></a>
<strong>set_to(text)</strong>
</dt>
<dd>
Setup raw text to lang_text component
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">text</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
Text for text node
</li>
</ul>
</dd>
<dt>
<a name = "translate"></a>
<strong>translate(locale_id)</strong>
</dt>
<dd>
Translate the text by locale_id
@ -96,10 +167,6 @@
<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
@ -110,6 +177,52 @@
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "Events"></a>
<strong>Events</strong>
</dt>
<dd>
Component events
<h3>Fields:</h3>
<ul>
<li><span class="parameter">on_change</span>
<span class="types"><span class="type">druid_event</span></span>
On change text callback
</li>
</ul>
</dd>
<dt>
<a name = "Fields"></a>
<strong>Fields</strong>
</dt>
<dd>
Component fields
<h3>Fields:</h3>
<ul>
<li><span class="parameter">text</span>
<span class="types"><span class="type">druid.text</span></span>
The text component
</li>
</ul>
</dd>
</dl>
@ -118,7 +231,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -33,6 +33,7 @@
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li>
</ul>
@ -44,6 +45,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><strong>druid.progress</strong></li>
@ -64,43 +66,56 @@
<div id="content">
<h1>Module <code>druid.progress</code></h1>
<p>Basic progress bar component</p>
<p>
</p>
<p>Basic progress bar component.</p>
<p> For correct progress bar init it should be in max size from gui</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="name" nowrap><a href="#init">init(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="name" nowrap><a href="#fill">fill()</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="name" nowrap><a href="#empty">empty()</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="name" nowrap><a href="#set_to">set_to(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="name" nowrap><a href="#get">get()</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="name" nowrap><a href="#set_steps">set_steps(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="name" nowrap><a href="#to">to(to[, callback])</a></td>
<td class="summary">Start animation of a progress bar</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Events">Events</a></td>
<td class="summary">Component events</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Fields">Fields</a></td>
<td class="summary">Component fields</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Style">Style</a></td>
<td class="summary">Component style params</td>
</tr>
</table>
<br/>
<br/>
@ -111,7 +126,7 @@
<dl class="function">
<dt>
<a name = "init"></a>
<strong>init(self, node, key, init_value)</strong>
<strong>init(node, key, init_value)</strong>
</dt>
<dd>
Component init function
@ -119,17 +134,13 @@
<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)
Progress bar direction: const.SIDE.X or const.SIDE.Y
</li>
<li><span class="parameter">init_value</span>
<span class="types"><span class="type">number</span></span>
@ -143,20 +154,13 @@
</dd>
<dt>
<a name = "empty"></a>
<strong>empty(self)</strong>
<a name = "fill"></a>
<strong>fill()</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>
@ -165,19 +169,12 @@
</dd>
<dt>
<a name = "empty"></a>
<strong>empty(self)</strong>
<strong>empty()</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>
@ -186,7 +183,7 @@
</dd>
<dt>
<a name = "set_to"></a>
<strong>set_to(self, to)</strong>
<strong>set_to(to)</strong>
</dt>
<dd>
Instant fill progress bar to value
@ -194,10 +191,6 @@
<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
@ -211,19 +204,12 @@
</dd>
<dt>
<a name = "get"></a>
<strong>get(self)</strong>
<strong>get()</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>
@ -232,7 +218,7 @@
</dd>
<dt>
<a name = "set_steps"></a>
<strong>set_steps(self, steps, callback)</strong>
<strong>set_steps(steps, callback)</strong>
</dt>
<dd>
Set points on progress bar to fire the callback
@ -240,12 +226,8 @@
<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>
<span class="types"><span class="type">number[]</span></span>
Array of progress bar values
</li>
<li><span class="parameter">callback</span>
@ -257,11 +239,15 @@
<h3>Usage:</h3>
<ul>
<pre class="example">progress:set_steps({<span class="number">0</span>, <span class="number">0.3</span>, <span class="number">0.6</span>, <span class="number">1</span>}, <span class="keyword">function</span>(self, step) <span class="keyword">end</span>)</pre>
</ul>
</dd>
<dt>
<a name = "to"></a>
<strong>to(self, to[, callback])</strong>
<strong>to(to[, callback])</strong>
</dt>
<dd>
Start animation of a progress bar
@ -269,10 +255,6 @@
<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
@ -288,6 +270,97 @@
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "Events"></a>
<strong>Events</strong>
</dt>
<dd>
Component events
<h3>Fields:</h3>
<ul>
<li><span class="parameter">on_change</span>
<span class="types"><span class="type">druid_event</span></span>
On progress bar change callback
</li>
</ul>
</dd>
<dt>
<a name = "Fields"></a>
<strong>Fields</strong>
</dt>
<dd>
Component fields
<h3>Fields:</h3>
<ul>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Progress bar fill node
</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>
The progress bar direction
</li>
<li><span class="parameter">scale</span>
<span class="types"><span class="type">vector3</span></span>
Current progress bar scale
</li>
<li><span class="parameter">size</span>
<span class="types"><span class="type">vector3</span></span>
Current progress bar size
</li>
<li><span class="parameter">max_size</span>
<span class="types"><span class="type">number</span></span>
Maximum size of progress bar
</li>
<li><span class="parameter">slice</span>
<span class="types"><span class="type">vector4</span></span>
Progress bar slice9 settings
</li>
</ul>
</dd>
<dt>
<a name = "Style"></a>
<strong>Style</strong>
</dt>
<dd>
Component style params
<h3>Fields:</h3>
<ul>
<li><span class="parameter">SPEED</span>
<span class="types"><span class="type">number</span></span>
Progress bas fill rate. More -> faster
</li>
<li><span class="parameter">MIN_DELTA</span>
<span class="types"><span class="type">number</span></span>
Minimum step to fill progress bar
</li>
</ul>
</dd>
</dl>
@ -296,7 +369,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -30,6 +30,11 @@
<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>
@ -40,6 +45,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -66,18 +72,165 @@
</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#init">init(node, callback[, click=node])</a></td>
<td class="summary">Component init function</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_state">set_state(state)</a></td>
<td class="summary">Set radio group state</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_state">get_state()</a></td>
<td class="summary">Return radio group state</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Events">Events</a></td>
<td class="summary">Component events</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Fields">Fields</a></td>
<td class="summary">Component fields</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(node, callback[, click=node])</strong>
</dt>
<dd>
Component init function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node[]</span></span>
Array of gui node
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
Radio callback
</li>
<li><span class="parameter">click</span>
<span class="types"><span class="type">node[]</span></span>
node Array of trigger nodes, by default equals to nodes
(<em>default</em> node)
</li>
</ul>
</dd>
<dt>
<a name = "set_state"></a>
<strong>set_state(state)</strong>
</dt>
<dd>
Set radio group state
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">state</span>
<span class="types"><span class="type">bool[]</span></span>
Array of checkbox state
</li>
</ul>
</dd>
<dt>
<a name = "get_state"></a>
<strong>get_state()</strong>
</dt>
<dd>
Return radio group state
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool[]</span></span>
Array if checkboxes state
</ol>
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "Events"></a>
<strong>Events</strong>
</dt>
<dd>
Component events
<h3>Fields:</h3>
<ul>
<li><span class="parameter">on_radio_click</span>
<span class="types"><span class="type">druid_event</span></span>
On any checkbox click
</li>
</ul>
</dd>
<dt>
<a name = "Fields"></a>
<strong>Fields</strong>
</dt>
<dd>
Component fields
<h3>Fields:</h3>
<ul>
<li><span class="parameter">checkboxes</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
Array of checkbox components
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -33,6 +33,7 @@
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li>
</ul>
@ -44,6 +45,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -64,38 +66,68 @@
<div id="content">
<h1>Module <code>druid.scroll</code></h1>
<p>Component to handle scroll content</p>
<p>
</p>
<p>Component to handle scroll content.</p>
<p> Scroll consist from two nodes: scroll parent and scroll input
Scroll input the user input zone, it's static
Scroll parent the scroll moving part, it will change position.
Setup initial scroll size by changing scroll parent size. If scroll parent
size will be less than scroll_input size, no scroll is available. For scroll
parent size should be more than input size</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#init">init(scroll_parent, input_zone)</a></td>
<td class="summary">Component init function</td>
</tr>
<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="name" nowrap><a href="#scroll_to_percent">scroll_to_percent(vector3[, is_instant])</a></td>
<td class="summary">Start scroll to target scroll percent</td>
</tr>
<tr>
<td class="name" nowrap><a href="#init">init(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="name" nowrap><a href="#set_points">set_points(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="name" nowrap><a href="#set_inert">set_inert(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="name" nowrap><a href="#on_point_move">on_point_move(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="name" nowrap><a href="#set_border">set_border(border)</a></td>
<td class="summary">Set the scroll possibly area</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_scroll_percent">get_scroll_percent()</a></td>
<td class="summary">Return current scroll progress</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Events">Events</a></td>
<td class="summary">Component events</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Fields">Fields</a></td>
<td class="summary">Component fields</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Style">Style</a></td>
<td class="summary">Component style params</td>
</tr>
</table>
<br/>
@ -105,6 +137,31 @@
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "init"></a>
<strong>init(scroll_parent, input_zone)</strong>
</dt>
<dd>
Component init function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">scroll_parent</span>
<span class="types"><span class="type">node</span></span>
Gui node where placed scroll content. This node will change position
</li>
<li><span class="parameter">input_zone</span>
<span class="types"><span class="type">node</span></span>
Gui node where input is catched
</li>
</ul>
</dd>
<dt>
<a name = "scroll_to"></a>
<strong>scroll_to(vector3[, is_instant])</strong>
@ -135,10 +192,40 @@
<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 = "scroll_to_percent"></a>
<strong>scroll_to_percent(vector3[, is_instant])</strong>
</dt>
<dd>
Start scroll to target scroll percent
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">vector3</span>
<span class="types"><span class="type">point</span></span>
target percent
</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>
<pre class="example">scroll:scroll_to_percent(vmath.vector3(<span class="number">0.5</span>, <span class="number">0</span>, <span class="number">0</span>))</pre>
</ul>
</dd>
<dt>
<a name = "init"></a>
<strong>init(self, index[, skip_cb])</strong>
<strong>init(index[, skip_cb])</strong>
</dt>
<dd>
Scroll to item in scroll by point index
@ -146,16 +233,12 @@
<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>
<span class="types"><span class="type">bool</span></span>
If true, skip the point callback
(<em>optional</em>)
</li>
@ -168,7 +251,7 @@
</dd>
<dt>
<a name = "set_points"></a>
<strong>set_points(self, points)</strong>
<strong>set_points(points)</strong>
</dt>
<dd>
Set points of interest.
@ -177,10 +260,6 @@
<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
@ -194,7 +273,7 @@
</dd>
<dt>
<a name = "set_inert"></a>
<strong>set_inert(self, state)</strong>
<strong>set_inert(state)</strong>
</dt>
<dd>
Enable or disable scroll inert.
@ -204,12 +283,8 @@
<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>
<span class="types"><span class="type">bool</span></span>
Inert scroll state
</li>
</ul>
@ -221,7 +296,7 @@
</dd>
<dt>
<a name = "on_point_move"></a>
<strong>on_point_move(self, callback)</strong>
<strong>on_point_move(callback)</strong>
</dt>
<dd>
Set the callback on scrolling to point (if exist)
@ -229,10 +304,6 @@
<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
@ -246,7 +317,7 @@
</dd>
<dt>
<a name = "set_border"></a>
<strong>set_border(self, border)</strong>
<strong>set_border(border)</strong>
</dt>
<dd>
Set the scroll possibly area
@ -254,12 +325,8 @@
<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>
<span class="types"><span class="type">vector3</span></span>
Size of scrolling area
</li>
</ul>
@ -268,6 +335,161 @@
</dd>
<dt>
<a name = "get_scroll_percent"></a>
<strong>get_scroll_percent()</strong>
</dt>
<dd>
Return current scroll progress
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">vector3</span></span>
Scroll progress
</ol>
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "Events"></a>
<strong>Events</strong>
</dt>
<dd>
Component events
<h3>Fields:</h3>
<ul>
<li><span class="parameter">on_scroll</span>
<span class="types"><span class="type">druid_event</span></span>
On scroll move callback
</li>
<li><span class="parameter">on_scroll_to</span>
<span class="types"><span class="type">druid_event</span></span>
On scroll_to function callback
</li>
<li><span class="parameter">on_point_scroll</span>
<span class="types"><span class="type">druid_event</span></span>
On scroll<em>to</em>index function callbck
</li>
</ul>
</dd>
<dt>
<a name = "Fields"></a>
<strong>Fields</strong>
</dt>
<dd>
Component fields
<h3>Fields:</h3>
<ul>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Scroll parent node
</li>
<li><span class="parameter">input_zone</span>
<span class="types"><span class="type">node</span></span>
Scroll input node
</li>
<li><span class="parameter">zone_size</span>
<span class="types"><span class="type">vector3</span></span>
Current scroll content size
</li>
<li><span class="parameter">soft_size</span>
<span class="types"><span class="type">number</span></span>
Soft zone size from style table
</li>
<li><span class="parameter">center_offset</span>
<span class="types"><span class="type">vector3</span></span>
Distance from node to node's center
</li>
<li><span class="parameter">is_inert</span>
<span class="types"><span class="type">bool</span></span>
Flag, if scroll now moving by inertion
</li>
<li><span class="parameter">inert</span>
<span class="types"><span class="type">vector3</span></span>
Current inert speed
</li>
<li><span class="parameter">pos</span>
<span class="types"><span class="type">vector3</span></span>
Current scroll posisition
</li>
<li><span class="parameter">target</span>
<span class="types"><span class="type">vector3</span></span>
Current scroll target position
</li>
</ul>
</dd>
<dt>
<a name = "Style"></a>
<strong>Style</strong>
</dt>
<dd>
Component style params
<h3>Fields:</h3>
<ul>
<li><span class="parameter">FRICT_HOLD</span>
<span class="types"><span class="type">number</span></span>
Multiplier for inertion, while touching
</li>
<li><span class="parameter">FRICT</span>
<span class="types"><span class="type">number</span></span>
Multiplier for free inertion
</li>
<li><span class="parameter">INERT_THRESHOLD</span>
<span class="types"><span class="type">number</span></span>
Scroll speed to stop inertion
</li>
<li><span class="parameter">INERT_SPEED</span>
<span class="types"><span class="type">number</span></span>
Multiplier for inertion speed
</li>
<li><span class="parameter">DEADZONE</span>
<span class="types"><span class="type">number</span></span>
Deadzone for start scrol in pixels
</li>
<li><span class="parameter">SOFT_ZONE_SIZE</span>
<span class="types"><span class="type">number</span></span>
Size of outside zone in pixels (for scroll back moving)
</li>
<li><span class="parameter">BACK_SPEED</span>
<span class="types"><span class="type">number</span></span>
Scroll back returning lerp speed
</li>
<li><span class="parameter">ANIM_SPEED</span>
<span class="types"><span class="type">number</span></span>
Scroll gui.animation speed for scroll_to function
</li>
</ul>
</dd>
</dl>
@ -276,7 +498,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -30,6 +30,11 @@
<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>
@ -40,6 +45,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -66,18 +72,174 @@
</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#init">init(node, end_pos[, callback])</a></td>
<td class="summary">Component init function</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set">set(value[, is_silent])</a></td>
<td class="summary">Set value for slider</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Events">Events</a></td>
<td class="summary">Component events</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Fields">Fields</a></td>
<td class="summary">Component fields</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(node, end_pos[, callback])</strong>
</dt>
<dd>
Component init function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Gui pin node
</li>
<li><span class="parameter">end_pos</span>
<span class="types"><span class="type">vector3</span></span>
The end position of slider
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
On slider change callback
(<em>optional</em>)
</li>
</ul>
</dd>
<dt>
<a name = "set"></a>
<strong>set(value[, is_silent])</strong>
</dt>
<dd>
Set value for slider
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">value</span>
<span class="types"><span class="type">number</span></span>
Value from 0 to 1
</li>
<li><span class="parameter">is_silent</span>
<span class="types"><span class="type">bool</span></span>
Don't trigger event if true
(<em>optional</em>)
</li>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "Events"></a>
<strong>Events</strong>
</dt>
<dd>
Component events
<h3>Fields:</h3>
<ul>
<li><span class="parameter">on_change_value</span>
<span class="types"><span class="type">druid_event</span></span>
On change value callback
</li>
</ul>
</dd>
<dt>
<a name = "Fields"></a>
<strong>Fields</strong>
</dt>
<dd>
Component fields
<h3>Fields:</h3>
<ul>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Slider pin node
</li>
<li><span class="parameter">start_pos</span>
<span class="types"><span class="type">vector3</span></span>
Start pin node position
</li>
<li><span class="parameter">pos</span>
<span class="types"><span class="type">vector3</span></span>
Current pin node position
</li>
<li><span class="parameter">target_pos</span>
<span class="types"><span class="type">vector3</span></span>
Targer pin node position
</li>
<li><span class="parameter">end_pos</span>
<span class="types"><span class="type">vector3</span></span>
End pin node position
</li>
<li><span class="parameter">dist</span>
<span class="types"><span class="type">number</span></span>
Length between start and end position
</li>
<li><span class="parameter">is_drag</span>
<span class="types"><span class="type">bool</span></span>
Current drag state
</li>
<li><span class="parameter">value</span>
<span class="types"><span class="type">number</span></span>
Current slider value
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -33,6 +33,7 @@
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li>
</ul>
@ -44,6 +45,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -64,36 +66,49 @@
<div id="content">
<h1>Module <code>druid.text</code></h1>
<p>Component to handle all GUI texts
Good working with localization system</p>
<p>
</p>
<p>Component to handle all GUI texts.</p>
<p> Druid text can adjust itself for text node size
Text will never will be outside of his text size (even multiline)</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="name" nowrap><a href="#init">init(node[, value[, no_adjust]])</a></td>
<td class="summary">Component init function</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_to">set_to(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="name" nowrap><a href="#set_color">set_color(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="name" nowrap><a href="#set_alpha">set_alpha(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="name" nowrap><a href="#set_scale">set_scale(scale)</a></td>
<td class="summary">Set scale</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_pivot">set_pivot(self, pivot)</a></td>
<td class="name" nowrap><a href="#set_pivot">set_pivot(pivot)</a></td>
<td class="summary">Set text pivot.</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Events">Events</a></td>
<td class="summary">Component events</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Fields">Fields</a></td>
<td class="summary">Component fields</td>
</tr>
</table>
<br/>
<br/>
@ -102,9 +117,40 @@
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "init"></a>
<strong>init(node[, value[, no_adjust]])</strong>
</dt>
<dd>
Component init function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Gui text node
</li>
<li><span class="parameter">value</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
Initial text
(<em>optional</em>)
</li>
<li><span class="parameter">no_adjust</span>
<span class="types"><span class="type">bool</span></span>
If true, text will be not auto-adjust size
(<em>optional</em>)
</li>
</ul>
</dd>
<dt>
<a name = "set_to"></a>
<strong>set_to(self, set_to)</strong>
<strong>set_to(set_to)</strong>
</dt>
<dd>
Set text to text field
@ -112,10 +158,6 @@
<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
@ -129,7 +171,7 @@
</dd>
<dt>
<a name = "set_color"></a>
<strong>set_color(self, color)</strong>
<strong>set_color(color)</strong>
</dt>
<dd>
Set color
@ -137,12 +179,8 @@
<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>
<span class="types"><span class="type">vector4</span></span>
Color for node
</li>
</ul>
@ -154,7 +192,7 @@
</dd>
<dt>
<a name = "set_alpha"></a>
<strong>set_alpha(self, alpha)</strong>
<strong>set_alpha(alpha)</strong>
</dt>
<dd>
Set alpha
@ -162,10 +200,6 @@
<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
@ -179,7 +213,7 @@
</dd>
<dt>
<a name = "set_scale"></a>
<strong>set_scale(self, scale)</strong>
<strong>set_scale(scale)</strong>
</dt>
<dd>
Set scale
@ -187,12 +221,8 @@
<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>
<span class="types"><span class="type">vector3</span></span>
Scale for node
</li>
</ul>
@ -204,7 +234,7 @@
</dd>
<dt>
<a name = "set_pivot"></a>
<strong>set_pivot(self, pivot)</strong>
<strong>set_pivot(pivot)</strong>
</dt>
<dd>
Set text pivot. Text will re-anchor inside
@ -213,10 +243,6 @@
<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">pivot</span>
<span class="types"><span class="type">gui.pivot</span></span>
Gui pivot constant
@ -227,6 +253,88 @@
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "Events"></a>
<strong>Events</strong>
</dt>
<dd>
Component events
<h3>Fields:</h3>
<ul>
<li><span class="parameter">on_set_text</span>
<span class="types"><span class="type">druid_event</span></span>
On set text callback
</li>
<li><span class="parameter">on_update_text_scale</span>
<span class="types"><span class="type">druid_event</span></span>
On adjust text size callback
</li>
<li><span class="parameter">on_set_pivot</span>
<span class="types"><span class="type">druid_event</span></span>
On change pivot callback
</li>
</ul>
</dd>
<dt>
<a name = "Fields"></a>
<strong>Fields</strong>
</dt>
<dd>
Component fields
<h3>Fields:</h3>
<ul>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Text node
</li>
<li><span class="parameter">pos</span>
<span class="types"><span class="type">vector3</span></span>
Current text position
</li>
<li><span class="parameter">start_scale</span>
<span class="types"><span class="type">vector3</span></span>
Initial text node scale
</li>
<li><span class="parameter">scale</span>
<span class="types"><span class="type">vector3</span></span>
Current text node scale
</li>
<li><span class="parameter">start_size</span>
<span class="types"><span class="type">vector3</span></span>
Initial text node size
</li>
<li><span class="parameter">text_area</span>
<span class="types"><span class="type">vector3</span></span>
Current text node available are
</li>
<li><span class="parameter">is_no_adjust</span>
<span class="types"><span class="type">bool</span></span>
Current text size adjust settings
</li>
<li><span class="parameter">color</span>
<span class="types"><span class="type">vector3</span></span>
Current text color
</li>
</ul>
</dd>
</dl>
@ -235,7 +343,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -33,6 +33,7 @@
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li>
</ul>
@ -44,6 +45,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -64,27 +66,41 @@
<div id="content">
<h1>Module <code>druid.timer</code></h1>
<p>Component to handle GUI timers</p>
<p>
</p>
<p>Component to handle GUI timers.</p>
<p> Timer updating by game delta time. If game is not focused -
timer will be not updated.</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="name" nowrap><a href="#init">init(node, seconds_from[, seconds_to=0[, callback]])</a></td>
<td class="summary">Component init function</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_to">set_to(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="name" nowrap><a href="#set_state">set_state(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="name" nowrap><a href="#set_interval">set_interval(from, to)</a></td>
<td class="summary">Set time interval</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Events">Events</a></td>
<td class="summary">Component events</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Fields">Fields</a></td>
<td class="summary">Component fields</td>
</tr>
</table>
<br/>
<br/>
@ -93,9 +109,44 @@
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "init"></a>
<strong>init(node, seconds_from[, seconds_to=0[, callback]])</strong>
</dt>
<dd>
Component init function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Gui text node
</li>
<li><span class="parameter">seconds_from</span>
<span class="types"><span class="type">number</span></span>
Start timer value in seconds
</li>
<li><span class="parameter">seconds_to</span>
<span class="types"><span class="type">number</span></span>
End timer value in seconds
(<em>default</em> 0)
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
Function on timer end
(<em>optional</em>)
</li>
</ul>
</dd>
<dt>
<a name = "set_to"></a>
<strong>set_to(self, set_to)</strong>
<strong>set_to(set_to)</strong>
</dt>
<dd>
Set text to text field
@ -103,10 +154,6 @@
<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
@ -120,7 +167,7 @@
</dd>
<dt>
<a name = "set_state"></a>
<strong>set_state(self, is_on)</strong>
<strong>set_state(is_on)</strong>
</dt>
<dd>
Called when update
@ -128,12 +175,8 @@
<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>
<span class="types"><span class="type">bool</span></span>
Timer enable state
</li>
</ul>
@ -145,7 +188,7 @@
</dd>
<dt>
<a name = "set_interval"></a>
<strong>set_interval(self, from, to)</strong>
<strong>set_interval(from, to)</strong>
</dt>
<dd>
Set time interval
@ -153,10 +196,6 @@
<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
@ -171,6 +210,86 @@
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "Events"></a>
<strong>Events</strong>
</dt>
<dd>
Component events
<h3>Fields:</h3>
<ul>
<li><span class="parameter">on_tick</span>
<span class="types"><span class="type">druid_event</span></span>
On timer tick callback. Fire every second
</li>
<li><span class="parameter">on_set_enabled</span>
<span class="types"><span class="type">druid_event</span></span>
On timer change enabled state callback
</li>
<li><span class="parameter">on_timer_end</span>
<span class="types"><span class="type">druid_event</span></span>
On timer end callback
</li>
</ul>
</dd>
<dt>
<a name = "Fields"></a>
<strong>Fields</strong>
</dt>
<dd>
Component fields
<h3>Fields:</h3>
<ul>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Trigger node
</li>
<li><span class="parameter">anim_node</span>
<span class="types"><span class="type">node</span></span>
Animation node
(<em>default</em> node)
</li>
<li><span class="parameter">scale_from</span>
<span class="types"><span class="type">vector3</span></span>
Initial scale of anim_node
</li>
<li><span class="parameter">pos</span>
<span class="types"><span class="type">vector3</span></span>
Initial pos of anim_node
</li>
<li><span class="parameter">params</span>
<span class="types"><span class="type">any</span></span>
Params to click callbacks
</li>
<li><span class="parameter">hover</span>
<span class="types"><span class="type">druid.hover</span></span>
Druid hover logic component
</li>
<li><span class="parameter">click_zone</span>
<span class="types"><span class="type">node</span></span>
Restriction zone
(<em>optional</em>)
</li>
</ul>
</dd>
</dl>
@ -179,7 +298,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -44,6 +44,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -72,6 +73,10 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Event">Event(initial_callback)</a></td>
<td class="summary">Event constructur</td>
</tr>
<tr>
<td class="name" nowrap><a href="#event:subscribe">event:subscribe(callback)</a></td>
<td class="summary">Subscribe callback on event</td>
@ -81,6 +86,14 @@
<td class="summary">Unsubscribe callback on event</td>
</tr>
<tr>
<td class="name" nowrap><a href="#event:is_exist">event:is_exist()</a></td>
<td class="summary">Return true, if event have at lease one handler</td>
</tr>
<tr>
<td class="name" nowrap><a href="#event:clear">event:clear()</a></td>
<td class="summary">Clear the all event handlers</td>
</tr>
<tr>
<td class="name" nowrap><a href="#event:trigger">event:trigger(...)</a></td>
<td class="summary">Trigger the event and call all subscribed callbacks</td>
</tr>
@ -93,6 +106,27 @@
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "Event"></a>
<strong>Event(initial_callback)</strong>
</dt>
<dd>
Event constructur
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">initial_callback</span>
<span class="types"><span class="type">function</span></span>
Subscribe the callback on new event, if callback exist
</li>
</ul>
</dd>
<dt>
<a name = "event:subscribe"></a>
<strong>event:subscribe(callback)</strong>
@ -134,6 +168,40 @@
</dd>
<dt>
<a name = "event:is_exist"></a>
<strong>event:is_exist()</strong>
</dt>
<dd>
Return true, if event have at lease one handler
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
True if event have handlers
</ol>
</dd>
<dt>
<a name = "event:clear"></a>
<strong>event:clear()</strong>
</dt>
<dd>
Clear the all event handlers
</dd>
<dt>
<a name = "event:trigger"></a>
@ -162,7 +230,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -44,6 +44,7 @@
<li><a href="../modules/druid.checkbox.html">druid.checkbox</a></li>
<li><a href="../modules/druid.checkbox_group.html">druid.checkbox_group</a></li>
<li><a href="../modules/druid.grid.html">druid.grid</a></li>
<li><a href="../modules/druid.hover.html">druid.hover</a></li>
<li><a href="../modules/druid.input.html">druid.input</a></li>
<li><a href="../modules/druid.lang_text.html">druid.lang_text</a></li>
<li><a href="../modules/druid.progress.html">druid.progress</a></li>
@ -740,7 +741,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-02-24 00:03:02 </i>
<i style="float:right;">Last updated 2020-03-21 21:42:52 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -17,6 +17,9 @@ local component = require("druid.component")
local M = component.create("blocker", { const.ON_INPUT_HIGH })
--- Component init function
-- @function blocker:init
-- @tparam node node Gui node
function M.init(self, node)
self.node = self:get_node(node)

View File

@ -72,7 +72,7 @@ end
--- Strict button click area. Useful for
-- no click events outside stencil node
-- @function button:set_click_zone
-- @function hover:set_click_zone
-- @tparam node zone Gui node
function M.set_click_zone(self, zone)
self.click_zone = self:get_node(zone)

View File

@ -1,6 +1,6 @@
--- Druid input text component.
-- Carry on user text input
-- @local unimplemented
-- UNIMPLEMENTED
-- @module druid.input
local component = require("druid.component")

View File

@ -1,7 +1,7 @@
--- Druid UI Library.
-- Powerful Defold component based UI library. Use standart
-- components or make your own game-specific to make amazing
-- GUI in your games.
-- components or make your own game-specific components to
-- make amazing GUI in your games.
--
-- Contains the several basic components and examples
-- to how to do your custom complex components to