Annotations update

This commit is contained in:
Insality 2023-10-17 21:09:45 +03:00
parent 7fc76ed8c0
commit 86b92f90a7
56 changed files with 540 additions and 574 deletions

View File

@ -98,67 +98,67 @@ return AwesomeComponent
<h2><a href="#Functions">Functions</a></h2> <h2><a href="#Functions">Functions</a></h2>
<table class="function_list"> <table class="function_list">
<tr> <tr>
<td class="name" nowrap><a href="#component:get_childrens">component:get_childrens(self)</a></td> <td class="name" nowrap><a href="#get_childrens">get_childrens(self)</a></td>
<td class="summary">Return all children components, recursive</td> <td class="summary">Return all children components, recursive</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#component:get_context">component:get_context(self)</a></td> <td class="name" nowrap><a href="#get_context">get_context(self)</a></td>
<td class="summary">Context used as first arg in all Druid events</td> <td class="summary">Context used as first arg in all Druid events</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#component:get_druid">component:get_druid(self)</a></td> <td class="name" nowrap><a href="#get_druid">get_druid(self)</a></td>
<td class="summary">Get Druid instance for inner component creation.</td> <td class="summary">Get Druid instance for inner component creation.</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#component:get_input_priority">component:get_input_priority(self)</a></td> <td class="name" nowrap><a href="#get_input_priority">get_input_priority(self)</a></td>
<td class="summary">Return component input priority</td> <td class="summary">Return component input priority</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#component:get_name">component:get_name(self)</a></td> <td class="name" nowrap><a href="#get_name">get_name(self)</a></td>
<td class="summary">Return component name</td> <td class="summary">Return component name</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#component:get_node">component:get_node(self, node_or_name)</a></td> <td class="name" nowrap><a href="#get_node">get_node(self, node_or_name)</a></td>
<td class="summary">Get component node by name.</td> <td class="summary">Get component node by name.</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#component:get_parent_component">component:get_parent_component(self)</a></td> <td class="name" nowrap><a href="#get_parent_component">get_parent_component(self)</a></td>
<td class="summary">Return the parent component if exist</td> <td class="summary">Return the parent component if exist</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#component:get_parent_name">component:get_parent_name(self)</a></td> <td class="name" nowrap><a href="#get_parent_name">get_parent_name(self)</a></td>
<td class="summary">Return parent component name</td> <td class="summary">Return parent component name</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#component:get_template">component:get_template(self)</a></td> <td class="name" nowrap><a href="#get_template">get_template(self)</a></td>
<td class="summary">Get current component template name.</td> <td class="summary">Get current component template name.</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#component:get_uid">component:get_uid(self)</a></td> <td class="name" nowrap><a href="#get_uid">get_uid(self)</a></td>
<td class="summary">Return component UID.</td> <td class="summary">Return component UID.</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#component:reset_input_priority">component:reset_input_priority(self)</a></td> <td class="name" nowrap><a href="#reset_input_priority">reset_input_priority(self)</a></td>
<td class="summary">Reset component input priority to default value</td> <td class="summary">Reset component input priority to default value</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#component:set_input_enabled">component:set_input_enabled(self, state)</a></td> <td class="name" nowrap><a href="#set_input_enabled">set_input_enabled(self, state)</a></td>
<td class="summary">Set component input state.</td> <td class="summary">Set component input state.</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#component:set_input_priority">component:set_input_priority(self, value, is_temporary)</a></td> <td class="name" nowrap><a href="#set_input_priority">set_input_priority(self, value, is_temporary)</a></td>
<td class="summary">Set component input priority</td> <td class="summary">Set component input priority</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#component:set_nodes">component:set_nodes(self, nodes)</a></td> <td class="name" nowrap><a href="#set_nodes">set_nodes(self, nodes)</a></td>
<td class="summary">Set current component nodes.</td> <td class="summary">Set current component nodes.</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#component:set_style">component:set_style(self, druid_style)</a></td> <td class="name" nowrap><a href="#set_style">set_style(self, druid_style)</a></td>
<td class="summary">Set current component style table.</td> <td class="summary">Set current component style table.</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#component:set_template">component:set_template(self, template)</a></td> <td class="name" nowrap><a href="#set_template">set_template(self, template)</a></td>
<td class="summary">Set component template name.</td> <td class="summary">Set component template name.</td>
</tr> </tr>
</table> </table>
@ -171,8 +171,8 @@ return AwesomeComponent
<dl class="function"> <dl class="function">
<dt> <dt>
<a name = "component:get_childrens"></a> <a name = "get_childrens"></a>
<strong>component:get_childrens(self)</strong> <strong>get_childrens(self)</strong>
</dt> </dt>
<dd> <dd>
Return all children components, recursive Return all children components, recursive
@ -198,8 +198,8 @@ return AwesomeComponent
</dd> </dd>
<dt> <dt>
<a name = "component:get_context"></a> <a name = "get_context"></a>
<strong>component:get_context(self)</strong> <strong>get_context(self)</strong>
</dt> </dt>
<dd> <dd>
Context used as first arg in all Druid events Context is usually self of gui_script. Context used as first arg in all Druid events Context is usually self of gui_script.
@ -225,8 +225,8 @@ return AwesomeComponent
</dd> </dd>
<dt> <dt>
<a name = "component:get_druid"></a> <a name = "get_druid"></a>
<strong>component:get_druid(self)</strong> <strong>get_druid(self)</strong>
</dt> </dt>
<dd> <dd>
Get Druid instance for inner component creation. Get Druid instance for inner component creation.
@ -243,7 +243,7 @@ return AwesomeComponent
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">Druid</span></span> <span class="types"><span class="type">DruidInstance</span></span>
Druid instance with component context Druid instance with component context
</ol> </ol>
@ -252,8 +252,8 @@ return AwesomeComponent
</dd> </dd>
<dt> <dt>
<a name = "component:get_input_priority"></a> <a name = "get_input_priority"></a>
<strong>component:get_input_priority(self)</strong> <strong>get_input_priority(self)</strong>
</dt> </dt>
<dd> <dd>
Return component input priority Return component input priority
@ -279,8 +279,8 @@ return AwesomeComponent
</dd> </dd>
<dt> <dt>
<a name = "component:get_name"></a> <a name = "get_name"></a>
<strong>component:get_name(self)</strong> <strong>get_name(self)</strong>
</dt> </dt>
<dd> <dd>
Return component name Return component name
@ -306,8 +306,8 @@ return AwesomeComponent
</dd> </dd>
<dt> <dt>
<a name = "component:get_node"></a> <a name = "get_node"></a>
<strong>component:get_node(self, node_or_name)</strong> <strong>get_node(self, node_or_name)</strong>
</dt> </dt>
<dd> <dd>
Get component node by name. Get component node by name.
@ -341,8 +341,8 @@ return AwesomeComponent
</dd> </dd>
<dt> <dt>
<a name = "component:get_parent_component"></a> <a name = "get_parent_component"></a>
<strong>component:get_parent_component(self)</strong> <strong>get_parent_component(self)</strong>
</dt> </dt>
<dd> <dd>
Return the parent component if exist Return the parent component if exist
@ -368,8 +368,8 @@ return AwesomeComponent
</dd> </dd>
<dt> <dt>
<a name = "component:get_parent_name"></a> <a name = "get_parent_name"></a>
<strong>component:get_parent_name(self)</strong> <strong>get_parent_name(self)</strong>
</dt> </dt>
<dd> <dd>
Return parent component name Return parent component name
@ -395,8 +395,8 @@ return AwesomeComponent
</dd> </dd>
<dt> <dt>
<a name = "component:get_template"></a> <a name = "get_template"></a>
<strong>component:get_template(self)</strong> <strong>get_template(self)</strong>
</dt> </dt>
<dd> <dd>
Get current component template name. Get current component template name.
@ -422,8 +422,8 @@ return AwesomeComponent
</dd> </dd>
<dt> <dt>
<a name = "component:get_uid"></a> <a name = "get_uid"></a>
<strong>component:get_uid(self)</strong> <strong>get_uid(self)</strong>
</dt> </dt>
<dd> <dd>
Return component UID. Return component UID.
@ -450,8 +450,8 @@ return AwesomeComponent
</dd> </dd>
<dt> <dt>
<a name = "component:reset_input_priority"></a> <a name = "reset_input_priority"></a>
<strong>component:reset_input_priority(self)</strong> <strong>reset_input_priority(self)</strong>
</dt> </dt>
<dd> <dd>
Reset component input priority to default value Reset component input priority to default value
@ -477,8 +477,8 @@ return AwesomeComponent
</dd> </dd>
<dt> <dt>
<a name = "component:set_input_enabled"></a> <a name = "set_input_enabled"></a>
<strong>component:set_input_enabled(self, state)</strong> <strong>set_input_enabled(self, state)</strong>
</dt> </dt>
<dd> <dd>
Set component input state. By default it enabled Set component input state. By default it enabled
@ -492,7 +492,7 @@ return AwesomeComponent
<a href="../modules/BaseComponent.html#">BaseComponent</a> <a href="../modules/BaseComponent.html#">BaseComponent</a>
</li> </li>
<li><span class="parameter">state</span> <li><span class="parameter">state</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
The component input state The component input state
</li> </li>
</ul> </ul>
@ -509,8 +509,8 @@ return AwesomeComponent
</dd> </dd>
<dt> <dt>
<a name = "component:set_input_priority"></a> <a name = "set_input_priority"></a>
<strong>component:set_input_priority(self, value, is_temporary)</strong> <strong>set_input_priority(self, value, is_temporary)</strong>
</dt> </dt>
<dd> <dd>
Set component input priority Default value: 10 Set component input priority Default value: 10
@ -544,8 +544,8 @@ return AwesomeComponent
</dd> </dd>
<dt> <dt>
<a name = "component:set_nodes"></a> <a name = "set_nodes"></a>
<strong>component:set_nodes(self, nodes)</strong> <strong>set_nodes(self, nodes)</strong>
</dt> </dt>
<dd> <dd>
Set current component nodes. Set current component nodes.
@ -582,8 +582,8 @@ self:set_nodes(nodes)</pre>
</dd> </dd>
<dt> <dt>
<a name = "component:set_style"></a> <a name = "set_style"></a>
<strong>component:set_style(self, druid_style)</strong> <strong>set_style(self, druid_style)</strong>
</dt> </dt>
<dd> <dd>
Set current component style table. Set current component style table.
@ -615,8 +615,8 @@ self:set_nodes(nodes)</pre>
</dd> </dd>
<dt> <dt>
<a name = "component:set_template"></a> <a name = "set_template"></a>
<strong>component:set_template(self, template)</strong> <strong>set_template(self, template)</strong>
</dt> </dt>
<dd> <dd>
Set component template name. Set component template name.

View File

@ -95,7 +95,7 @@ local blocker = self.druid:new_blocker(node)
<table class="function_list"> <table class="function_list">
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, node)</a></td> <td class="name" nowrap><a href="#init">init(self, node)</a></td>
<td class="summary"><a href="../modules/Blocker.html#">Blocker</a> constructor</td> <td class="summary">The <a href="../modules/Blocker.html#">Blocker</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td> <td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td>
@ -126,7 +126,7 @@ local blocker = self.druid:new_blocker(node)
<strong>init(self, node)</strong> <strong>init(self, node)</strong>
</dt> </dt>
<dd> <dd>
<a href="../modules/Blocker.html#">Blocker</a> constructor The <a href="../modules/Blocker.html#">Blocker</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>
@ -165,8 +165,8 @@ local blocker = self.druid:new_blocker(node)
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
True, if blocker is enabled @True, if blocker is enabled
</ol> </ol>
@ -189,7 +189,7 @@ local blocker = self.druid:new_blocker(node)
<a href="../modules/Blocker.html#">Blocker</a> <a href="../modules/Blocker.html#">Blocker</a>
</li> </li>
<li><span class="parameter">state</span> <li><span class="parameter">state</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
Enabled state Enabled state
</li> </li>
</ul> </ul>

View File

@ -97,7 +97,7 @@
print(&quot;Also the button component is passed in callback params&quot;) print(&quot;Also the button component is passed in callback params&quot;)
end end
local custom_args = &quot;Any variable to pass inside callback&quot; local custom_args = &quot;any variable to pass inside callback&quot;
local button = self.druid:new_button(&quot;button_name&quot;, on_button_click, custom_args) local button = self.druid:new_button(&quot;button_name&quot;, on_button_click, custom_args)
</pre> </pre>
</ul> </ul>
@ -254,7 +254,7 @@ local button = self.druid:new_button(&quot;button_name&quot;, on_button_click, c
<a href="../modules/Button.html#">Button</a> <a href="../modules/Button.html#">Button</a>
</li> </li>
<li><span class="parameter">node</span> <li><span class="parameter">node</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">Node</span></span> <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <a class="type" href="../modules/Button.html#node">node</a></span>
Node name or GUI Node itself Node name or GUI Node itself
</li> </li>
<li><span class="parameter">callback</span> <li><span class="parameter">callback</span>
@ -267,7 +267,7 @@ local button = self.druid:new_button(&quot;button_name&quot;, on_button_click, c
(<em>optional</em>) (<em>optional</em>)
</li> </li>
<li><span class="parameter">anim_node</span> <li><span class="parameter">anim_node</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">Node</span></span> <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <a class="type" href="../modules/Button.html#node">node</a></span>
Node to animate instead of trigger node. Node to animate instead of trigger node.
(<em>optional</em>) (<em>optional</em>)
</li> </li>
@ -298,8 +298,8 @@ local button = self.druid:new_button(&quot;button_name&quot;, on_button_click, c
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
True, if button is enabled now, False overwise @True, if button is enabled now, False overwise
</ol> </ol>
@ -401,7 +401,7 @@ local button = self.druid:new_button(&quot;button_name&quot;, on_button_click, c
<a href="../modules/Button.html#">Button</a> <a href="../modules/Button.html#">Button</a>
</li> </li>
<li><span class="parameter">state</span> <li><span class="parameter">state</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
Enabled state Enabled state
</li> </li>
</ul> </ul>
@ -529,23 +529,23 @@ button:set_enabled(<span class="keyword">true</span>)</pre>
</li> </li>
<li><span class="parameter">on_click</span> <li><span class="parameter">on_click</span>
<span class="types"><span class="type">function</span></span> <span class="types"><span class="type">function</span></span>
(self, node) function(self, node)
</li> </li>
<li><span class="parameter">on_click_disabled</span> <li><span class="parameter">on_click_disabled</span>
<span class="types"><span class="type">function</span></span> <span class="types"><span class="type">function</span></span>
(self, node) function(self, node)
</li> </li>
<li><span class="parameter">on_hover</span> <li><span class="parameter">on_hover</span>
<span class="types"><span class="type">function</span></span> <span class="types"><span class="type">function</span></span>
(self, node, hover_state) function(self, node, hover_state)
</li> </li>
<li><span class="parameter">on_mouse_hover</span> <li><span class="parameter">on_mouse_hover</span>
<span class="types"><span class="type">function</span></span> <span class="types"><span class="type">function</span></span>
(self, node, hover_state) function(self, node, hover_state)
</li> </li>
<li><span class="parameter">on_set_enabled</span> <li><span class="parameter">on_set_enabled</span>
<span class="types"><span class="type">function</span></span> <span class="types"><span class="type">function</span></span>
(self, node, enabled_state) function(self, node, enabled_state)
</li> </li>
</ul> </ul>
@ -632,7 +632,7 @@ button:set_enabled(<span class="keyword">true</span>)</pre>
<ul> <ul>
<li><span class="parameter">node</span> <li><span class="parameter">node</span>
<span class="types"><span class="type">Node</span></span> <span class="types"><a class="type" href="../modules/Button.html#node">node</a></span>
</li> </li>
</ul> </ul>

View File

@ -88,7 +88,7 @@
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, node, callback[, click_node=node[, initial_state=false]])</a></td> <td class="name" nowrap><a href="#init">init(self, node, callback[, click_node=node[, initial_state=false]])</a></td>
<td class="summary">Component init function</td> <td class="summary">The <a href="../modules/Checkbox.html#">Checkbox</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#set_state">set_state(self, state, is_silent, is_instant)</a></td> <td class="name" nowrap><a href="#set_state">set_state(self, state, is_silent, is_instant)</a></td>
@ -148,7 +148,7 @@
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
Checkbox state Checkbox state
</ol> </ol>
@ -161,7 +161,7 @@
<strong>init(self, node, callback[, click_node=node[, initial_state=false]])</strong> <strong>init(self, node, callback[, click_node=node[, initial_state=false]])</strong>
</dt> </dt>
<dd> <dd>
Component init function The <a href="../modules/Checkbox.html#">Checkbox</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>
@ -210,15 +210,15 @@
<a href="../modules/Checkbox.html#">Checkbox</a> <a href="../modules/Checkbox.html#">Checkbox</a>
</li> </li>
<li><span class="parameter">state</span> <li><span class="parameter">state</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
Checkbox state Checkbox state
</li> </li>
<li><span class="parameter">is_silent</span> <li><span class="parameter">is_silent</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
Don't trigger on_change_state if true Don't trigger on_change_state if true
</li> </li>
<li><span class="parameter">is_instant</span> <li><span class="parameter">is_instant</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
If instant checkbox change If instant checkbox change
</li> </li>
</ul> </ul>

View File

@ -87,7 +87,7 @@
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, nodes, callback[, click_nodes=node])</a></td> <td class="name" nowrap><a href="#init">init(self, nodes, callback[, click_nodes=node])</a></td>
<td class="summary">Component init function</td> <td class="summary">The <a href="../modules/CheckboxGroup.html#">CheckboxGroup</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#set_state">set_state(self, indexes, is_instant)</a></td> <td class="name" nowrap><a href="#set_state">set_state(self, indexes, is_instant)</a></td>
@ -132,7 +132,7 @@
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">bool[]</span></span> <span class="types"><span class="type">boolean[]</span></span>
Array if checkboxes state Array if checkboxes state
</ol> </ol>
@ -145,7 +145,7 @@
<strong>init(self, nodes, callback[, click_nodes=node])</strong> <strong>init(self, nodes, callback[, click_nodes=node])</strong>
</dt> </dt>
<dd> <dd>
Component init function The <a href="../modules/CheckboxGroup.html#">CheckboxGroup</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>
@ -189,7 +189,7 @@
<a href="../modules/CheckboxGroup.html#">CheckboxGroup</a> <a href="../modules/CheckboxGroup.html#">CheckboxGroup</a>
</li> </li>
<li><span class="parameter">indexes</span> <li><span class="parameter">indexes</span>
<span class="types"><span class="type">bool[]</span></span> <span class="types"><span class="type">boolean[]</span></span>
Array of checkbox state Array of checkbox state
</li> </li>
<li><span class="parameter">is_instant</span> <li><span class="parameter">is_instant</span>

View File

@ -117,7 +117,7 @@
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, scroll, grid, create_function)</a></td> <td class="name" nowrap><a href="#init">init(self, scroll, grid, create_function)</a></td>
<td class="summary">Data list constructor</td> <td class="summary">The <a href="../modules/DataList.html#">DataList</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#on_remove">on_remove(self)</a></td> <td class="name" nowrap><a href="#on_remove">on_remove(self)</a></td>
@ -242,7 +242,7 @@
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">Node[]</span></span> <span class="types"><span class="type">node[]</span></span>
List of created nodes List of created nodes
</ol> </ol>
@ -370,7 +370,7 @@
<strong>init(self, scroll, grid, create_function)</strong> <strong>init(self, scroll, grid, create_function)</strong>
</dt> </dt>
<dd> <dd>
Data list constructor The <a href="../modules/DataList.html#">DataList</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>

View File

@ -88,7 +88,7 @@
<table class="function_list"> <table class="function_list">
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, node, on_drag_callback)</a></td> <td class="name" nowrap><a href="#init">init(self, node, on_drag_callback)</a></td>
<td class="summary">Drag component constructor</td> <td class="summary">The <a href="../modules/Drag.html#">Drag</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td> <td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td>
@ -174,7 +174,7 @@
<strong>init(self, node, on_drag_callback)</strong> <strong>init(self, node, on_drag_callback)</strong>
</dt> </dt>
<dd> <dd>
Drag component constructor The <a href="../modules/Drag.html#">Drag</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>
@ -217,7 +217,7 @@
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
</ol> </ol>
@ -266,7 +266,7 @@
<a href="../modules/Drag.html#">Drag</a> <a href="../modules/Drag.html#">Drag</a>
</li> </li>
<li><span class="parameter">is_enabled</span> <li><span class="parameter">is_enabled</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
</li> </li>
</ul> </ul>
@ -323,7 +323,7 @@
<ul> <ul>
<li><span class="parameter">can_x</span> <li><span class="parameter">can_x</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
</li> </li>
</ul> </ul>
@ -343,7 +343,7 @@
<ul> <ul>
<li><span class="parameter">can_y</span> <li><span class="parameter">can_y</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
</li> </li>
</ul> </ul>
@ -363,7 +363,7 @@
<ul> <ul>
<li><span class="parameter">is_drag</span> <li><span class="parameter">is_drag</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
</li> </li>
</ul> </ul>
@ -383,7 +383,7 @@
<ul> <ul>
<li><span class="parameter">is_touch</span> <li><span class="parameter">is_touch</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
</li> </li>
</ul> </ul>

View File

@ -191,7 +191,7 @@
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
True if event have handlers True if event have handlers
</ol> </ol>
@ -222,7 +222,7 @@
Callback itself Callback itself
</li> </li>
<li><span class="parameter">context</span> <li><span class="parameter">context</span>
<span class="types"><span class="type">Any</span></span> <span class="types"><span class="type">any</span></span>
Additional context as first param to callback call, usually it's self Additional context as first param to callback call, usually it's self
(<em>optional</em>) (<em>optional</em>)
</li> </li>
@ -257,7 +257,7 @@ button.on_long_click:subscribe(on_long_callback, self)</pre>
<a href="../modules/DruidEvent.html#">DruidEvent</a> <a href="../modules/DruidEvent.html#">DruidEvent</a>
</li> </li>
<li><span class="parameter">...</span> <li><span class="parameter">...</span>
<span class="types"><span class="type">Any</span></span> <span class="types"><span class="type">any</span></span>
All event params All event params
</li> </li>
</ul> </ul>
@ -293,7 +293,7 @@ event:trigger(<span class="string">"Param1"</span>, <span class="string">"Param2
Callback itself Callback itself
</li> </li>
<li><span class="parameter">context</span> <li><span class="parameter">context</span>
<span class="types"><span class="type">Any</span></span> <span class="types"><span class="type">any</span></span>
Additional context as first param to callback call Additional context as first param to callback call
(<em>optional</em>) (<em>optional</em>)
</li> </li>

View File

@ -178,7 +178,7 @@ end
<td class="summary">Create <a href="../modules/DynamicGrid.html#">DynamicGrid</a> component</td> <td class="summary">Create <a href="../modules/DynamicGrid.html#">DynamicGrid</a> component</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#new_hotkey">new_hotkey(self, keys_array, callback[, params])</a></td> <td class="name" nowrap><a href="#new_hotkey">new_hotkey(self, keys_array, callback[, callback_argument])</a></td>
<td class="summary">Create <a href="../modules/Hotkey.html#">Hotkey</a> component</td> <td class="summary">Create <a href="../modules/Hotkey.html#">Hotkey</a> component</td>
</tr> </tr>
<tr> <tr>
@ -302,11 +302,11 @@ end
</li> </li>
<li><span class="parameter">component</span> <li><span class="parameter">component</span>
<span class="types"><span class="type">Component</span></span> <span class="types"><span class="type">BaseComponent</span></span>
Component module Component module
</li> </li>
<li><span class="parameter">...</span> <li><span class="parameter">...</span>
<span class="types"><span class="type">args</span></span> <span class="types"><span class="type">any</span></span>
Other component params to pass it to component:init function Other component params to pass it to component:init function
</li> </li>
</ul> </ul>
@ -331,8 +331,8 @@ end
</li> </li>
<li><span class="parameter">callback</span> <li><span class="parameter">callback</span>
<span class="types"><span class="type">callback</span></span> <span class="types"><span class="type">function</span></span>
On back button @The callback(self, custom_args) to call on back event
</li> </li>
<li><span class="parameter">params</span> <li><span class="parameter">params</span>
<span class="types"><span class="type">any</span></span> <span class="types"><span class="type">any</span></span>
@ -532,8 +532,8 @@ end
The Scroll instance for Data List component The Scroll instance for Data List component
</li> </li>
<li><span class="parameter">druid_grid</span> <li><span class="parameter">druid_grid</span>
<span class="types"><span class="type">Grid</span></span> <span class="types"><span class="type">StaticGrid</span> or <span class="type">DynamicGrid</span></span>
The Grid instance for Data List component The <a href="../modules/StaticGrid.html#">StaticGrid</a> or <a href="../modules/DynamicGrid.html#">DynamicGrid</a> instance for Data List component
</li> </li>
<li><span class="parameter">create_function</span> <li><span class="parameter">create_function</span>
<span class="types"><span class="type">function</span></span> <span class="types"><span class="type">function</span></span>
@ -620,7 +620,7 @@ end
</dd> </dd>
<dt> <dt>
<a name = "new_hotkey"></a> <a name = "new_hotkey"></a>
<strong>new_hotkey(self, keys_array, callback[, params])</strong> <strong>new_hotkey(self, keys_array, callback[, callback_argument])</strong>
</dt> </dt>
<dd> <dd>
Create <a href="../modules/Hotkey.html#">Hotkey</a> component Create <a href="../modules/Hotkey.html#">Hotkey</a> component
@ -638,11 +638,11 @@ end
</li> </li>
<li><span class="parameter">callback</span> <li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span> <span class="types"><span class="type">function</span></span>
Button callback The callback function
</li> </li>
<li><span class="parameter">params</span> <li><span class="parameter">callback_argument</span>
<span class="types"><span class="type">value</span></span> <span class="types"><span class="type">any</span></span>
Button callback params The argument to pass into the callback function
(<em>optional</em>) (<em>optional</em>)
</li> </li>
</ul> </ul>
@ -756,7 +756,7 @@ end
Default locale id Default locale id
</li> </li>
<li><span class="parameter">no_adjust</span> <li><span class="parameter">no_adjust</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
If true, will not correct text size If true, will not correct text size
</li> </li>
</ul> </ul>
@ -1099,7 +1099,7 @@ end
(<em>optional</em>) (<em>optional</em>)
</li> </li>
<li><span class="parameter">no_adjust</span> <li><span class="parameter">no_adjust</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
If true, text will be not auto-adjust size If true, text will be not auto-adjust size
(<em>optional</em>) (<em>optional</em>)
</li> </li>
@ -1189,7 +1189,7 @@ end
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
The boolean value is input was consumed The boolean value is input was consumed
</ol> </ol>
@ -1247,7 +1247,7 @@ end
</li> </li>
<li><span class="parameter">component</span> <li><span class="parameter">component</span>
<span class="types"><span class="type">Component</span></span> <span class="types"><span class="type">BaseComponent</span></span>
Component instance Component instance
</li> </li>
</ul> </ul>
@ -1274,7 +1274,7 @@ end
<a href="../modules/DruidInstance.html#">DruidInstance</a> <a href="../modules/DruidInstance.html#">DruidInstance</a>
</li> </li>
<li><span class="parameter">blacklist_components</span> <li><span class="parameter">blacklist_components</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a> or <span class="type">Component</span></span> <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a> or <span class="type">BaseComponent</span></span>
The array of component to blacklist The array of component to blacklist
(<em>default</em> nil) (<em>default</em> nil)
</li> </li>
@ -1308,7 +1308,7 @@ end
</li> </li>
<li><span class="parameter">whitelist_components</span> <li><span class="parameter">whitelist_components</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a> or <span class="type">Component</span></span> <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a> or <span class="type">BaseComponent</span></span>
The array of component to whitelist The array of component to whitelist
(<em>default</em> nil) (<em>default</em> nil)
</li> </li>

View File

@ -119,7 +119,7 @@
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, parent)</a></td> <td class="name" nowrap><a href="#init">init(self, parent)</a></td>
<td class="summary">Component init function</td> <td class="summary">The <a href="../modules/DynamicGrid.html#">DynamicGrid</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#remove">remove(self, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]])</a></td> <td class="name" nowrap><a href="#remove">remove(self, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]])</a></td>
@ -467,7 +467,7 @@
<strong>init(self, parent)</strong> <strong>init(self, parent)</strong>
</dt> </dt>
<dd> <dd>
Component init function The <a href="../modules/DynamicGrid.html#">DynamicGrid</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>

View File

@ -143,7 +143,7 @@ helper.centrate_nodes(0, node_1, node_2)
<td class="summary">Get text metric from GUI node.</td> <td class="summary">Get text metric from GUI node.</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#helper.insert_with_shift">helper.insert_with_shift(array, item[, index[, shift_policy]])</a></td> <td class="name" nowrap><a href="#helper.insert_with_shift">helper.insert_with_shift(array, any[, index[, shift_policy]])</a></td>
<td class="summary">Add value to array with shift policy</td> <td class="summary">Add value to array with shift policy</td>
</tr> </tr>
<tr> <tr>
@ -198,11 +198,11 @@ helper.centrate_nodes(0, node_1, node_2)
<h3>Parameters:</h3> <h3>Parameters:</h3>
<ul> <ul>
<li><span class="parameter">target</span> <li><span class="parameter">target</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span> <span class="types"><span class="type">any[]</span></span>
Array to put elements from source Array to put elements from source
</li> </li>
<li><span class="parameter">source</span> <li><span class="parameter">source</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span> <span class="types"><span class="type">any[]</span></span>
The source array to get elements from The source array to get elements from
(<em>optional</em>) (<em>optional</em>)
</li> </li>
@ -211,7 +211,7 @@ helper.centrate_nodes(0, node_1, node_2)
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">array</span></span> <span class="types"><span class="type">any[]</span></span>
The target array The target array
</ol> </ol>
@ -471,8 +471,8 @@ helper.centrate_nodes(0, node_1, node_2)
<h3>Parameters:</h3> <h3>Parameters:</h3>
<ul> <ul>
<li><span class="parameter">pivot</span> <li><span class="parameter">pivot</span>
<span class="types"><span class="type">gui.pivot</span></span> <span class="types"><span class="type">number</span></span>
The node pivot The gui.PIVOT_* constant
</li> </li>
</ul> </ul>
@ -529,7 +529,7 @@ helper.centrate_nodes(0, node_1, node_2)
Gui node Gui node
</li> </li>
<li><span class="parameter">include_passed_node_scale</span> <li><span class="parameter">include_passed_node_scale</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
True if add current node scale to result True if add current node scale to result
</li> </li>
</ul> </ul>
@ -579,7 +579,7 @@ helper.centrate_nodes(0, node_1, node_2)
<h3>Parameters:</h3> <h3>Parameters:</h3>
<ul> <ul>
<li><span class="parameter">text_node</span> <li><span class="parameter">text_node</span>
<span class="types"><span class="type">Node</span></span> <span class="types"><span class="type">node</span></span>
</li> </li>
</ul> </ul>
@ -606,7 +606,7 @@ helper.centrate_nodes(0, node_1, node_2)
</dd> </dd>
<dt> <dt>
<a name = "helper.insert_with_shift"></a> <a name = "helper.insert_with_shift"></a>
<strong>helper.insert_with_shift(array, item[, index[, shift_policy]])</strong> <strong>helper.insert_with_shift(array, any[, index[, shift_policy]])</strong>
</dt> </dt>
<dd> <dd>
Add value to array with shift policy Shift policy can be: left, right, no_shift Add value to array with shift policy Shift policy can be: left, right, no_shift
@ -618,7 +618,7 @@ helper.centrate_nodes(0, node_1, node_2)
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span> <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Array Array
</li> </li>
<li><span class="parameter">item</span> <li><span class="parameter">any</span>
Item to insert Item to insert
</li> </li>
<li><span class="parameter">index</span> <li><span class="parameter">index</span>
@ -627,8 +627,8 @@ helper.centrate_nodes(0, node_1, node_2)
(<em>optional</em>) (<em>optional</em>)
</li> </li>
<li><span class="parameter">shift_policy</span> <li><span class="parameter">shift_policy</span>
<span class="types"><span class="type">const.SHIFT</span></span> <span class="types"><span class="type">number</span></span>
Shift policy The druid_const.SHIFT.* constant
(<em>optional</em>) (<em>optional</em>)
</li> </li>
</ul> </ul>
@ -636,7 +636,7 @@ helper.centrate_nodes(0, node_1, node_2)
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">item</span></span> <span class="types"><span class="type">any</span></span>
Inserted item Inserted item
</ol> </ol>
@ -656,7 +656,7 @@ helper.centrate_nodes(0, node_1, node_2)
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
Is mobile Is mobile
</ol> </ol>
@ -676,7 +676,7 @@ helper.centrate_nodes(0, node_1, node_2)
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
Is web Is web
</ol> </ol>
@ -739,8 +739,8 @@ helper.centrate_nodes(0, node_1, node_2)
(<em>optional</em>) (<em>optional</em>)
</li> </li>
<li><span class="parameter">shift_policy</span> <li><span class="parameter">shift_policy</span>
<span class="types"><span class="type">const.SHIFT</span></span> <span class="types"><span class="type">number</span></span>
Shift policy The druid_const.SHIFT.* constant
(<em>optional</em>) (<em>optional</em>)
</li> </li>
</ul> </ul>
@ -748,7 +748,7 @@ helper.centrate_nodes(0, node_1, node_2)
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">item</span></span> <span class="types"><span class="type">any</span></span>
Removed item Removed item
</ol> </ol>

View File

@ -88,7 +88,7 @@
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, keys, callback[, callback_argument])</a></td> <td class="name" nowrap><a href="#init">init(self, keys, callback[, callback_argument])</a></td>
<td class="summary">Component init function</td> <td class="summary">The <a href="../modules/Hotkey.html#">Hotkey</a> constructor</td>
</tr> </tr>
</table> </table>
<h2><a href="#Tables">Tables</a></h2> <h2><a href="#Tables">Tables</a></h2>
@ -144,7 +144,7 @@
that have to be pressed before key pressed to activate that have to be pressed before key pressed to activate
</li> </li>
<li><span class="parameter">callback_argument</span> <li><span class="parameter">callback_argument</span>
<span class="types"><span class="type">value</span></span> <span class="types"><span class="type">any</span></span>
The argument to pass into the callback function The argument to pass into the callback function
(<em>optional</em>) (<em>optional</em>)
</li> </li>
@ -160,7 +160,7 @@
<strong>init(self, keys, callback[, callback_argument])</strong> <strong>init(self, keys, callback[, callback_argument])</strong>
</dt> </dt>
<dd> <dd>
Component init function The <a href="../modules/Hotkey.html#">Hotkey</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>
@ -178,7 +178,7 @@
The callback function The callback function
</li> </li>
<li><span class="parameter">callback_argument</span> <li><span class="parameter">callback_argument</span>
<span class="types"><span class="type">value</span></span> <span class="types"><span class="type">any</span></span>
The argument to pass into the callback function The argument to pass into the callback function
(<em>optional</em>) (<em>optional</em>)
</li> </li>

View File

@ -83,7 +83,7 @@
<table class="function_list"> <table class="function_list">
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, node, on_hover_callback)</a></td> <td class="name" nowrap><a href="#init">init(self, node, on_hover_callback)</a></td>
<td class="summary">Component init function</td> <td class="summary">The <a href="../modules/Hover.html#">Hover</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td> <td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td>
@ -138,7 +138,7 @@
<strong>init(self, node, on_hover_callback)</strong> <strong>init(self, node, on_hover_callback)</strong>
</dt> </dt>
<dd> <dd>
Component init function The <a href="../modules/Hover.html#">Hover</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>
@ -181,7 +181,7 @@
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
The hover enabled state The hover enabled state
</ol> </ol>
@ -208,7 +208,7 @@
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
The current hovered state The current hovered state
</ol> </ol>
@ -235,7 +235,7 @@
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
The current hovered state The current hovered state
</ol> </ol>
@ -286,7 +286,7 @@
<a href="../modules/Hover.html#">Hover</a> <a href="../modules/Hover.html#">Hover</a>
</li> </li>
<li><span class="parameter">state</span> <li><span class="parameter">state</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
The hover enabled state The hover enabled state
</li> </li>
</ul> </ul>
@ -311,7 +311,7 @@
<a href="../modules/Hover.html#">Hover</a> <a href="../modules/Hover.html#">Hover</a>
</li> </li>
<li><span class="parameter">state</span> <li><span class="parameter">state</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
The hover state The hover state
</li> </li>
</ul> </ul>
@ -336,7 +336,7 @@
<a href="../modules/Hover.html#">Hover</a> <a href="../modules/Hover.html#">Hover</a>
</li> </li>
<li><span class="parameter">state</span> <li><span class="parameter">state</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
The mouse hover state The mouse hover state
</li> </li>
</ul> </ul>

View File

@ -94,7 +94,7 @@
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, click_node, text_node[, keyboard_type])</a></td> <td class="name" nowrap><a href="#init">init(self, click_node, text_node[, keyboard_type])</a></td>
<td class="summary">Component init function</td> <td class="summary">The <a href="../modules/Input.html#">Input</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#reset_changes">reset_changes(self)</a></td> <td class="name" nowrap><a href="#reset_changes">reset_changes(self)</a></td>
@ -223,7 +223,7 @@
<strong>init(self, click_node, text_node[, keyboard_type])</strong> <strong>init(self, click_node, text_node[, keyboard_type])</strong>
</dt> </dt>
<dd> <dd>
Component init function The <a href="../modules/Input.html#">Input</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>
@ -422,7 +422,7 @@
<h3>Fields:</h3> <h3>Fields:</h3>
<ul> <ul>
<li><span class="parameter">IS_LONGTAP_ERASE</span> <li><span class="parameter">IS_LONGTAP_ERASE</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
Is long tap will erase current input data Is long tap will erase current input data
(<em>default</em> false) (<em>default</em> false)
</li> </li>
@ -432,12 +432,12 @@
(<em>default</em> *) (<em>default</em> *)
</li> </li>
<li><span class="parameter">IS_UNSELECT_ON_RESELECT</span> <li><span class="parameter">IS_UNSELECT_ON_RESELECT</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
If true, call unselect on select selected input If true, call unselect on select selected input
(<em>default</em> false) (<em>default</em> false)
</li> </li>
<li><span class="parameter">NO_CONSUME_INPUT_WHILE_SELECTED</span> <li><span class="parameter">NO_CONSUME_INPUT_WHILE_SELECTED</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
If true, will not consume input while input is selected. It's allow to interact with other components while input is selected (text input still captured) If true, will not consume input while input is selected. It's allow to interact with other components while input is selected (text input still captured)
(<em>default</em> false) (<em>default</em> false)
</li> </li>
@ -519,7 +519,7 @@
<ul> <ul>
<li><span class="parameter">is_empty</span> <li><span class="parameter">is_empty</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
</li> </li>
</ul> </ul>
@ -539,7 +539,7 @@
<ul> <ul>
<li><span class="parameter">is_selected</span> <li><span class="parameter">is_selected</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
</li> </li>
</ul> </ul>

View File

@ -95,7 +95,7 @@
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, node, mode[, on_size_changed_callback])</a></td> <td class="name" nowrap><a href="#init">init(self, node, mode[, on_size_changed_callback])</a></td>
<td class="summary">Component init function</td> <td class="summary">The <a href="../modules/Layout.html#">Layout</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#set_max_gui_upscale">set_max_gui_upscale(self, max_gui_upscale)</a></td> <td class="name" nowrap><a href="#set_max_gui_upscale">set_max_gui_upscale(self, max_gui_upscale)</a></td>
@ -156,7 +156,7 @@
<a href="../modules/Layout.html#">Layout</a> <a href="../modules/Layout.html#">Layout</a>
</li> </li>
<li><span class="parameter">node</span> <li><span class="parameter">node</span>
<span class="types"><span class="type">Node</span></span> <span class="types"><a class="type" href="../modules/Layout.html#node">node</a></span>
(<em>optional</em>) (<em>optional</em>)
</li> </li>
@ -236,7 +236,7 @@
<strong>init(self, node, mode[, on_size_changed_callback])</strong> <strong>init(self, node, mode[, on_size_changed_callback])</strong>
</dt> </dt>
<dd> <dd>
Component init function The <a href="../modules/Layout.html#">Layout</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>

View File

@ -84,7 +84,7 @@
<table class="function_list"> <table class="function_list">
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, callback, template, nodes)</a></td> <td class="name" nowrap><a href="#init">init(self, callback, template, nodes)</a></td>
<td class="summary">Component init function</td> <td class="summary">The <a href="../modules/PinKnob.html#">PinKnob</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#set_angle">set_angle(self, cur_value, min, max)</a></td> <td class="name" nowrap><a href="#set_angle">set_angle(self, cur_value, min, max)</a></td>
@ -123,7 +123,7 @@
<strong>init(self, callback, template, nodes)</strong> <strong>init(self, callback, template, nodes)</strong>
</dt> </dt>
<dd> <dd>
Component init function The <a href="../modules/PinKnob.html#">PinKnob</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>
@ -256,7 +256,7 @@
<ul> <ul>
<li><span class="parameter">is_drag</span> <li><span class="parameter">is_drag</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
</li> </li>
</ul> </ul>

View File

@ -104,7 +104,7 @@
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, node, key[, init_value=1])</a></td> <td class="name" nowrap><a href="#init">init(self, node, key[, init_value=1])</a></td>
<td class="summary"><a href="../modules/Progress.html#">Progress</a> constructor</td> <td class="summary">The <a href="../modules/Progress.html#">Progress</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#set_max_size">set_max_size(self, max_size)</a></td> <td class="name" nowrap><a href="#set_max_size">set_max_size(self, max_size)</a></td>
@ -237,7 +237,7 @@
<strong>init(self, node, key[, init_value=1])</strong> <strong>init(self, node, key[, init_value=1])</strong>
</dt> </dt>
<dd> <dd>
<a href="../modules/Progress.html#">Progress</a> constructor The <a href="../modules/Progress.html#">Progress</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>

View File

@ -87,7 +87,7 @@
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, nodes, callback[, click_nodes=node])</a></td> <td class="name" nowrap><a href="#init">init(self, nodes, callback[, click_nodes=node])</a></td>
<td class="summary">Component init function</td> <td class="summary">The <a href="../modules/RadioGroup.html#">RadioGroup</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#set_state">set_state(self, index, is_instant)</a></td> <td class="name" nowrap><a href="#set_state">set_state(self, index, is_instant)</a></td>
@ -145,7 +145,7 @@
<strong>init(self, nodes, callback[, click_nodes=node])</strong> <strong>init(self, nodes, callback[, click_nodes=node])</strong>
</dt> </dt>
<dd> <dd>
Component init function The <a href="../modules/RadioGroup.html#">RadioGroup</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>

View File

@ -84,7 +84,7 @@
<table class="function_list"> <table class="function_list">
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, template, nodes)</a></td> <td class="name" nowrap><a href="#init">init(self, template, nodes)</a></td>
<td class="summary">Component init function</td> <td class="summary">The <a href="../modules/RichInput.html#">RichInput</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#set_placeholder">set_placeholder(self, placeholder_text)</a></td> <td class="name" nowrap><a href="#set_placeholder">set_placeholder(self, placeholder_text)</a></td>
@ -123,7 +123,7 @@
<strong>init(self, template, nodes)</strong> <strong>init(self, template, nodes)</strong>
</dt> </dt>
<dd> <dd>
Component init function The <a href="../modules/RichInput.html#">RichInput</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>

View File

@ -34,6 +34,7 @@
<ul> <ul>
<li><a href="#Functions">Functions</a></li> <li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li> <li><a href="#Tables">Tables</a></li>
<li><a href="#Fields">Fields</a></li>
</ul> </ul>
@ -163,7 +164,7 @@ type druid.rich_text.metrics = {
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, template, nodes)</a></td> <td class="name" nowrap><a href="#init">init(self, template, nodes)</a></td>
<td class="summary">Rich Text component constructor</td> <td class="summary">The <a href="../modules/RichText.html#">RichText</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#set_text">set_text(self, text)</a></td> <td class="name" nowrap><a href="#set_text">set_text(self, text)</a></td>
@ -181,6 +182,13 @@ type druid.rich_text.metrics = {
<td class="summary">Component style params.</td> <td class="summary">Component style params.</td>
</tr> </tr>
</table> </table>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#druid">druid</a></td>
<td class="summary">The component druid instance</td>
</tr>
</table>
<br/> <br/>
<br/> <br/>
@ -248,7 +256,7 @@ type druid.rich_text.metrics = {
<strong>init(self, template, nodes)</strong> <strong>init(self, template, nodes)</strong>
</dt> </dt>
<dd> <dd>
Rich Text component constructor The <a href="../modules/RichText.html#">RichText</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>
@ -415,6 +423,30 @@ Words &lt;nobr&gt;inside tag&lt;/nobr&gt; won't <span class="keyword">break</spa
</dd>
</dl>
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
<dl class="function">
<dt>
<a name = "druid"></a>
<strong>druid</strong>
</dt>
<dd>
The component druid instance
<ul>
<li><span class="parameter">druid</span>
<span class="types"><span class="type">DruidInstance</span></span>
<a href="../modules/DruidInstance.html#">DruidInstance</a>
</li>
</ul>
</dd> </dd>
</dl> </dl>

View File

@ -117,7 +117,7 @@
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, view_node, content_node)</a></td> <td class="name" nowrap><a href="#init">init(self, view_node, content_node)</a></td>
<td class="summary"><a href="../modules/Scroll.html#">Scroll</a> constructor</td> <td class="summary">The <a href="../modules/Scroll.html#">Scroll</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#is_inert">is_inert(self)</a></td> <td class="name" nowrap><a href="#is_inert">is_inert(self)</a></td>
@ -202,10 +202,6 @@
<td class="summary">Flag, if scroll now animating by gui.animate</td> <td class="summary">Flag, if scroll now animating by gui.animate</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#is_inert">is_inert</a></td>
<td class="summary">Flag, if scroll now moving by inertion</td>
</tr>
<tr>
<td class="name" nowrap><a href="#on_point_scroll">on_point_scroll</a></td> <td class="name" nowrap><a href="#on_point_scroll">on_point_scroll</a></td>
<td class="summary">On scroll_to_index function callback(self, index, point)</td> <td class="summary">On scroll_to_index function callback(self, index, point)</td>
</tr> </tr>
@ -334,7 +330,7 @@
<strong>init(self, view_node, content_node)</strong> <strong>init(self, view_node, content_node)</strong>
</dt> </dt>
<dd> <dd>
<a href="../modules/Scroll.html#">Scroll</a> constructor The <a href="../modules/Scroll.html#">Scroll</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>
@ -377,8 +373,8 @@
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
If scroll have inertion @If scroll have inertion
</ol> </ol>
@ -436,7 +432,7 @@
Target point Target point
</li> </li>
<li><span class="parameter">is_instant</span> <li><span class="parameter">is_instant</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
Instant scroll flag Instant scroll flag
(<em>optional</em>) (<em>optional</em>)
</li> </li>
@ -471,7 +467,7 @@
Point index Point index
</li> </li>
<li><span class="parameter">skip_cb</span> <li><span class="parameter">skip_cb</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
If true, skip the point callback If true, skip the point callback
(<em>optional</em>) (<em>optional</em>)
</li> </li>
@ -501,7 +497,7 @@
target percent target percent
</li> </li>
<li><span class="parameter">is_instant</span> <li><span class="parameter">is_instant</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
instant scroll flag instant scroll flag
(<em>optional</em>) (<em>optional</em>)
</li> </li>
@ -590,7 +586,7 @@
<a href="../modules/Scroll.html#">Scroll</a> <a href="../modules/Scroll.html#">Scroll</a>
</li> </li>
<li><span class="parameter">state</span> <li><span class="parameter">state</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
True, if horizontal scroll is enabled True, if horizontal scroll is enabled
</li> </li>
</ul> </ul>
@ -623,7 +619,7 @@
<a href="../modules/Scroll.html#">Scroll</a> <a href="../modules/Scroll.html#">Scroll</a>
</li> </li>
<li><span class="parameter">state</span> <li><span class="parameter">state</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
Inert scroll state Inert scroll state
</li> </li>
</ul> </ul>
@ -722,7 +718,7 @@
<a href="../modules/Scroll.html#">Scroll</a> <a href="../modules/Scroll.html#">Scroll</a>
</li> </li>
<li><span class="parameter">state</span> <li><span class="parameter">state</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
True, if vertical scroll is enabled True, if vertical scroll is enabled
</li> </li>
</ul> </ul>
@ -795,22 +791,22 @@
(<em>default</em> 0) (<em>default</em> 0)
</li> </li>
<li><span class="parameter">SMALL_CONTENT_SCROLL</span> <li><span class="parameter">SMALL_CONTENT_SCROLL</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
If true, content node with size less than view node size can be scrolled If true, content node with size less than view node size can be scrolled
(<em>default</em> false) (<em>default</em> false)
</li> </li>
<li><span class="parameter">WHEEL_SCROLL_SPEED</span> <li><span class="parameter">WHEEL_SCROLL_SPEED</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
The scroll speed via mouse wheel scroll or touchpad. Set to 0 to disable wheel scrolling The scroll speed via mouse wheel scroll or touchpad. Set to 0 to disable wheel scrolling
(<em>default</em> 0) (<em>default</em> 0)
</li> </li>
<li><span class="parameter">WHEEL_SCROLL_INVERTED</span> <li><span class="parameter">WHEEL_SCROLL_INVERTED</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
If true, invert direction for touchpad and mouse wheel scroll If true, invert direction for touchpad and mouse wheel scroll
(<em>default</em> false) (<em>default</em> false)
</li> </li>
<li><span class="parameter">WHEEL_SCROLL_BY_INERTION</span> <li><span class="parameter">WHEEL_SCROLL_BY_INERTION</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
If true, wheel will add inertion to scroll. Direct set position otherwise. If true, wheel will add inertion to scroll. Direct set position otherwise.
(<em>default</em> false) (<em>default</em> false)
</li> </li>
@ -935,27 +931,7 @@
<ul> <ul>
<li><span class="parameter">is_animate</span> <li><span class="parameter">is_animate</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
</li>
</ul>
</dd>
<dt>
<a name = "is_inert"></a>
<strong>is_inert</strong>
</dt>
<dd>
Flag, if scroll now moving by inertion
<ul>
<li><span class="parameter">is_inert</span>
<span class="types"><span class="type">bool</span></span>
</li> </li>
</ul> </ul>

View File

@ -83,7 +83,7 @@
<table class="function_list"> <table class="function_list">
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, node, end_pos[, callback])</a></td> <td class="name" nowrap><a href="#init">init(self, node, end_pos[, callback])</a></td>
<td class="summary">Component init function</td> <td class="summary">The <a href="../modules/Slider.html#">Slider</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#set">set(self, value[, is_silent])</a></td> <td class="name" nowrap><a href="#set">set(self, value[, is_silent])</a></td>
@ -150,7 +150,7 @@
<strong>init(self, node, end_pos[, callback])</strong> <strong>init(self, node, end_pos[, callback])</strong>
</dt> </dt>
<dd> <dd>
Component init function The <a href="../modules/Slider.html#">Slider</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>
@ -198,7 +198,7 @@
Value from 0 to 1 Value from 0 to 1
</li> </li>
<li><span class="parameter">is_silent</span> <li><span class="parameter">is_silent</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
Don't trigger event if true Don't trigger event if true
(<em>optional</em>) (<em>optional</em>)
</li> </li>
@ -227,7 +227,7 @@
<a href="../modules/Slider.html#">Slider</a> <a href="../modules/Slider.html#">Slider</a>
</li> </li>
<li><span class="parameter">input_node</span> <li><span class="parameter">input_node</span>
<span class="types"><span class="type">Node</span></span> <span class="types"><a class="type" href="../modules/Slider.html#node">node</a></span>
</li> </li>
</ul> </ul>
@ -333,7 +333,7 @@
<ul> <ul>
<li><span class="parameter">is_drag</span> <li><span class="parameter">is_drag</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
</li> </li>
</ul> </ul>

View File

@ -463,7 +463,7 @@
<ol> <ol>
<span class="types"><span class="type">vector3</span></span> <span class="types"><span class="type">vector3</span></span>
Node position @Node position
</ol> </ol>
@ -512,7 +512,7 @@
<a href="../modules/StaticGrid.html#">StaticGrid</a> <a href="../modules/StaticGrid.html#">StaticGrid</a>
</li> </li>
<li><span class="parameter">parent</span> <li><span class="parameter">parent</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">Node</span></span> <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
The GUI Node container, where grid's items will be placed The GUI Node container, where grid's items will be placed
</li> </li>
<li><span class="parameter">element</span> <li><span class="parameter">element</span>
@ -564,7 +564,7 @@
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">Node</span></span> <span class="types"><span class="type">node</span></span>
The deleted gui node from grid The deleted gui node from grid
</ol> </ol>
@ -677,12 +677,12 @@
<h3>Fields:</h3> <h3>Fields:</h3>
<ul> <ul>
<li><span class="parameter">IS_DYNAMIC_NODE_POSES</span> <li><span class="parameter">IS_DYNAMIC_NODE_POSES</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
If true, always center grid content as grid pivot sets If true, always center grid content as grid pivot sets
(<em>default</em> false) (<em>default</em> false)
</li> </li>
<li><span class="parameter">IS_ALIGN_LAST_ROW</span> <li><span class="parameter">IS_ALIGN_LAST_ROW</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
If true, always align last row of the grid as grid pivot sets If true, always align last row of the grid as grid pivot sets
(<em>default</em> false) (<em>default</em> false)
</li> </li>

View File

@ -87,7 +87,7 @@
<table class="function_list"> <table class="function_list">
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, node, on_swipe_callback)</a></td> <td class="name" nowrap><a href="#init">init(self, node, on_swipe_callback)</a></td>
<td class="summary">Component init function</td> <td class="summary">The <a href="../modules/Swipe.html#">Swipe</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(self, zone)</a></td> <td class="name" nowrap><a href="#set_click_zone">set_click_zone(self, zone)</a></td>
@ -129,7 +129,7 @@
<strong>init(self, node, on_swipe_callback)</strong> <strong>init(self, node, on_swipe_callback)</strong>
</dt> </dt>
<dd> <dd>
Component init function The <a href="../modules/Swipe.html#">Swipe</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>
@ -206,7 +206,7 @@
(<em>default</em> 50) (<em>default</em> 50)
</li> </li>
<li><span class="parameter">SWIPE_TRIGGER_ON_MOVE</span> <li><span class="parameter">SWIPE_TRIGGER_ON_MOVE</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
If true, trigger on swipe moving, not only release action If true, trigger on swipe moving, not only release action
(<em>default</em> false) (<em>default</em> false)
</li> </li>

View File

@ -110,7 +110,7 @@
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, node[, value[, adjust_type=downscale]])</a></td> <td class="name" nowrap><a href="#init">init(self, node[, value[, adjust_type=downscale]])</a></td>
<td class="summary"><a href="../modules/Text.html#">Text</a> constructor</td> <td class="summary">The <a href="../modules/Text.html#">Text</a> constructor</td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap><a href="#is_multiline">is_multiline(self)</a></td> <td class="name" nowrap><a href="#is_multiline">is_multiline(self)</a></td>
@ -280,7 +280,7 @@
<strong>init(self, node[, value[, adjust_type=downscale]])</strong> <strong>init(self, node[, value[, adjust_type=downscale]])</strong>
</dt> </dt>
<dd> <dd>
<a href="../modules/Text.html#">Text</a> constructor The <a href="../modules/Text.html#">Text</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>
@ -329,7 +329,7 @@
<h3>Returns:</h3> <h3>Returns:</h3>
<ol> <ol>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
Is text node with line break Is text node with line break
</ol> </ol>
@ -445,8 +445,8 @@
<a href="../modules/Text.html#">Text</a> <a href="../modules/Text.html#">Text</a>
</li> </li>
<li><span class="parameter">pivot</span> <li><span class="parameter">pivot</span>
<span class="types"><span class="type">gui.pivot</span></span> <span class="types"><span class="type">number</span></span>
Gui pivot constant The gui.PIVOT_* constant
</li> </li>
</ul> </ul>

View File

@ -85,7 +85,7 @@
<table class="function_list"> <table class="function_list">
<tr> <tr>
<td class="name" nowrap><a href="#init">init(self, node, seconds_from[, seconds_to=0[, callback]])</a></td> <td class="name" nowrap><a href="#init">init(self, node, seconds_from[, seconds_to=0[, callback]])</a></td>
<td class="summary">Component init function</td> <td class="summary">The <a href="../modules/Timer.html#">Timer</a> constructor</td>
</tr> </tr>
<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(self, from, to)</a></td>
@ -144,7 +144,7 @@
<strong>init(self, node, seconds_from[, seconds_to=0[, callback]])</strong> <strong>init(self, node, seconds_from[, seconds_to=0[, callback]])</strong>
</dt> </dt>
<dd> <dd>
Component init function The <a href="../modules/Timer.html#">Timer</a> constructor
<h3>Parameters:</h3> <h3>Parameters:</h3>
@ -222,7 +222,7 @@
<a href="../modules/Timer.html#">Timer</a> <a href="../modules/Timer.html#">Timer</a>
</li> </li>
<li><span class="parameter">is_on</span> <li><span class="parameter">is_on</span>
<span class="types"><span class="type">bool</span></span> <span class="types"><span class="type">boolean</span></span>
Timer enable state Timer enable state
</li> </li>
</ul> </ul>

File diff suppressed because it is too large Load Diff

View File

@ -45,7 +45,7 @@ local BackHandler = component.create("back_handler")
--- The @{BackHandler} constructor --- The @{BackHandler} constructor
-- @tparam BackHandler self @{BackHandler} -- @tparam BackHandler self @{BackHandler}
-- @tparam callback callback On back button -- @tparam function callback @The callback(self, custom_args) to call on back event
-- @tparam[opt] any custom_args Button events custom arguments -- @tparam[opt] any custom_args Button events custom arguments
-- @local -- @local
function BackHandler.init(self, callback, custom_args) function BackHandler.init(self, callback, custom_args)

View File

@ -30,7 +30,7 @@ local component = require("druid.component")
local Blocker = component.create("blocker") local Blocker = component.create("blocker")
--- @{Blocker} constructor --- The @{Blocker} constructor
-- @tparam Blocker self @{Blocker} -- @tparam Blocker self @{Blocker}
-- @tparam node node Gui node -- @tparam node node Gui node
function Blocker.init(self, node) function Blocker.init(self, node)
@ -71,7 +71,7 @@ end
-- --
-- Don't change node enabled state itself. -- Don't change node enabled state itself.
-- @tparam Blocker self @{Blocker} -- @tparam Blocker self @{Blocker}
-- @tparam bool state Enabled state -- @tparam boolean state Enabled state
function Blocker.set_enabled(self, state) function Blocker.set_enabled(self, state)
self._is_enabled = state self._is_enabled = state
end end
@ -79,7 +79,7 @@ end
--- Return blocker enabled state --- Return blocker enabled state
-- @tparam Blocker self @{Blocker} -- @tparam Blocker self @{Blocker}
-- @treturn bool True, if blocker is enabled -- @treturn boolean @True, if blocker is enabled
function Blocker.is_enabled(self) function Blocker.is_enabled(self)
return self._is_enabled return self._is_enabled
end end

View File

@ -27,7 +27,7 @@
-- print("Also the button component is passed in callback params") -- print("Also the button component is passed in callback params")
-- end -- end
-- --
-- local custom_args = "Any variable to pass inside callback" -- local custom_args = "any variable to pass inside callback"
-- local button = self.druid:new_button("button_name", on_button_click, custom_args) -- local button = self.druid:new_button("button_name", on_button_click, custom_args)
-- --
-- @module Button -- @module Button
@ -114,7 +114,7 @@
-- @tfield DruidEvent on_pressed @{DruidEvent} -- @tfield DruidEvent on_pressed @{DruidEvent}
--- Button trigger node --- Button trigger node
-- @tfield Node node -- @tfield node node
---The GUI node id from button node ---The GUI node id from button node
-- @tfield hash node_id -- @tfield hash node_id
@ -257,15 +257,15 @@ end
--- Component style params. --- Component style params.
-- You can override this component styles params in Druid styles table -- You can override this component styles params in Druid styles table
-- or create your own style -- or create your own style
-- @table style
-- @tfield[opt=0.4] number LONGTAP_TIME Minimum time to trigger on_hold_callback -- @tfield[opt=0.4] number LONGTAP_TIME Minimum time to trigger on_hold_callback
-- @tfield[opt=0.8] number AUTOHOLD_TRIGGER Maximum hold time to trigger button release while holding -- @tfield[opt=0.8] number AUTOHOLD_TRIGGER Maximum hold time to trigger button release while holding
-- @tfield[opt=0.4] number DOUBLETAP_TIME Time between double taps -- @tfield[opt=0.4] number DOUBLETAP_TIME Time between double taps
-- @tfield function on_click (self, node) -- @tfield function on_click function(self, node)
-- @tfield function on_click_disabled (self, node) -- @tfield function on_click_disabled function(self, node)
-- @tfield function on_hover (self, node, hover_state) -- @tfield function on_hover function(self, node, hover_state)
-- @tfield function on_mouse_hover (self, node, hover_state) -- @tfield function on_mouse_hover function(self, node, hover_state)
-- @tfield function on_set_enabled (self, node, enabled_state) -- @tfield function on_set_enabled function(self, node, enabled_state)
-- @table style
function Button.on_style_change(self, style) function Button.on_style_change(self, style)
self.style = {} self.style = {}
self.style.LONGTAP_TIME = style.LONGTAP_TIME or 0.4 self.style.LONGTAP_TIME = style.LONGTAP_TIME or 0.4
@ -282,10 +282,10 @@ end
--- The @{Button} constructor --- The @{Button} constructor
-- @tparam Button self @{Button} -- @tparam Button self @{Button}
-- @tparam string|Node node Node name or GUI Node itself -- @tparam string|node node Node name or GUI Node itself
-- @tparam function callback On click button callback -- @tparam function callback On click button callback
-- @tparam[opt] any custom_args Button events custom arguments -- @tparam[opt] any custom_args Button events custom arguments
-- @tparam[opt] string|Node anim_node Node to animate instead of trigger node. -- @tparam[opt] string|node anim_node Node to animate instead of trigger node.
function Button.init(self, node, callback, custom_args, anim_node) function Button.init(self, node, callback, custom_args, anim_node)
self.druid = self:get_druid() self.druid = self:get_druid()
self.node = self:get_node(node) self.node = self:get_node(node)
@ -447,7 +447,7 @@ end
-- The style.on_set_enabled will be triggered. -- The style.on_set_enabled will be triggered.
-- Disabled button is not clickable. -- Disabled button is not clickable.
-- @tparam Button self @{Button} -- @tparam Button self @{Button}
-- @tparam bool state Enabled state -- @tparam boolean state Enabled state
-- @treturn Button Current button instance -- @treturn Button Current button instance
-- @usage -- @usage
-- button:set_enabled(false) -- button:set_enabled(false)
@ -465,7 +465,7 @@ end
-- --
-- By default all Buttons is enabled on creating. -- By default all Buttons is enabled on creating.
-- @tparam Button self @{Button} -- @tparam Button self @{Button}
-- @treturn bool True, if button is enabled now, False overwise -- @treturn boolean @True, if button is enabled now, False overwise
-- @usage -- @usage
-- local is_enabled = button:is_enabled() -- local is_enabled = button:is_enabled()
function Button.is_enabled(self) function Button.is_enabled(self)

View File

@ -26,16 +26,16 @@
-- @tfield DruidEvent on_drag_end @{DruidEvent} -- @tfield DruidEvent on_drag_end @{DruidEvent}
--- Is component now touching --- Is component now touching
-- @tfield bool is_touch -- @tfield boolean is_touch
--- Is component now dragging --- Is component now dragging
-- @tfield bool is_drag -- @tfield boolean is_drag
--- Is drag component process vertical dragging. Default - true --- Is drag component process vertical dragging. Default - true
-- @tfield bool can_x -- @tfield boolean can_x
--- Is drag component process horizontal. Default - true --- Is drag component process horizontal. Default - true
-- @tfield bool can_y -- @tfield boolean can_y
--- Current touch x position --- Current touch x position
-- @tfield number x -- @tfield number x
@ -170,7 +170,7 @@ function Drag.on_style_change(self, style)
end end
--- Drag component constructor --- The @{Drag} constructor
-- @tparam Drag self @{Drag} -- @tparam Drag self @{Drag}
-- @tparam node node GUI node to detect dragging -- @tparam node node GUI node to detect dragging
-- @tparam function on_drag_callback Callback for on_drag_event(self, dx, dy) -- @tparam function on_drag_callback Callback for on_drag_event(self, dx, dy)
@ -313,7 +313,7 @@ end
--- Set Drag input enabled or disabled --- Set Drag input enabled or disabled
-- @tparam Drag self @{Drag} -- @tparam Drag self @{Drag}
-- @tparam bool is_enabled -- @tparam boolean is_enabled
function Drag.set_enabled(self, is_enabled) function Drag.set_enabled(self, is_enabled)
self._is_enabled = is_enabled self._is_enabled = is_enabled
end end
@ -321,7 +321,7 @@ end
--- Check if Drag component is enabled --- Check if Drag component is enabled
-- @tparam Drag self @{Drag} -- @tparam Drag self @{Drag}
-- @treturn bool -- @treturn boolean
function Drag.is_enabled(self) function Drag.is_enabled(self)
return self._is_enabled return self._is_enabled
end end

View File

@ -21,7 +21,7 @@ local component = require("druid.component")
local Hover = component.create("hover") local Hover = component.create("hover")
--- Component init function --- The @{Hover} constructor
-- @tparam Hover self @{Hover} -- @tparam Hover self @{Hover}
-- @tparam node node Gui node -- @tparam node node Gui node
-- @tparam function on_hover_callback Hover callback -- @tparam function on_hover_callback Hover callback
@ -89,7 +89,7 @@ end
--- Set hover state --- Set hover state
-- @tparam Hover self @{Hover} -- @tparam Hover self @{Hover}
-- @tparam bool state The hover state -- @tparam boolean state The hover state
function Hover.set_hover(self, state) function Hover.set_hover(self, state)
if self._is_hovered ~= state then if self._is_hovered ~= state then
self._is_hovered = state self._is_hovered = state
@ -100,7 +100,7 @@ end
--- Return current hover state. True if touch action was on the node at current time --- Return current hover state. True if touch action was on the node at current time
-- @tparam Hover self @{Hover} -- @tparam Hover self @{Hover}
-- @treturn bool The current hovered state -- @treturn boolean The current hovered state
function Hover.is_hovered(self) function Hover.is_hovered(self)
return self._is_hovered return self._is_hovered
end end
@ -108,7 +108,7 @@ end
--- Set mouse hover state --- Set mouse hover state
-- @tparam Hover self @{Hover} -- @tparam Hover self @{Hover}
-- @tparam bool state The mouse hover state -- @tparam boolean state The mouse hover state
function Hover.set_mouse_hover(self, state) function Hover.set_mouse_hover(self, state)
if self._is_mouse_hovered ~= state then if self._is_mouse_hovered ~= state then
self._is_mouse_hovered = state self._is_mouse_hovered = state
@ -119,7 +119,7 @@ end
--- Return current hover state. True if nil action_id (usually desktop mouse) was on the node at current time --- Return current hover state. True if nil action_id (usually desktop mouse) was on the node at current time
-- @tparam Hover self @{Hover} -- @tparam Hover self @{Hover}
-- @treturn bool The current hovered state -- @treturn boolean The current hovered state
function Hover.is_mouse_hovered(self) function Hover.is_mouse_hovered(self)
return self._is_mouse_hovered return self._is_mouse_hovered
end end
@ -138,7 +138,7 @@ end
-- If hover is not enabled, it will not generate -- If hover is not enabled, it will not generate
-- any hover events -- any hover events
-- @tparam Hover self @{Hover} -- @tparam Hover self @{Hover}
-- @tparam bool state The hover enabled state -- @tparam boolean state The hover enabled state
function Hover.set_enabled(self, state) function Hover.set_enabled(self, state)
self._is_enabled = state self._is_enabled = state
@ -155,7 +155,7 @@ end
--- Return current hover enabled state --- Return current hover enabled state
-- @tparam Hover self @{Hover} -- @tparam Hover self @{Hover}
-- @treturn bool The hover enabled state -- @treturn boolean The hover enabled state
function Hover.is_enabled(self) function Hover.is_enabled(self)
return self._is_enabled return self._is_enabled
end end

View File

@ -53,9 +53,6 @@
--- Scroll content node --- Scroll content node
-- @tfield node content_node -- @tfield node content_node
--- Flag, if scroll now moving by inertion
-- @tfield bool is_inert
--- Current inert speed --- Current inert speed
-- @tfield vector3 inertion -- @tfield vector3 inertion
@ -78,7 +75,7 @@
-- @tfield[opt] number selected -- @tfield[opt] number selected
--- Flag, if scroll now animating by gui.animate --- Flag, if scroll now animating by gui.animate
-- @tfield bool is_animate -- @tfield boolean is_animate
--- ---
@ -131,10 +128,10 @@ end
-- @tfield[opt=0.35] number BACK_SPEED Scroll back returning lerp speed -- @tfield[opt=0.35] number BACK_SPEED Scroll back returning lerp speed
-- @tfield[opt=0.2] number ANIM_SPEED Scroll gui.animation speed for scroll_to function -- @tfield[opt=0.2] number ANIM_SPEED Scroll gui.animation speed for scroll_to function
-- @tfield[opt=0] number EXTRA_STRETCH_SIZE extra size in pixels outside of scroll (stretch effect) -- @tfield[opt=0] number EXTRA_STRETCH_SIZE extra size in pixels outside of scroll (stretch effect)
-- @tfield[opt=false] bool SMALL_CONTENT_SCROLL If true, content node with size less than view node size can be scrolled -- @tfield[opt=false] boolean SMALL_CONTENT_SCROLL If true, content node with size less than view node size can be scrolled
-- @tfield[opt=0] bool WHEEL_SCROLL_SPEED The scroll speed via mouse wheel scroll or touchpad. Set to 0 to disable wheel scrolling -- @tfield[opt=0] boolean WHEEL_SCROLL_SPEED The scroll speed via mouse wheel scroll or touchpad. Set to 0 to disable wheel scrolling
-- @tfield[opt=false] bool WHEEL_SCROLL_INVERTED If true, invert direction for touchpad and mouse wheel scroll -- @tfield[opt=false] boolean WHEEL_SCROLL_INVERTED If true, invert direction for touchpad and mouse wheel scroll
-- @tfield[opt=false] bool WHEEL_SCROLL_BY_INERTION If true, wheel will add inertion to scroll. Direct set position otherwise. -- @tfield[opt=false] boolean WHEEL_SCROLL_BY_INERTION If true, wheel will add inertion to scroll. Direct set position otherwise.
function Scroll.on_style_change(self, style) function Scroll.on_style_change(self, style)
self.style = {} self.style = {}
self.style.EXTRA_STRETCH_SIZE = style.EXTRA_STRETCH_SIZE or 0 self.style.EXTRA_STRETCH_SIZE = style.EXTRA_STRETCH_SIZE or 0
@ -158,7 +155,7 @@ function Scroll.on_style_change(self, style)
end end
--- @{Scroll} constructor --- The @{Scroll} constructor
-- @tparam Scroll self @{Scroll} -- @tparam Scroll self @{Scroll}
-- @tparam string|node view_node GUI view scroll node -- @tparam string|node view_node GUI view scroll node
-- @tparam string|node content_node GUI content scroll node -- @tparam string|node content_node GUI content scroll node
@ -237,7 +234,7 @@ end
--- Start scroll to target point. --- Start scroll to target point.
-- @tparam Scroll self @{Scroll} -- @tparam Scroll self @{Scroll}
-- @tparam vector3 point Target point -- @tparam vector3 point Target point
-- @tparam[opt] bool is_instant Instant scroll flag -- @tparam[opt] boolean is_instant Instant scroll flag
-- @usage scroll:scroll_to(vmath.vector3(0, 50, 0)) -- @usage scroll:scroll_to(vmath.vector3(0, 50, 0))
-- @usage scroll:scroll_to(vmath.vector3(0), true) -- @usage scroll:scroll_to(vmath.vector3(0), true)
function Scroll.scroll_to(self, point, is_instant) function Scroll.scroll_to(self, point, is_instant)
@ -271,7 +268,7 @@ end
--- Scroll to item in scroll by point index. --- Scroll to item in scroll by point index.
-- @tparam Scroll self @{Scroll} -- @tparam Scroll self @{Scroll}
-- @tparam number index Point index -- @tparam number index Point index
-- @tparam[opt] bool skip_cb If true, skip the point callback -- @tparam[opt] boolean skip_cb If true, skip the point callback
function Scroll.scroll_to_index(self, index, skip_cb) function Scroll.scroll_to_index(self, index, skip_cb)
if not self.points then if not self.points then
return return
@ -294,7 +291,7 @@ end
--- Start scroll to target scroll percent --- Start scroll to target scroll percent
-- @tparam Scroll self @{Scroll} -- @tparam Scroll self @{Scroll}
-- @tparam vector3 percent target percent -- @tparam vector3 percent target percent
-- @tparam[opt] bool is_instant instant scroll flag -- @tparam[opt] boolean is_instant instant scroll flag
-- @usage scroll:scroll_to_percent(vmath.vector3(0.5, 0, 0)) -- @usage scroll:scroll_to_percent(vmath.vector3(0.5, 0, 0))
function Scroll.scroll_to_percent(self, percent, is_instant) function Scroll.scroll_to_percent(self, percent, is_instant)
local border = self.available_pos local border = self.available_pos
@ -342,7 +339,7 @@ end
-- If disabled, scroll through points (if exist) -- If disabled, scroll through points (if exist)
-- If no points, just simple drag without inertion -- If no points, just simple drag without inertion
-- @tparam Scroll self @{Scroll} -- @tparam Scroll self @{Scroll}
-- @tparam bool state Inert scroll state -- @tparam boolean state Inert scroll state
-- @treturn druid.scroll Current scroll instance -- @treturn druid.scroll Current scroll instance
function Scroll.set_inert(self, state) function Scroll.set_inert(self, state)
self._is_inert = state self._is_inert = state
@ -353,7 +350,7 @@ end
--- Return if scroll have inertion. --- Return if scroll have inertion.
-- @tparam Scroll self @{Scroll} -- @tparam Scroll self @{Scroll}
-- @treturn bool If scroll have inertion -- @treturn boolean @If scroll have inertion
function Scroll.is_inert(self) function Scroll.is_inert(self)
return self._is_inert return self._is_inert
end end
@ -400,7 +397,7 @@ end
--- Lock or unlock horizontal scroll --- Lock or unlock horizontal scroll
-- @tparam Scroll self @{Scroll} -- @tparam Scroll self @{Scroll}
-- @tparam bool state True, if horizontal scroll is enabled -- @tparam boolean state True, if horizontal scroll is enabled
-- @treturn druid.scroll Current scroll instance -- @treturn druid.scroll Current scroll instance
function Scroll.set_horizontal_scroll(self, state) function Scroll.set_horizontal_scroll(self, state)
self._is_horizontal_scroll = state self._is_horizontal_scroll = state
@ -411,7 +408,7 @@ end
--- Lock or unlock vertical scroll --- Lock or unlock vertical scroll
-- @tparam Scroll self @{Scroll} -- @tparam Scroll self @{Scroll}
-- @tparam bool state True, if vertical scroll is enabled -- @tparam boolean state True, if vertical scroll is enabled
-- @treturn druid.scroll Current scroll instance -- @treturn druid.scroll Current scroll instance
function Scroll.set_vertical_scroll(self, state) function Scroll.set_vertical_scroll(self, state)
self._is_vertical_scroll = state self._is_vertical_scroll = state

View File

@ -102,8 +102,8 @@ end
-- You can override this component styles params in druid styles table -- You can override this component styles params in druid styles table
-- or create your own style -- or create your own style
-- @table style -- @table style
-- @tfield[opt=false] bool IS_DYNAMIC_NODE_POSES If true, always center grid content as grid pivot sets -- @tfield[opt=false] boolean IS_DYNAMIC_NODE_POSES If true, always center grid content as grid pivot sets
-- @tfield[opt=false] bool IS_ALIGN_LAST_ROW If true, always align last row of the grid as grid pivot sets -- @tfield[opt=false] boolean IS_ALIGN_LAST_ROW If true, always align last row of the grid as grid pivot sets
function StaticGrid.on_style_change(self, style) function StaticGrid.on_style_change(self, style)
self.style = {} self.style = {}
self.style.IS_DYNAMIC_NODE_POSES = style.IS_DYNAMIC_NODE_POSES or false self.style.IS_DYNAMIC_NODE_POSES = style.IS_DYNAMIC_NODE_POSES or false
@ -113,7 +113,7 @@ end
--- The @{StaticGrid} constructor --- The @{StaticGrid} constructor
-- @tparam StaticGrid self @{StaticGrid} -- @tparam StaticGrid self @{StaticGrid}
-- @tparam string|Node parent The GUI Node container, where grid's items will be placed -- @tparam string|node parent The GUI Node container, where grid's items will be placed
-- @tparam node element Element prefab. Need to get it size -- @tparam node element Element prefab. Need to get it size
-- @tparam[opt=1] number in_row How many nodes in row can be placed -- @tparam[opt=1] number in_row How many nodes in row can be placed
function StaticGrid.init(self, parent, element, in_row) function StaticGrid.init(self, parent, element, in_row)
@ -151,7 +151,7 @@ local _temp_pos = vmath.vector3(0)
--- Return pos for grid node index --- Return pos for grid node index
-- @tparam StaticGrid self @{StaticGrid} -- @tparam StaticGrid self @{StaticGrid}
-- @tparam number index The grid element index -- @tparam number index The grid element index
-- @treturn vector3 Node position -- @treturn vector3 @Node position
function StaticGrid.get_pos(self, index) function StaticGrid.get_pos(self, index)
local row = math.ceil(index / self.in_row) - 1 local row = math.ceil(index / self.in_row) - 1
local col = (index - row * self.in_row) - 1 local col = (index - row * self.in_row) - 1
@ -241,7 +241,7 @@ end
-- @tparam number index The grid node index to remove -- @tparam number index The grid node index to remove
-- @tparam[opt=SHIFT.RIGHT] number shift_policy How shift nodes, if required. See const.SHIFT -- @tparam[opt=SHIFT.RIGHT] number shift_policy How shift nodes, if required. See const.SHIFT
-- @tparam[opt=false] boolean is_instant If true, update node positions instantly -- @tparam[opt=false] boolean is_instant If true, update node positions instantly
-- @treturn Node The deleted gui node from grid -- @treturn node The deleted gui node from grid
function StaticGrid.remove(self, index, shift_policy, is_instant) function StaticGrid.remove(self, index, shift_policy, is_instant)
assert(self.nodes[index], "No grid item at given index " .. index) assert(self.nodes[index], "No grid item at given index " .. index)
@ -379,7 +379,7 @@ end
--- Update grid inner state --- Update grid inner state
-- @tparam StaticGrid self @{StaticGrid} -- @tparam StaticGrid self @{StaticGrid}
-- @tparam bool is_instant If true, node position update instantly, otherwise with set_position_function callback -- @tparam boolean is_instant If true, node position update instantly, otherwise with set_position_function callback
-- @local -- @local
function StaticGrid._update(self, is_instant) function StaticGrid._update(self, is_instant)
self:_update_indexes() self:_update_indexes()
@ -425,7 +425,7 @@ end
--- Update grid nodes position --- Update grid nodes position
-- @tparam StaticGrid self @{StaticGrid} -- @tparam StaticGrid self @{StaticGrid}
-- @tparam bool is_instant If true, node position update instantly, otherwise with set_position_function callback -- @tparam boolean is_instant If true, node position update instantly, otherwise with set_position_function callback
-- @local -- @local
function StaticGrid._update_pos(self, is_instant) function StaticGrid._update_pos(self, is_instant)
local zero_offset = self:_get_zero_offset() local zero_offset = self:_get_zero_offset()

View File

@ -222,7 +222,7 @@ function Text.on_style_change(self, style)
end end
--- @{Text} constructor --- The @{Text} constructor
-- @tparam Text self @{Text} -- @tparam Text self @{Text}
-- @tparam string|node node Node name or GUI Text Node itself -- @tparam string|node node Node name or GUI Text Node itself
-- @tparam[opt] string value Initial text. Default value is node text from GUI scene. -- @tparam[opt] string value Initial text. Default value is node text from GUI scene.
@ -358,7 +358,7 @@ end
--- Set text pivot. Text will re-anchor inside text area --- Set text pivot. Text will re-anchor inside text area
-- @tparam Text self @{Text} -- @tparam Text self @{Text}
-- @tparam gui.pivot pivot Gui pivot constant -- @tparam number pivot The gui.PIVOT_* constant
-- @treturn Text Current text instance -- @treturn Text Current text instance
function Text.set_pivot(self, pivot) function Text.set_pivot(self, pivot)
local prev_pivot = gui.get_pivot(self.node) local prev_pivot = gui.get_pivot(self.node)
@ -384,7 +384,7 @@ end
--- Return true, if text with line break --- Return true, if text with line break
-- @tparam Text self @{Text} -- @tparam Text self @{Text}
-- @treturn bool Is text node with line break -- @treturn boolean Is text node with line break
function Text.is_multiline(self) function Text.is_multiline(self)
return gui.get_line_break(self.node) return gui.get_line_break(self.node)
end end

View File

@ -74,7 +74,6 @@ end
-- --
-- Invoke `on_style_change` on component, if exist. Component should handle -- Invoke `on_style_change` on component, if exist. Component should handle
-- their style changing and store all style params -- their style changing and store all style params
-- @function component:set_style
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @tparam table druid_style Druid style module -- @tparam table druid_style Druid style module
-- @treturn BaseComponent @{BaseComponent} -- @treturn BaseComponent @{BaseComponent}
@ -94,7 +93,6 @@ end
-- --
-- Use on all your custom components with GUI layouts used as templates. -- Use on all your custom components with GUI layouts used as templates.
-- It will check parent template name to build full template name in self:get_node() -- It will check parent template name to build full template name in self:get_node()
-- @function component:set_template
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @tparam string template BaseComponent template name -- @tparam string template BaseComponent template name
-- @treturn BaseComponent @{BaseComponent} -- @treturn BaseComponent @{BaseComponent}
@ -118,7 +116,6 @@ end
--- Get current component template name. --- Get current component template name.
-- @function component:get_template
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @treturn string Component full template name -- @treturn string Component full template name
function BaseComponent.get_template(self) function BaseComponent.get_template(self)
@ -128,7 +125,6 @@ end
--- Set current component nodes. --- Set current component nodes.
-- Use if your component nodes was cloned with `gui.clone_tree` and you got the node tree. -- Use if your component nodes was cloned with `gui.clone_tree` and you got the node tree.
-- @function component:set_nodes
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @tparam table nodes BaseComponent nodes table -- @tparam table nodes BaseComponent nodes table
-- @treturn BaseComponent @{BaseComponent} -- @treturn BaseComponent @{BaseComponent}
@ -155,7 +151,6 @@ end
--- Context used as first arg in all Druid events --- Context used as first arg in all Druid events
-- --
-- Context is usually self of gui_script. -- Context is usually self of gui_script.
-- @function component:get_context
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @treturn table BaseComponent context -- @treturn table BaseComponent context
function BaseComponent.get_context(self) function BaseComponent.get_context(self)
@ -164,7 +159,6 @@ end
--- Increase input priority in input stack --- Increase input priority in input stack
-- @function component:increase_input_priority
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @local -- @local
function BaseComponent.increase_input_priority(self) function BaseComponent.increase_input_priority(self)
@ -178,7 +172,6 @@ end
-- It autopick node by template name or from nodes by gui.clone_tree -- It autopick node by template name or from nodes by gui.clone_tree
-- if they was setup via component:set_nodes, component:set_template. -- if they was setup via component:set_nodes, component:set_template.
-- If node is not found, the exception will fired -- If node is not found, the exception will fired
-- @function component:get_node
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @tparam string|node node_or_name Node name or node itself -- @tparam string|node node_or_name Node name or node itself
-- @treturn node Gui node -- @treturn node Gui node
@ -211,9 +204,8 @@ end
--- Get Druid instance for inner component creation. --- Get Druid instance for inner component creation.
-- @function component:get_druid
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @treturn Druid Druid instance with component context -- @treturn DruidInstance Druid instance with component context
function BaseComponent.get_druid(self) function BaseComponent.get_druid(self)
local context = { _context = self } local context = { _context = self }
return setmetatable(context, { __index = self._meta.druid }) return setmetatable(context, { __index = self._meta.druid })
@ -221,7 +213,6 @@ end
--- Return component name --- Return component name
-- @function component:get_name
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @treturn string The component name -- @treturn string The component name
function BaseComponent.get_name(self) function BaseComponent.get_name(self)
@ -230,7 +221,6 @@ end
--- Return parent component name --- Return parent component name
-- @function component:get_parent_name
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @treturn string|nil The parent component name if exist or bil -- @treturn string|nil The parent component name if exist or bil
function BaseComponent.get_parent_name(self) function BaseComponent.get_parent_name(self)
@ -240,7 +230,6 @@ end
--- Return component input priority --- Return component input priority
-- @function component:get_input_priority
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @treturn number The component input priority -- @treturn number The component input priority
function BaseComponent.get_input_priority(self) function BaseComponent.get_input_priority(self)
@ -251,7 +240,6 @@ end
--- Set component input priority --- Set component input priority
-- --
-- Default value: 10 -- Default value: 10
-- @function component:set_input_priority
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @tparam number value The new input priority value -- @tparam number value The new input priority value
-- @tparam boolean is_temporary If true, the reset input priority will return to previous value -- @tparam boolean is_temporary If true, the reset input priority will return to previous value
@ -280,7 +268,6 @@ end
--- Reset component input priority to default value --- Reset component input priority to default value
-- @function component:reset_input_priority
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @treturn number The component input priority -- @treturn number The component input priority
function BaseComponent.reset_input_priority(self) function BaseComponent.reset_input_priority(self)
@ -292,7 +279,6 @@ end
--- Return component UID. --- Return component UID.
-- --
-- UID generated in component creation order. -- UID generated in component creation order.
-- @function component:get_uid
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @treturn number The component uid -- @treturn number The component uid
function BaseComponent.get_uid(self) function BaseComponent.get_uid(self)
@ -303,9 +289,8 @@ end
--- Set component input state. By default it enabled --- Set component input state. By default it enabled
-- --
-- If input is disabled, the component will not receive input events -- If input is disabled, the component will not receive input events
-- @function component:set_input_enabled
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @tparam bool state The component input state -- @tparam boolean state The component input state
-- @treturn BaseComponent BaseComponent itself -- @treturn BaseComponent BaseComponent itself
function BaseComponent.set_input_enabled(self, state) function BaseComponent.set_input_enabled(self, state)
self._meta.input_enabled = state self._meta.input_enabled = state
@ -319,7 +304,6 @@ end
--- Return the parent component if exist --- Return the parent component if exist
-- @function component:get_parent_component
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @treturn BaseComponent|nil The druid component instance or nil -- @treturn BaseComponent|nil The druid component instance or nil
function BaseComponent.get_parent_component(self) function BaseComponent.get_parent_component(self)
@ -328,7 +312,6 @@ end
--- Setup component context and his style table --- Setup component context and his style table
-- @function component:setup_component
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @tparam table druid_instance The parent druid instance -- @tparam table druid_instance The parent druid instance
-- @tparam table context Druid context. Usually it is self of script -- @tparam table context Druid context. Usually it is self of script
@ -362,7 +345,6 @@ end
--- Basic constructor of component. It will call automaticaly --- Basic constructor of component. It will call automaticaly
-- by `BaseComponent.create` -- by `BaseComponent.create`
-- @function component:initialize
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @tparam string name BaseComponent name -- @tparam string name BaseComponent name
-- @tparam[opt=DEFAULT] number input_priority The input priority. The bigger number processed first -- @tparam[opt=DEFAULT] number input_priority The input priority. The bigger number processed first
@ -380,7 +362,6 @@ end
--- Print log information if debug mode is enabled --- Print log information if debug mode is enabled
-- @function component:log_message
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @tparam string message -- @tparam string message
-- @tparam table context -- @tparam table context
@ -394,9 +375,8 @@ end
--- Set debug logs for component enabled or disabled --- Set debug logs for component enabled or disabled
-- @function component:set_debug
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @tparam bool is_debug -- @tparam boolean is_debug
-- @local -- @local
function BaseComponent.set_debug(self, is_debug) function BaseComponent.set_debug(self, is_debug)
self._component.is_debug = is_debug self._component.is_debug = is_debug
@ -404,7 +384,6 @@ end
--- Return true, if input priority was changed --- Return true, if input priority was changed
-- @function component:_is_input_priority_changed
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @local -- @local
function BaseComponent._is_input_priority_changed(self) function BaseComponent._is_input_priority_changed(self)
@ -413,7 +392,6 @@ end
--- Reset is_input_priority_changed field --- Reset is_input_priority_changed field
-- @function component:_reset_input_priority_changed
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @local -- @local
function BaseComponent._reset_input_priority_changed(self) function BaseComponent._reset_input_priority_changed(self)
@ -427,7 +405,6 @@ end
--- Get current component interests --- Get current component interests
-- @function component:__get_interests
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @treturn table List of component interests -- @treturn table List of component interests
-- @local -- @local
@ -451,7 +428,6 @@ end
--- Get current component nodes --- Get current component nodes
-- @function component:__get_nodes
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @treturn table BaseComponent nodes table -- @treturn table BaseComponent nodes table
-- @local -- @local
@ -466,7 +442,6 @@ end
--- Add child to component children list --- Add child to component children list
-- @function component:__add_children
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @tparam component children The druid component instance -- @tparam component children The druid component instance
-- @local -- @local
@ -476,7 +451,6 @@ end
--- Remove child from component children list --- Remove child from component children list
-- @function component:__remove_children
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @tparam component children The druid component instance -- @tparam component children The druid component instance
-- @local -- @local
@ -490,7 +464,6 @@ end
--- Return all children components, recursive --- Return all children components, recursive
-- @function component:get_childrens
-- @tparam BaseComponent self @{BaseComponent} -- @tparam BaseComponent self @{BaseComponent}
-- @treturn table Array of childrens if the Druid component instance -- @treturn table Array of childrens if the Druid component instance
function BaseComponent.get_childrens(self) function BaseComponent.get_childrens(self)

View File

@ -20,7 +20,7 @@ M.ACTION_SCROLL_DOWN = hash(sys.get_config("druid.input_scroll_down", "mouse_whe
M.IS_STENCIL_CHECK = not (sys.get_config("druid.no_stencil_check") == "1") M.IS_STENCIL_CHECK = not (sys.get_config("druid.no_stencil_check") == "1")
--- Component Interests
M.ON_INPUT = "on_input" M.ON_INPUT = "on_input"
M.ON_UPDATE = "update" M.ON_UPDATE = "update"
M.ON_MESSAGE = "on_message" M.ON_MESSAGE = "on_message"

View File

@ -10,7 +10,7 @@
-- @tfield DruidInstance druid @{DruidInstance} -- @tfield DruidInstance druid @{DruidInstance}
--- Is currently under user control --- Is currently under user control
-- @tfield bool is_drag -- @tfield boolean is_drag
--- The pin node --- The pin node
-- @tfield node node -- @tfield node node
@ -52,7 +52,7 @@ local function set_angle(self, value)
end end
--- Component init function --- The @{PinKnob} constructor
-- @tparam PinKnob self @{PinKnob} -- @tparam PinKnob self @{PinKnob}
-- @tparam function callback Callback(self, value) on value changed -- @tparam function callback Callback(self, value) on value changed
-- @tparam string template The template string name -- @tparam string template The template string name

View File

@ -61,7 +61,7 @@ local function on_unselect(self)
end end
--- Component init function --- The @{RichInput} constructor
-- @tparam RichInput self @{RichInput} -- @tparam RichInput self @{RichInput}
-- @tparam string template The template string name -- @tparam string template The template string name
-- @tparam table nodes Nodes table from gui.clone_tree -- @tparam table nodes Nodes table from gui.clone_tree

View File

@ -90,6 +90,7 @@
--- The component druid instance --- The component druid instance
-- @tfield DruidInstance druid @{DruidInstance} -- @tfield DruidInstance druid @{DruidInstance}
--
local component = require("druid.component") local component = require("druid.component")
local rich_text = require("druid.custom.rich_text.module.rt") local rich_text = require("druid.custom.rich_text.module.rt")
@ -103,7 +104,7 @@ local SCHEME = {
} }
--- Rich Text component constructor --- The @{RichText} constructor
-- @tparam RichText self @{RichText} -- @tparam RichText self @{RichText}
-- @tparam string template The Rich Text template name -- @tparam string template The Rich Text template name
-- @tparam table nodes The node table, if prefab was copied by gui.clone_tree() -- @tparam table nodes The node table, if prefab was copied by gui.clone_tree()

View File

@ -32,7 +32,7 @@ end
--- Subscribe callback on event --- Subscribe callback on event
-- @tparam DruidEvent self @{DruidEvent} -- @tparam DruidEvent self @{DruidEvent}
-- @tparam function callback Callback itself -- @tparam function callback Callback itself
-- @tparam[opt] Any context Additional context as first param to callback call, usually it's self -- @tparam[opt] any context Additional context as first param to callback call, usually it's self
-- @usage -- @usage
-- local function on_long_callback(self) -- local function on_long_callback(self)
-- print("Long click!") -- print("Long click!")
@ -57,7 +57,7 @@ end
--- Unsubscribe callback on event --- Unsubscribe callback on event
-- @tparam DruidEvent self @{DruidEvent} -- @tparam DruidEvent self @{DruidEvent}
-- @tparam function callback Callback itself -- @tparam function callback Callback itself
-- @tparam[opt] Any context Additional context as first param to callback call -- @tparam[opt] any context Additional context as first param to callback call
-- @usage -- @usage
-- local function on_long_callback(self) -- local function on_long_callback(self)
-- print("Long click!") -- print("Long click!")
@ -80,7 +80,7 @@ end
--- Return true, if event have at lease one handler --- Return true, if event have at lease one handler
-- @tparam DruidEvent self @{DruidEvent} -- @tparam DruidEvent self @{DruidEvent}
-- @treturn bool True if event have handlers -- @treturn boolean True if event have handlers
-- @usage -- @usage
-- local is_long_click_handler_exists = button.on_long_click:is_exist() -- local is_long_click_handler_exists = button.on_long_click:is_exist()
function DruidEvent.is_exist(self) function DruidEvent.is_exist(self)
@ -102,7 +102,7 @@ end
--- Trigger the event and call all subscribed callbacks --- Trigger the event and call all subscribed callbacks
-- @tparam DruidEvent self @{DruidEvent} -- @tparam DruidEvent self @{DruidEvent}
-- @tparam Any ... All event params -- @tparam any ... All event params
-- @usage -- @usage
-- local Event = require("druid.event") -- local Event = require("druid.event")
-- ... -- ...

View File

@ -46,7 +46,7 @@ function Checkbox.on_style_change(self, style)
end end
--- Component init function --- The @{Checkbox} constructor
-- @tparam Checkbox self @{Checkbox} -- @tparam Checkbox self @{Checkbox}
-- @tparam node node Gui node -- @tparam node node Gui node
-- @tparam function callback Checkbox callback -- @tparam function callback Checkbox callback
@ -71,9 +71,9 @@ end
--- Set checkbox state --- Set checkbox state
-- @tparam Checkbox self @{Checkbox} -- @tparam Checkbox self @{Checkbox}
-- @tparam bool state Checkbox state -- @tparam boolean state Checkbox state
-- @tparam bool is_silent Don't trigger on_change_state if true -- @tparam boolean is_silent Don't trigger on_change_state if true
-- @tparam bool is_instant If instant checkbox change -- @tparam boolean is_instant If instant checkbox change
function Checkbox.set_state(self, state, is_silent, is_instant) function Checkbox.set_state(self, state, is_silent, is_instant)
self.state = state self.state = state
self.style.on_change_state(self, self.node, state, is_instant) self.style.on_change_state(self, self.node, state, is_instant)
@ -88,7 +88,7 @@ end
--- Return checkbox state --- Return checkbox state
-- @tparam Checkbox self @{Checkbox} -- @tparam Checkbox self @{Checkbox}
-- @treturn bool Checkbox state -- @treturn boolean Checkbox state
function Checkbox.get_state(self) function Checkbox.get_state(self)
return self.state return self.state
end end

View File

@ -21,7 +21,7 @@ local component = require("druid.component")
local CheckboxGroup = component.create("checkbox_group") local CheckboxGroup = component.create("checkbox_group")
--- Component init function --- The @{CheckboxGroup} constructor
-- @tparam CheckboxGroup self @{CheckboxGroup} -- @tparam CheckboxGroup self @{CheckboxGroup}
-- @tparam node[] nodes Array of gui node -- @tparam node[] nodes Array of gui node
-- @tparam function callback Checkbox callback -- @tparam function callback Checkbox callback
@ -45,7 +45,7 @@ end
--- Set checkbox group state --- Set checkbox group state
-- @tparam CheckboxGroup self @{CheckboxGroup} -- @tparam CheckboxGroup self @{CheckboxGroup}
-- @tparam bool[] indexes Array of checkbox state -- @tparam boolean[] indexes Array of checkbox state
-- @tparam boolean is_instant If instant state change -- @tparam boolean is_instant If instant state change
function CheckboxGroup.set_state(self, indexes, is_instant) function CheckboxGroup.set_state(self, indexes, is_instant)
for i = 1, #indexes do for i = 1, #indexes do
@ -58,7 +58,7 @@ end
--- Return checkbox group state --- Return checkbox group state
-- @tparam CheckboxGroup self @{CheckboxGroup} -- @tparam CheckboxGroup self @{CheckboxGroup}
-- @treturn bool[] Array if checkboxes state -- @treturn boolean[] Array if checkboxes state
function CheckboxGroup.get_state(self) function CheckboxGroup.get_state(self)
local result = {} local result = {}

View File

@ -43,7 +43,7 @@ local Event = require("druid.event")
local DataList = component.create("data_list") local DataList = component.create("data_list")
--- Data list constructor --- The @{DataList} constructor
-- @tparam DataList self @{DataList} -- @tparam DataList self @{DataList}
-- @tparam Scroll scroll The @{Scroll} instance for Data List component -- @tparam Scroll scroll The @{Scroll} instance for Data List component
-- @tparam StaticGrid|DynamicGrid grid The @{StaticGrid} or @{DynamicGrid} instance for Data List component -- @tparam StaticGrid|DynamicGrid grid The @{StaticGrid} or @{DynamicGrid} instance for Data List component
@ -197,7 +197,7 @@ end
--- Return all currenly created nodes in DataList --- Return all currenly created nodes in DataList
-- @tparam DataList self @{DataList} -- @tparam DataList self @{DataList}
-- @treturn Node[] List of created nodes -- @treturn node[] List of created nodes
function DataList.get_created_nodes(self) function DataList.get_created_nodes(self)
local nodes = {} local nodes = {}

View File

@ -65,7 +65,7 @@ local AVAILABLE_PIVOTS = {
} }
--- Component init function --- The @{DynamicGrid} constructor
-- @tparam DynamicGrid self @{DynamicGrid} -- @tparam DynamicGrid self @{DynamicGrid}
-- @tparam node parent The gui node parent, where items will be placed -- @tparam node parent The gui node parent, where items will be placed
function DynamicGrid.init(self, parent) function DynamicGrid.init(self, parent)
@ -322,7 +322,7 @@ end
--- Update grid inner state --- Update grid inner state
-- @tparam DynamicGrid self @{DynamicGrid} -- @tparam DynamicGrid self @{DynamicGrid}
-- @tparam bool is_instant If true, node position update instantly, otherwise with set_position_function callback -- @tparam boolean is_instant If true, node position update instantly, otherwise with set_position_function callback
-- @local -- @local
function DynamicGrid._update(self, is_instant) function DynamicGrid._update(self, is_instant)
self:_update_indexes() self:_update_indexes()
@ -378,7 +378,7 @@ end
--- Update grid nodes position --- Update grid nodes position
-- @tparam DynamicGrid self @{DynamicGrid} -- @tparam DynamicGrid self @{DynamicGrid}
-- @tparam bool is_instant If true, node position update instantly, otherwise with set_position_function callback -- @tparam boolean is_instant If true, node position update instantly, otherwise with set_position_function callback
-- @local -- @local
function DynamicGrid._update_pos(self, is_instant) function DynamicGrid._update_pos(self, is_instant)
for index, node in pairs(self.nodes) do for index, node in pairs(self.nodes) do

View File

@ -27,11 +27,11 @@ local component = require("druid.component")
local Hotkey = component.create("hotkey") local Hotkey = component.create("hotkey")
--- Component init function --- The @{Hotkey} constructor
-- @tparam Hotkey self @{Hotkey} -- @tparam Hotkey self @{Hotkey}
-- @tparam string[]|string keys The keys to be pressed for trigger callback. Should contains one key and any modificator keys -- @tparam string[]|string keys The keys to be pressed for trigger callback. Should contains one key and any modificator keys
-- @tparam function callback The callback function -- @tparam function callback The callback function
-- @tparam[opt] value callback_argument The argument to pass into the callback function -- @tparam[opt] any callback_argument The argument to pass into the callback function
function Hotkey.init(self, keys, callback, callback_argument) function Hotkey.init(self, keys, callback, callback_argument)
self.druid = self:get_druid() self.druid = self:get_druid()
@ -63,7 +63,7 @@ end
--- Add hotkey for component callback --- Add hotkey for component callback
-- @tparam Hotkey self @{Hotkey} -- @tparam Hotkey self @{Hotkey}
-- @tparam string[]|hash[]|string|hash keys that have to be pressed before key pressed to activate -- @tparam string[]|hash[]|string|hash keys that have to be pressed before key pressed to activate
-- @tparam[opt] value callback_argument The argument to pass into the callback function -- @tparam[opt] any callback_argument The argument to pass into the callback function
function Hotkey.add_hotkey(self, keys, callback_argument) function Hotkey.add_hotkey(self, keys, callback_argument)
keys = keys or {} keys = keys or {}
if type(keys) == "string" then if type(keys) == "string" then

View File

@ -34,10 +34,10 @@
-- @tfield Button button @{Button} -- @tfield Button button @{Button}
--- Is current input selected now --- Is current input selected now
-- @tfield bool is_selected -- @tfield boolean is_selected
--- Is current input is empty now --- Is current input is empty now
-- @tfield bool is_empty -- @tfield boolean is_empty
--- Max length for input text --- Max length for input text
-- @tfield[opt] number max_length -- @tfield[opt] number max_length
@ -87,10 +87,10 @@ end
-- You can override this component styles params in druid styles table -- You can override this component styles params in druid styles table
-- or create your own style -- or create your own style
-- @table style -- @table style
-- @tfield[opt=false] bool IS_LONGTAP_ERASE Is long tap will erase current input data -- @tfield[opt=false] boolean IS_LONGTAP_ERASE Is long tap will erase current input data
-- @tfield[opt=*] string MASK_DEFAULT_CHAR Default character mask for password input -- @tfield[opt=*] string MASK_DEFAULT_CHAR Default character mask for password input
-- @tfield[opt=false] bool IS_UNSELECT_ON_RESELECT If true, call unselect on select selected input -- @tfield[opt=false] boolean IS_UNSELECT_ON_RESELECT If true, call unselect on select selected input
-- @tfield[opt=false] bool NO_CONSUME_INPUT_WHILE_SELECTED If true, will not consume input while input is selected. It's allow to interact with other components while input is selected (text input still captured) -- @tfield[opt=false] boolean NO_CONSUME_INPUT_WHILE_SELECTED If true, will not consume input while input is selected. It's allow to interact with other components while input is selected (text input still captured)
-- @tfield function on_select (self, button_node) Callback on input field selecting -- @tfield function on_select (self, button_node) Callback on input field selecting
-- @tfield function on_unselect (self, button_node) Callback on input field unselecting -- @tfield function on_unselect (self, button_node) Callback on input field unselecting
-- @tfield function on_input_wrong (self, button_node) Callback on wrong user input -- @tfield function on_input_wrong (self, button_node) Callback on wrong user input
@ -115,7 +115,7 @@ function Input.on_style_change(self, style)
end end
--- Component init function --- The @{Input} constructor
-- @tparam Input self @{Input} -- @tparam Input self @{Input}
-- @tparam node click_node Node to enabled input component -- @tparam node click_node Node to enabled input component
-- @tparam node|Text text_node Text node what will be changed on user input. You can pass text component instead of text node name @{Text} -- @tparam node|Text text_node Text node what will be changed on user input. You can pass text component instead of text node name @{Text}

View File

@ -28,7 +28,7 @@ local Event = require("druid.event")
local Layout = component.create("layout") local Layout = component.create("layout")
--- Component init function --- The @{Layout} constructor
-- @tparam Layout self @{Layout} -- @tparam Layout self @{Layout}
-- @tparam node node Gui node -- @tparam node node Gui node
-- @tparam string mode The layout mode (from const.LAYOUT_MODE) -- @tparam string mode The layout mode (from const.LAYOUT_MODE)
@ -194,7 +194,7 @@ end
--- Set node for layout node to fit inside it. Pass nil to reset --- Set node for layout node to fit inside it. Pass nil to reset
-- @tparam Layout self @{Layout} -- @tparam Layout self @{Layout}
-- @tparam[opt] Node node -- @tparam[opt] node node
-- @treturn Layout @{Layout} -- @treturn Layout @{Layout}
function Layout.fit_into_node(self, node) function Layout.fit_into_node(self, node)
self._fit_node = node self._fit_node = node

View File

@ -110,7 +110,7 @@ function Progress.on_style_change(self, style)
end end
--- @{Progress} constructor --- The @{Progress} constructor
-- @tparam Progress self @{Progress} -- @tparam Progress self @{Progress}
-- @tparam string|node node Node name or GUI Node itself. -- @tparam string|node node Node name or GUI Node itself.
-- @tparam string key Progress bar direction: const.SIDE.X or const.SIDE.Y -- @tparam string key Progress bar direction: const.SIDE.X or const.SIDE.Y

View File

@ -30,7 +30,7 @@ local function on_checkbox_click(self, index, is_instant)
end end
--- Component init function --- The @{RadioGroup} constructor
-- @tparam RadioGroup self @{RadioGroup} -- @tparam RadioGroup self @{RadioGroup}
-- @tparam node[] nodes Array of gui node -- @tparam node[] nodes Array of gui node
-- @tparam function callback Radio callback -- @tparam function callback Radio callback

View File

@ -29,7 +29,7 @@
-- @tfield number dist -- @tfield number dist
--- Current drag state --- Current drag state
-- @tfield bool is_drag -- @tfield boolean is_drag
--- Current slider value --- Current slider value
-- @tfield number value -- @tfield number value
@ -56,7 +56,7 @@ local function set_position(self, value)
end end
--- Component init function --- The @{Slider} constructor
-- @tparam Slider self @{Slider} -- @tparam Slider self @{Slider}
-- @tparam node node Gui pin node -- @tparam node node Gui pin node
-- @tparam vector3 end_pos The end position of slider -- @tparam vector3 end_pos The end position of slider
@ -174,7 +174,7 @@ end
--- Set value for slider --- Set value for slider
-- @tparam Slider self @{Slider} -- @tparam Slider self @{Slider}
-- @tparam number value Value from 0 to 1 -- @tparam number value Value from 0 to 1
-- @tparam[opt] bool is_silent Don't trigger event if true -- @tparam[opt] boolean is_silent Don't trigger event if true
function Slider.set(self, value, is_silent) function Slider.set(self, value, is_silent)
value = helper.clamp(value, 0, 1) value = helper.clamp(value, 0, 1)
set_position(self, value) set_position(self, value)
@ -202,7 +202,7 @@ end
-- move at this position and node drag will start. -- move at this position and node drag will start.
-- This function require the Defold version 1.3.0+ -- This function require the Defold version 1.3.0+
-- @tparam Slider self @{Slider} -- @tparam Slider self @{Slider}
-- @tparam Node input_node -- @tparam node input_node
-- @treturn Slider @{Slider} -- @treturn Slider @{Slider}
function Slider.set_input_node(self, input_node) function Slider.set_input_node(self, input_node)
self._input_node = self:get_node(input_node) self._input_node = self:get_node(input_node)

View File

@ -76,7 +76,7 @@ end
-- @table style -- @table style
-- @tfield[opt=0.4] number SWIPE_TIME Maximum time for swipe trigger -- @tfield[opt=0.4] number SWIPE_TIME Maximum time for swipe trigger
-- @tfield[opt=50] number SWIPE_THRESHOLD Minimum distance for swipe trigger -- @tfield[opt=50] number SWIPE_THRESHOLD Minimum distance for swipe trigger
-- @tfield[opt=false] bool SWIPE_TRIGGER_ON_MOVE If true, trigger on swipe moving, not only release action -- @tfield[opt=false] boolean SWIPE_TRIGGER_ON_MOVE If true, trigger on swipe moving, not only release action
function Swipe.on_style_change(self, style) function Swipe.on_style_change(self, style)
self.style = {} self.style = {}
self.style.SWIPE_TIME = style.SWIPE_TIME or 0.4 self.style.SWIPE_TIME = style.SWIPE_TIME or 0.4
@ -85,7 +85,7 @@ function Swipe.on_style_change(self, style)
end end
--- Component init function --- The @{Swipe} constructor
-- @tparam Swipe self @{Swipe} -- @tparam Swipe self @{Swipe}
-- @tparam node node Gui node -- @tparam node node Gui node
-- @tparam function on_swipe_callback Swipe callback for on_swipe_end event -- @tparam function on_swipe_callback Swipe callback for on_swipe_end event

View File

@ -44,7 +44,7 @@ local function second_string_min(sec)
end end
--- Component init function --- The @{Timer} constructor
-- @tparam Timer self @{Timer} -- @tparam Timer self @{Timer}
-- @tparam node node Gui text node -- @tparam node node Gui text node
-- @tparam number seconds_from Start timer value in seconds -- @tparam number seconds_from Start timer value in seconds
@ -110,7 +110,7 @@ end
--- Called when update --- Called when update
-- @tparam Timer self @{Timer} -- @tparam Timer self @{Timer}
-- @tparam bool is_on Timer enable state -- @tparam boolean is_on Timer enable state
function Timer.set_state(self, is_on) function Timer.set_state(self, is_on)
self.is_on = is_on self.is_on = is_on

View File

@ -255,9 +255,9 @@ end
--- Add all elements from source array to the target array --- Add all elements from source array to the target array
-- @function helper.add_array -- @function helper.add_array
-- @tparam table target Array to put elements from source -- @tparam any[] target Array to put elements from source
-- @tparam[opt] table source The source array to get elements from -- @tparam[opt] any[] source The source array to get elements from
-- @treturn array The target array -- @treturn any[] The target array
function M.add_array(target, source) function M.add_array(target, source)
assert(target) assert(target)
@ -275,7 +275,7 @@ end
--- Make a check with gui.pick_node, but with additional node_click_area check. --- Make a check with gui.pick_node, but with additional node_click_area check.
-- @function helper.pick_node -- @function helper.pick_node
-- @tparam Node node -- @tparam node node
-- @tparam number x -- @tparam number x
-- @tparam number y -- @tparam number y
-- @tparam[opt] Node node_click_area -- @tparam[opt] Node node_click_area
@ -302,7 +302,7 @@ end
--- Get cumulative parent's node scale --- Get cumulative parent's node scale
-- @function helper.get_scene_scale -- @function helper.get_scene_scale
-- @tparam node node Gui node -- @tparam node node Gui node
-- @tparam bool include_passed_node_scale True if add current node scale to result -- @tparam boolean include_passed_node_scale True if add current node scale to result
-- @treturn vector3 The scene node scale -- @treturn vector3 The scene node scale
function M.get_scene_scale(node, include_passed_node_scale) function M.get_scene_scale(node, include_passed_node_scale)
local scale = include_passed_node_scale and gui.get_scale(node) or vmath.vector3(1) local scale = include_passed_node_scale and gui.get_scale(node) or vmath.vector3(1)
@ -345,7 +345,7 @@ end
-- --
-- Offset shown in [-0.5 .. 0.5] range, where -0.5 is left or bottom, 0.5 is right or top. -- Offset shown in [-0.5 .. 0.5] range, where -0.5 is left or bottom, 0.5 is right or top.
-- @function helper.get_pivot_offset -- @function helper.get_pivot_offset
-- @tparam gui.pivot pivot The node pivot -- @tparam number pivot The gui.PIVOT_* constant
-- @treturn vector3 Vector offset with [-0.5..0.5] values -- @treturn vector3 Vector offset with [-0.5..0.5] values
function M.get_pivot_offset(pivot) function M.get_pivot_offset(pivot)
return const.PIVOTS[pivot] return const.PIVOTS[pivot]
@ -354,7 +354,7 @@ end
--- Check if device is native mobile (Android or iOS) --- Check if device is native mobile (Android or iOS)
-- @function helper.is_mobile -- @function helper.is_mobile
-- @treturn bool Is mobile -- @treturn boolean Is mobile
function M.is_mobile() function M.is_mobile()
return const.CURRENT_SYSTEM_NAME == const.OS.IOS or return const.CURRENT_SYSTEM_NAME == const.OS.IOS or
const.CURRENT_SYSTEM_NAME == const.OS.ANDROID const.CURRENT_SYSTEM_NAME == const.OS.ANDROID
@ -363,7 +363,7 @@ end
--- Check if device is HTML5 --- Check if device is HTML5
-- @function helper.is_web -- @function helper.is_web
-- @treturn bool Is web -- @treturn boolean Is web
function M.is_web() function M.is_web()
return const.CURRENT_SYSTEM_NAME == const.OS.BROWSER return const.CURRENT_SYSTEM_NAME == const.OS.BROWSER
end end
@ -420,7 +420,7 @@ end
--- Get text metric from GUI node. --- Get text metric from GUI node.
-- @function helper.get_text_metrics_from_node -- @function helper.get_text_metrics_from_node
-- @tparam Node text_node -- @tparam node text_node
-- @treturn GUITextMetrics -- @treturn GUITextMetrics
-- @usage -- @usage
-- type GUITextMetrics = { -- type GUITextMetrics = {
@ -451,10 +451,10 @@ end
-- Shift policy can be: left, right, no_shift -- Shift policy can be: left, right, no_shift
-- @function helper.insert_with_shift -- @function helper.insert_with_shift
-- @tparam table array Array -- @tparam table array Array
-- @param item Item to insert -- @param any Item to insert
-- @tparam[opt] number index Index to insert. If nil, item will be inserted at the end of array -- @tparam[opt] number index Index to insert. If nil, item will be inserted at the end of array
-- @tparam[opt] const.SHIFT shift_policy Shift policy -- @tparam[opt] number shift_policy The druid_const.SHIFT.* constant
-- @treturn item Inserted item -- @treturn any Inserted item
function M.insert_with_shift(array, item, index, shift_policy) function M.insert_with_shift(array, item, index, shift_policy)
shift_policy = shift_policy or const.SHIFT.RIGHT shift_policy = shift_policy or const.SHIFT.RIGHT
@ -484,8 +484,8 @@ end
-- @function helper.remove_with_shift -- @function helper.remove_with_shift
-- @tparam table array Array -- @tparam table array Array
-- @tparam[opt] number index Index to remove. If nil, item will be removed from the end of array -- @tparam[opt] number index Index to remove. If nil, item will be removed from the end of array
-- @tparam[opt] const.SHIFT shift_policy Shift policy -- @tparam[opt] number shift_policy The druid_const.SHIFT.* constant
-- @treturn item Removed item -- @treturn any Removed item
function M.remove_with_shift(array, index, shift_policy) function M.remove_with_shift(array, index, shift_policy)
shift_policy = shift_policy or const.SHIFT.RIGHT shift_policy = shift_policy or const.SHIFT.RIGHT

View File

@ -259,8 +259,8 @@ end
--- Create new component. --- Create new component.
-- @tparam DruidInstance self -- @tparam DruidInstance self
-- @tparam Component component Component module -- @tparam BaseComponent component Component module
-- @tparam args ... Other component params to pass it to component:init function -- @tparam any ... Other component params to pass it to component:init function
function DruidInstance.new(self, component, ...) function DruidInstance.new(self, component, ...)
local instance = create(self, component) local instance = create(self, component)
@ -296,7 +296,7 @@ end
-- --
-- Component `on_remove` function will be invoked, if exist. -- Component `on_remove` function will be invoked, if exist.
-- @tparam DruidInstance self -- @tparam DruidInstance self
-- @tparam Component component Component instance -- @tparam BaseComponent component Component instance
function DruidInstance.remove(self, component) function DruidInstance.remove(self, component)
if self._is_late_remove_enabled then if self._is_late_remove_enabled then
table.insert(self._late_remove, component) table.insert(self._late_remove, component)
@ -380,7 +380,7 @@ end
-- @tparam DruidInstance self -- @tparam DruidInstance self
-- @tparam hash action_id Action_id from on_input -- @tparam hash action_id Action_id from on_input
-- @tparam table action Action from on_input -- @tparam table action Action from on_input
-- @treturn bool The boolean value is input was consumed -- @treturn boolean The boolean value is input was consumed
function DruidInstance.on_input(self, action_id, action) function DruidInstance.on_input(self, action_id, action)
self._is_late_remove_enabled = true self._is_late_remove_enabled = true
@ -477,7 +477,7 @@ end
-- If whitelist is not empty and component not contains in this list, -- If whitelist is not empty and component not contains in this list,
-- component will be not processed on input step -- component will be not processed on input step
-- @tparam DruidInstance self -- @tparam DruidInstance self
-- @tparam[opt=nil] table|Component whitelist_components The array of component to whitelist -- @tparam[opt=nil] table|BaseComponent whitelist_components The array of component to whitelist
-- @treturn self @{DruidInstance} -- @treturn self @{DruidInstance}
function DruidInstance.set_whitelist(self, whitelist_components) function DruidInstance.set_whitelist(self, whitelist_components)
if whitelist_components and whitelist_components.isInstanceOf then if whitelist_components and whitelist_components.isInstanceOf then
@ -499,7 +499,7 @@ end
-- If blacklist is not empty and component contains in this list, -- If blacklist is not empty and component contains in this list,
-- component will be not processed on input step -- component will be not processed on input step
-- @tparam DruidInstance self @{DruidInstance} -- @tparam DruidInstance self @{DruidInstance}
-- @tparam[opt=nil] table|Component blacklist_components The array of component to blacklist -- @tparam[opt=nil] table|BaseComponent blacklist_components The array of component to blacklist
-- @treturn self @{DruidInstance} -- @treturn self @{DruidInstance}
function DruidInstance.set_blacklist(self, blacklist_components) function DruidInstance.set_blacklist(self, blacklist_components)
if blacklist_components and blacklist_components.isInstanceOf then if blacklist_components and blacklist_components.isInstanceOf then
@ -518,7 +518,7 @@ end
--- Set debug mode for current Druid instance. It's enable debug log messages --- Set debug mode for current Druid instance. It's enable debug log messages
-- @tparam DruidInstance self @{DruidInstance} -- @tparam DruidInstance self @{DruidInstance}
-- @tparam bool is_debug -- @tparam boolean is_debug
-- @treturn self @{DruidInstance} -- @treturn self @{DruidInstance}
-- @local -- @local
function DruidInstance.set_debug(self, is_debug) function DruidInstance.set_debug(self, is_debug)
@ -579,7 +579,7 @@ end
--- Create @{BackHandler} component --- Create @{BackHandler} component
-- @tparam DruidInstance self -- @tparam DruidInstance self
-- @tparam callback callback On back button -- @tparam function callback @The callback(self, custom_args) to call on back event
-- @tparam[opt] any params Callback argument -- @tparam[opt] any params Callback argument
-- @treturn BackHandler @{BackHandler} component -- @treturn BackHandler @{BackHandler} component
function DruidInstance.new_back_handler(self, callback, params) function DruidInstance.new_back_handler(self, callback, params)
@ -601,7 +601,7 @@ end
-- @tparam DruidInstance self -- @tparam DruidInstance self
-- @tparam node node Gui text node -- @tparam node node Gui text node
-- @tparam[opt] string value Initial text. Default value is node text from GUI scene. -- @tparam[opt] string value Initial text. Default value is node text from GUI scene.
-- @tparam[opt] bool no_adjust If true, text will be not auto-adjust size -- @tparam[opt] boolean no_adjust If true, text will be not auto-adjust size
-- @treturn Text @{Text} component -- @treturn Text @{Text} component
function DruidInstance.new_text(self, node, value, no_adjust) function DruidInstance.new_text(self, node, value, no_adjust)
return DruidInstance.new(self, text, node, value, no_adjust) return DruidInstance.new(self, text, node, value, no_adjust)
@ -676,7 +676,7 @@ end
-- @tparam DruidInstance self -- @tparam DruidInstance self
-- @tparam node node The text node -- @tparam node node The text node
-- @tparam string locale_id Default locale id -- @tparam string locale_id Default locale id
-- @tparam bool no_adjust If true, will not correct text size -- @tparam boolean no_adjust If true, will not correct text size
-- @treturn LangText @{LangText} component -- @treturn LangText @{LangText} component
function DruidInstance.new_lang_text(self, node, locale_id, no_adjust) function DruidInstance.new_lang_text(self, node, locale_id, no_adjust)
return helper.require_component_message("lang_text") return helper.require_component_message("lang_text")
@ -731,7 +731,7 @@ end
--- Create @{DataList} component --- Create @{DataList} component
-- @tparam DruidInstance self -- @tparam DruidInstance self
-- @tparam Scroll druid_scroll The Scroll instance for Data List component -- @tparam Scroll druid_scroll The Scroll instance for Data List component
-- @tparam Grid druid_grid The Grid instance for Data List component -- @tparam StaticGrid|DynamicGrid druid_grid The @{StaticGrid} or @{DynamicGrid} instance for Data List component
-- @tparam function create_function The create function callback(self, data, index, data_list). Function should return (node, [component]) -- @tparam function create_function The create function callback(self, data, index, data_list). Function should return (node, [component])
-- @treturn DataList @{DataList} component -- @treturn DataList @{DataList} component
function DruidInstance.new_data_list(self, druid_scroll, druid_grid, create_function) function DruidInstance.new_data_list(self, druid_scroll, druid_grid, create_function)
@ -786,10 +786,10 @@ end
--- Create @{Hotkey} component --- Create @{Hotkey} component
-- @tparam DruidInstance self -- @tparam DruidInstance self
-- @tparam string|string[] keys_array Keys for trigger action. Should contains one action key and any amount of modificator keys -- @tparam string|string[] keys_array Keys for trigger action. Should contains one action key and any amount of modificator keys
-- @tparam function callback Button callback -- @tparam function callback The callback function
-- @tparam[opt] value params Button callback params -- @tparam[opt] any callback_argument The argument to pass into the callback function
-- @treturn Hotkey @{Hotkey} component -- @treturn Hotkey @{Hotkey} component
function DruidInstance.new_hotkey(self, keys_array, callback, params) function DruidInstance.new_hotkey(self, keys_array, callback, callback_argument)
return helper.require_component_message("hotkey") return helper.require_component_message("hotkey")
end end

View File

@ -1,10 +1,5 @@
-- Manual Annotations -- -- Manual Annotations --
---@class druid.rich_text.style
---@field COLORS table
---@field ADJUST_STEPS number
---@field ADJUST_SCALE_DELTA number
---@class druid.rich_text.metrics ---@class druid.rich_text.metrics
---@field width number ---@field width number
---@field height number ---@field height number
@ -18,7 +13,7 @@
---@field lines table<number, druid.rich_text.metrics> ---@field lines table<number, druid.rich_text.metrics>
---@class druid.rich_text.word ---@class druid.rich_text.word
---@field node Node ---@field node node
---@field relative_scale number ---@field relative_scale number
---@field color vector4 ---@field color vector4
---@field position vector3 ---@field position vector3
@ -26,7 +21,7 @@
---@field scale vector3 ---@field scale vector3
---@field size vector3 ---@field size vector3
---@field metrics druid.rich_text.metrics ---@field metrics druid.rich_text.metrics
---@field pivot Pivot ---@field pivot number @ The gui.PIVOT_* constant
---@field text string ---@field text string
---@field shadow vector4 ---@field shadow vector4
---@field outline vector4 ---@field outline vector4
@ -37,14 +32,14 @@
---@field br boolean ---@field br boolean
---@field nobr boolean ---@field nobr boolean
---@class druid.rich_text.word.image ---@class druid.rich_text.image
---@field texture string ---@field texture string
---@field anim string ---@field anim string
---@field width number ---@field width number
---@field height number ---@field height number
---@class druid.rich_text.settings ---@class druid.rich_text.settings
---@field parent Node ---@field parent node
---@field size number ---@field size number
---@field fonts table<string, string> ---@field fonts table<string, string>
---@field color vector4 ---@field color vector4
@ -54,8 +49,8 @@
---@field image_pixel_grid_snap boolean ---@field image_pixel_grid_snap boolean
---@field combine_words boolean ---@field combine_words boolean
---@field default_animation string ---@field default_animation string
---@field node_prefab Node ---@field node_prefab node
---@field text_prefab Node ---@field text_prefab node
---@class GUITextMetrics ---@class GUITextMetrics
---@field width number ---@field width number