Annotations update [2]

This commit is contained in:
Insality 2023-10-17 22:00:43 +03:00
parent 86b92f90a7
commit 50c9b6bad5
50 changed files with 327 additions and 2238 deletions

View File

@ -492,7 +492,7 @@ return AwesomeComponent
<a href="../modules/BaseComponent.html#">BaseComponent</a>
</li>
<li><span class="parameter">state</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
The component input state
</li>
</ul>
@ -527,7 +527,7 @@ return AwesomeComponent
The new input priority value
</li>
<li><span class="parameter">is_temporary</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
If true, the reset input priority will return to previous value
</li>
</ul>

View File

@ -189,7 +189,7 @@ local blocker = self.druid:new_blocker(node)
<a href="../modules/Blocker.html#">Blocker</a>
</li>
<li><span class="parameter">state</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
Enabled state
</li>
</ul>

View File

@ -110,7 +110,7 @@ local button = self.druid:new_button(&quot;button_name&quot;, on_button_click, c
<td class="summary">Get current key name to trigger this button.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#init">init(self, node, callback[, custom_args[, anim_node]])</a></td>
<td class="name" nowrap><a href="#init">init(self, node, callback, custom_args, anim_node)</a></td>
<td class="summary">The <a href="../modules/Button.html#">Button</a> constructor</td>
</tr>
<tr>
@ -118,7 +118,7 @@ local button = self.druid:new_button(&quot;button_name&quot;, on_button_click, c
<td class="summary">Get button enabled state.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_check_function">set_check_function(self[, check_function[, failure_callback]])</a></td>
<td class="name" nowrap><a href="#set_check_function">set_check_function(self, check_function, failure_callback)</a></td>
<td class="summary">Set function for additional check for button click availability</td>
</tr>
<tr>
@ -134,7 +134,7 @@ local button = self.druid:new_button(&quot;button_name&quot;, on_button_click, c
<td class="summary">Set key name to trigger this button by keyboard.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_web_user_interaction">set_web_user_interaction(self[, is_web_mode])</a></td>
<td class="name" nowrap><a href="#set_web_user_interaction">set_web_user_interaction(self, is_web_mode)</a></td>
<td class="summary">Set Button mode to work inside user HTML5 interaction event.</td>
</tr>
</table>
@ -241,7 +241,7 @@ local button = self.druid:new_button(&quot;button_name&quot;, on_button_click, c
</dd>
<dt>
<a name = "init"></a>
<strong>init(self, node, callback[, custom_args[, anim_node]])</strong>
<strong>init(self, node, callback, custom_args, anim_node)</strong>
</dt>
<dd>
The <a href="../modules/Button.html#">Button</a> constructor
@ -255,21 +255,19 @@ local button = self.druid:new_button(&quot;button_name&quot;, on_button_click, c
</li>
<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 <a class="type" href="../modules/Button.html#node">node</a></span>
Node name or GUI Node itself
The node_id or gui.get_node(node_id)
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
On click button callback
</li>
<li><span class="parameter">custom_args</span>
<span class="types"><span class="type">any</span></span>
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
Button events custom arguments
(<em>optional</em>)
</li>
<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 <a class="type" href="../modules/Button.html#node">node</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a>, <a class="type" href="../modules/Button.html#node">node</a> or <span class="type">nil</span></span>
Node to animate instead of trigger node.
(<em>optional</em>)
</li>
</ul>
@ -312,7 +310,7 @@ local button = self.druid:new_button(&quot;button_name&quot;, on_button_click, c
</dd>
<dt>
<a name = "set_check_function"></a>
<strong>set_check_function(self[, check_function[, failure_callback]])</strong>
<strong>set_check_function(self, check_function, failure_callback)</strong>
</dt>
<dd>
Set function for additional check for button click availability
@ -325,14 +323,12 @@ local button = self.druid:new_button(&quot;button_name&quot;, on_button_click, c
</li>
<li><span class="parameter">check_function</span>
<span class="types"><span class="type">function</span></span>
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
Should return true or false. If true - button can be pressed.
(<em>optional</em>)
</li>
<li><span class="parameter">failure_callback</span>
<span class="types"><span class="type">function</span></span>
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
Function will be called on button click, if check function return false
(<em>optional</em>)
</li>
</ul>
@ -401,7 +397,7 @@ local button = self.druid:new_button(&quot;button_name&quot;, on_button_click, c
<a href="../modules/Button.html#">Button</a>
</li>
<li><span class="parameter">state</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
Enabled state
</li>
</ul>
@ -459,7 +455,7 @@ button:set_enabled(<span class="keyword">true</span>)</pre>
</dd>
<dt>
<a name = "set_web_user_interaction"></a>
<strong>set_web_user_interaction(self[, is_web_mode])</strong>
<strong>set_web_user_interaction(self, is_web_mode)</strong>
</dt>
<dd>
Set Button mode to work inside user HTML5 interaction event.
@ -475,9 +471,8 @@ button:set_enabled(<span class="keyword">true</span>)</pre>
</li>
<li><span class="parameter">is_web_mode</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
If true - button will be called inside html5 callback
(<em>optional</em>)
</li>
</ul>

View File

@ -210,15 +210,15 @@
<a href="../modules/Checkbox.html#">Checkbox</a>
</li>
<li><span class="parameter">state</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
Checkbox state
</li>
<li><span class="parameter">is_silent</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
Don't trigger on_change_state if true
</li>
<li><span class="parameter">is_instant</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
If instant checkbox change
</li>
</ul>

View File

@ -193,7 +193,7 @@
Array of checkbox state
</li>
<li><span class="parameter">is_instant</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
If instant state change
</li>
</ul>

View File

@ -266,7 +266,7 @@
<a href="../modules/Drag.html#">Drag</a>
</li>
<li><span class="parameter">is_enabled</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
</li>
</ul>

View File

@ -120,7 +120,7 @@ end
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#druid.new">druid.new(context[, style])</a></td>
<td class="name" nowrap><a href="#druid.new">druid.new(context, style)</a></td>
<td class="summary">Create a new Druid instance for creating GUI components.</td>
</tr>
<tr>
@ -158,7 +158,7 @@ end
<dl class="function">
<dt>
<a name = "druid.new"></a>
<strong>druid.new(context[, style])</strong>
<strong>druid.new(context, style)</strong>
</dt>
<dd>
Create a new Druid instance for creating GUI components.
@ -171,9 +171,8 @@ end
The Druid context. Usually, this is the self of the gui_script. It is passed into all Druid callbacks.
</li>
<li><span class="parameter">style</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"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a> or <span class="type">nil</span></span>
The Druid style table to override style parameters for this Druid instance.
(<em>optional</em>)
</li>
</ul>

View File

@ -87,7 +87,7 @@
<td class="summary">Clear the all event handlers</td>
</tr>
<tr>
<td class="name" nowrap><a href="#initialize">initialize(self[, initial_callback])</a></td>
<td class="name" nowrap><a href="#initialize">initialize(self, initial_callback)</a></td>
<td class="summary">DruidEvent constructor</td>
</tr>
<tr>
@ -95,7 +95,7 @@
<td class="summary">Return true, if event have at lease one handler</td>
</tr>
<tr>
<td class="name" nowrap><a href="#subscribe">subscribe(self, callback[, context])</a></td>
<td class="name" nowrap><a href="#subscribe">subscribe(self, callback, context)</a></td>
<td class="summary">Subscribe callback on event</td>
</tr>
<tr>
@ -103,7 +103,7 @@
<td class="summary">Trigger the event and call all subscribed callbacks</td>
</tr>
<tr>
<td class="name" nowrap><a href="#unsubscribe">unsubscribe(self, callback[, context])</a></td>
<td class="name" nowrap><a href="#unsubscribe">unsubscribe(self, callback, context)</a></td>
<td class="summary">Unsubscribe callback on event</td>
</tr>
</table>
@ -142,7 +142,7 @@
</dd>
<dt>
<a name = "initialize"></a>
<strong>initialize(self[, initial_callback])</strong>
<strong>initialize(self, initial_callback)</strong>
</dt>
<dd>
DruidEvent constructor
@ -155,9 +155,8 @@
<a href="../modules/DruidEvent.html#">DruidEvent</a>
</li>
<li><span class="parameter">initial_callback</span>
<span class="types"><span class="type">function</span></span>
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
Subscribe the callback on new event, if callback exist
(<em>optional</em>)
</li>
</ul>
@ -205,7 +204,7 @@
</dd>
<dt>
<a name = "subscribe"></a>
<strong>subscribe(self, callback[, context])</strong>
<strong>subscribe(self, callback, context)</strong>
</dt>
<dd>
Subscribe callback on event
@ -222,9 +221,8 @@
Callback itself
</li>
<li><span class="parameter">context</span>
<span class="types"><span class="type">any</span></span>
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
Additional context as first param to callback call, usually it's self
(<em>optional</em>)
</li>
</ul>
@ -276,7 +274,7 @@ event:trigger(<span class="string">"Param1"</span>, <span class="string">"Param2
</dd>
<dt>
<a name = "unsubscribe"></a>
<strong>unsubscribe(self, callback[, context])</strong>
<strong>unsubscribe(self, callback, context)</strong>
</dt>
<dd>
Unsubscribe callback on event
@ -293,9 +291,8 @@ event:trigger(<span class="string">"Param1"</span>, <span class="string">"Param2
Callback itself
</li>
<li><span class="parameter">context</span>
<span class="types"><span class="type">any</span></span>
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
Additional context as first param to callback call
(<em>optional</em>)
</li>
</ul>

View File

@ -146,7 +146,7 @@ end
<td class="summary">Create new component.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#new_back_handler">new_back_handler(self, callback[, params])</a></td>
<td class="name" nowrap><a href="#new_back_handler">new_back_handler(self, callback, params)</a></td>
<td class="summary">Create <a href="../modules/BackHandler.html#">BackHandler</a> component</td>
</tr>
<tr>
@ -154,7 +154,7 @@ end
<td class="summary">Create <a href="../modules/Blocker.html#">Blocker</a> component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#new_button">new_button(self, node, callback[, params[, anim_node]])</a></td>
<td class="name" nowrap><a href="#new_button">new_button(self, node, callback, params, anim_node)</a></td>
<td class="summary">Create <a href="../modules/Button.html#">Button</a> component</td>
</tr>
<tr>
@ -174,11 +174,11 @@ end
<td class="summary">Create <a href="../modules/Drag.html#">Drag</a> component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#new_dynamic_grid">new_dynamic_grid(self, parent)</a></td>
<td class="name" nowrap><a href="#new_dynamic_grid">new_dynamic_grid(self, parent_node)</a></td>
<td class="summary">Create <a href="../modules/DynamicGrid.html#">DynamicGrid</a> component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#new_hotkey">new_hotkey(self, keys_array, callback[, callback_argument])</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>
</tr>
<tr>
@ -186,11 +186,11 @@ end
<td class="summary">Create <a href="../modules/Hover.html#">Hover</a> component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#new_input">new_input(self, click_node, text_node[, keyboard_type])</a></td>
<td class="name" nowrap><a href="#new_input">new_input(self, click_node, text_node, keyboard_type)</a></td>
<td class="summary">Create <a href="../modules/Input.html#">Input</a> component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#new_lang_text">new_lang_text(self, node, locale_id, no_adjust)</a></td>
<td class="name" nowrap><a href="#new_lang_text">new_lang_text(self, node, locale_id, adjust_type)</a></td>
<td class="summary">Create <a href="../modules/LangText.html#">LangText</a> component</td>
</tr>
<tr>
@ -206,7 +206,7 @@ end
<td class="summary">Create <a href="../modules/RadioGroup.html#">RadioGroup</a> component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#new_rich_text">new_rich_text(self[, template[, nodes]])</a></td>
<td class="name" nowrap><a href="#new_rich_text">new_rich_text(self, template, nodes)</a></td>
<td class="summary">Create <a href="../modules/RichText.html#">RichText</a> component.</td>
</tr>
<tr>
@ -214,11 +214,11 @@ end
<td class="summary">Create <a href="../modules/Scroll.html#">Scroll</a> component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#new_slider">new_slider(self, node, end_pos[, callback])</a></td>
<td class="name" nowrap><a href="#new_slider">new_slider(self, pin_node, end_pos, callback)</a></td>
<td class="summary">Create <a href="../modules/Slider.html#">Slider</a> component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#new_static_grid">new_static_grid(self, parent, element[, in_row=1])</a></td>
<td class="name" nowrap><a href="#new_static_grid">new_static_grid(self, parent_node, element[, in_row=1])</a></td>
<td class="summary">Create <a href="../modules/StaticGrid.html#">StaticGrid</a> component</td>
</tr>
<tr>
@ -226,11 +226,11 @@ end
<td class="summary">Create <a href="../modules/Swipe.html#">Swipe</a> component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#new_text">new_text(self, node[, value[, no_adjust]])</a></td>
<td class="name" nowrap><a href="#new_text">new_text(self, node, value, no_adjust)</a></td>
<td class="summary">Create <a href="../modules/Text.html#">Text</a> component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#new_timer">new_timer(self, node, seconds_from[, seconds_to=0[, callback]])</a></td>
<td class="name" nowrap><a href="#new_timer">new_timer(self, node, seconds_from[, seconds_to=0], callback)</a></td>
<td class="summary">Create <a href="../modules/Timer.html#">Timer</a> component</td>
</tr>
<tr>
@ -318,7 +318,7 @@ end
</dd>
<dt>
<a name = "new_back_handler"></a>
<strong>new_back_handler(self, callback[, params])</strong>
<strong>new_back_handler(self, callback, params)</strong>
</dt>
<dd>
Create <a href="../modules/BackHandler.html#">BackHandler</a> component
@ -335,9 +335,8 @@ end
@The callback(self, custom_args) to call on back event
</li>
<li><span class="parameter">params</span>
<span class="types"><span class="type">any</span></span>
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
Callback argument
(<em>optional</em>)
</li>
</ul>
@ -367,8 +366,8 @@ end
</li>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Gui node
<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 node_id or gui.get_node(node_id)
</li>
</ul>
@ -385,7 +384,7 @@ end
</dd>
<dt>
<a name = "new_button"></a>
<strong>new_button(self, node, callback[, params[, anim_node]])</strong>
<strong>new_button(self, node, callback, params, anim_node)</strong>
</dt>
<dd>
Create <a href="../modules/Button.html#">Button</a> component
@ -398,22 +397,20 @@ end
</li>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
GUI node
<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 node_id or gui.get_node(node_id)
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
Button callback
</li>
<li><span class="parameter">params</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.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> or <span class="type">nil</span></span>
Button callback params
(<em>optional</em>)
</li>
<li><span class="parameter">anim_node</span>
<span class="types"><span class="type">node</span></span>
<span class="types"><span class="type">node</span> or <span class="type">nil</span></span>
Button anim node (node, if not provided)
(<em>optional</em>)
</li>
</ul>
@ -443,8 +440,8 @@ end
</li>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Gui node
<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_node id or gui.get_node(node_id).
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
@ -567,8 +564,8 @@ end
</li>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
GUI node to detect dragging
<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 node_id or gui.get_node(node_id). Will used as user input node.
</li>
<li><span class="parameter">on_drag_callback</span>
<span class="types"><span class="type">function</span></span>
@ -589,7 +586,7 @@ end
</dd>
<dt>
<a name = "new_dynamic_grid"></a>
<strong>new_dynamic_grid(self, parent)</strong>
<strong>new_dynamic_grid(self, parent_node)</strong>
</dt>
<dd>
Create <a href="../modules/DynamicGrid.html#">DynamicGrid</a> component
@ -601,9 +598,9 @@ end
<span class="types"><span class="type">DruidInstance</span></span>
</li>
<li><span class="parameter">parent</span>
<span class="types"><span class="type">node</span></span>
The gui node parent, where items will be placed
<li><span class="parameter">parent_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>
The node_id or gui.get_node(node_id). Parent of all Grid items.
</li>
</ul>
@ -620,7 +617,7 @@ end
</dd>
<dt>
<a name = "new_hotkey"></a>
<strong>new_hotkey(self, keys_array, callback[, callback_argument])</strong>
<strong>new_hotkey(self, keys_array, callback, callback_argument)</strong>
</dt>
<dd>
Create <a href="../modules/Hotkey.html#">Hotkey</a> component
@ -641,9 +638,8 @@ end
The callback function
</li>
<li><span class="parameter">callback_argument</span>
<span class="types"><span class="type">any</span></span>
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
The argument to pass into the callback function
(<em>optional</em>)
</li>
</ul>
@ -673,8 +669,8 @@ end
</li>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Gui node
<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 node_id or gui.get_node(node_id)
</li>
<li><span class="parameter">on_hover_callback</span>
<span class="types"><span class="type">function</span></span>
@ -695,7 +691,7 @@ end
</dd>
<dt>
<a name = "new_input"></a>
<strong>new_input(self, click_node, text_node[, keyboard_type])</strong>
<strong>new_input(self, click_node, text_node, keyboard_type)</strong>
</dt>
<dd>
Create <a href="../modules/Input.html#">Input</a> component
@ -708,17 +704,16 @@ end
</li>
<li><span class="parameter">click_node</span>
<span class="types"><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>
Button node to enabled input component
</li>
<li><span class="parameter">text_node</span>
<span class="types"><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>
Text node what will be changed on user input
</li>
<li><span class="parameter">keyboard_type</span>
<span class="types"><span class="type">number</span></span>
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
Gui keyboard type for input field
(<em>optional</em>)
</li>
</ul>
@ -735,7 +730,7 @@ end
</dd>
<dt>
<a name = "new_lang_text"></a>
<strong>new_lang_text(self, node, locale_id, no_adjust)</strong>
<strong>new_lang_text(self, node, locale_id, adjust_type)</strong>
</dt>
<dd>
Create <a href="../modules/LangText.html#">LangText</a> component
@ -748,16 +743,16 @@ end
</li>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
The text node
<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_node id or gui.get_node(node_id)
</li>
<li><span class="parameter">locale_id</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
Default locale id
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">nil</span></span>
Default locale id or text from node as default
</li>
<li><span class="parameter">no_adjust</span>
<span class="types"><span class="type">boolean</span></span>
If true, will not correct text size
<li><span class="parameter">adjust_type</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">nil</span></span>
Adjust type for text node. Default: const.TEXT_ADJUST.DOWNSCALE
</li>
</ul>
@ -788,7 +783,7 @@ end
</li>
<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>
Layout node
The_node id or gui.get_node(node_id).
</li>
<li><span class="parameter">mode</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
@ -889,7 +884,7 @@ end
</dd>
<dt>
<a name = "new_rich_text"></a>
<strong>new_rich_text(self[, template[, nodes]])</strong>
<strong>new_rich_text(self, template, nodes)</strong>
</dt>
<dd>
Create <a href="../modules/RichText.html#">RichText</a> component.
@ -903,14 +898,12 @@ end
</li>
<li><span class="parameter">template</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Template name if used
(<em>optional</em>)
</li>
<li><span class="parameter">nodes</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"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a> or <span class="type">nil</span></span>
Nodes table from gui.clone_tree
(<em>optional</em>)
</li>
</ul>
@ -940,12 +933,12 @@ end
</li>
<li><span class="parameter">view_node</span>
<span class="types"><span class="type">node</span></span>
GUI view scroll node
<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 node_id or gui.get_node(node_id). Will used as user input node.
</li>
<li><span class="parameter">content_node</span>
<span class="types"><span class="type">node</span></span>
GUI content scroll node
<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 node_id or gui.get_node(node_id). Will used as scrollable node inside view_node.
</li>
</ul>
@ -962,7 +955,7 @@ end
</dd>
<dt>
<a name = "new_slider"></a>
<strong>new_slider(self, node, end_pos[, callback])</strong>
<strong>new_slider(self, pin_node, end_pos, callback)</strong>
</dt>
<dd>
Create <a href="../modules/Slider.html#">Slider</a> component
@ -974,18 +967,17 @@ end
<span class="types"><span class="type">DruidInstance</span></span>
</li>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Gui pin node
<li><span class="parameter">pin_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>
The_node id or gui.get_node(node_id).
</li>
<li><span class="parameter">end_pos</span>
<span class="types"><span class="type">vector3</span></span>
The end position of slider
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
On slider change callback
(<em>optional</em>)
</li>
</ul>
@ -1002,7 +994,7 @@ end
</dd>
<dt>
<a name = "new_static_grid"></a>
<strong>new_static_grid(self, parent, element[, in_row=1])</strong>
<strong>new_static_grid(self, parent_node, element[, in_row=1])</strong>
</dt>
<dd>
Create <a href="../modules/StaticGrid.html#">StaticGrid</a> component
@ -1014,9 +1006,9 @@ end
<span class="types"><span class="type">DruidInstance</span></span>
</li>
<li><span class="parameter">parent</span>
<span class="types"><span class="type">node</span></span>
The gui node parent, where items will be placed
<li><span class="parameter">parent_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>
The node_id or gui.get_node(node_id). Parent of all Grid items.
</li>
<li><span class="parameter">element</span>
<span class="types"><span class="type">node</span></span>
@ -1055,8 +1047,8 @@ end
</li>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Gui node
<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 node_id or gui.get_node(node_id). Will used as user input node.
</li>
<li><span class="parameter">on_swipe_callback</span>
<span class="types"><span class="type">function</span></span>
@ -1077,7 +1069,7 @@ end
</dd>
<dt>
<a name = "new_text"></a>
<strong>new_text(self, node[, value[, no_adjust]])</strong>
<strong>new_text(self, node, value, no_adjust)</strong>
</dt>
<dd>
Create <a href="../modules/Text.html#">Text</a> component
@ -1090,18 +1082,16 @@ end
</li>
<li><span class="parameter">node</span>
<span class="types"><span class="type">node</span></span>
Gui text node
<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 node_id or gui.get_node(node_id)
</li>
<li><span class="parameter">value</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Initial text. Default value is node text from GUI scene.
(<em>optional</em>)
</li>
<li><span class="parameter">no_adjust</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
If true, text will be not auto-adjust size
(<em>optional</em>)
</li>
</ul>
@ -1118,7 +1108,7 @@ end
</dd>
<dt>
<a name = "new_timer"></a>
<strong>new_timer(self, node, seconds_from[, seconds_to=0[, callback]])</strong>
<strong>new_timer(self, node, seconds_from[, seconds_to=0], callback)</strong>
</dt>
<dd>
Create <a href="../modules/Timer.html#">Timer</a> component
@ -1131,7 +1121,7 @@ end
</li>
<li><span class="parameter">node</span>
<span class="types"><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>
Gui text node
</li>
<li><span class="parameter">seconds_from</span>
@ -1144,9 +1134,8 @@ end
(<em>default</em> 0)
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
Function on timer end
(<em>optional</em>)
</li>
</ul>

View File

@ -86,7 +86,7 @@
<td class="summary">Return side vector to correct node shifting</td>
</tr>
<tr>
<td class="name" nowrap><a href="#add">add(self, node[, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]]])</a></td>
<td class="name" nowrap><a href="#add">add(self, node, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]])</a></td>
<td class="summary">Add new node to the grid</td>
</tr>
<tr>
@ -110,7 +110,7 @@
<td class="summary">Return DynamicGrid offset, where DynamicGrid content starts.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_pos">get_pos(self, index, node[, origin_index])</a></td>
<td class="name" nowrap><a href="#get_pos">get_pos(self, index, node, origin_index)</a></td>
<td class="summary">Return pos for grid node index</td>
</tr>
<tr>
@ -213,7 +213,7 @@
</dd>
<dt>
<a name = "add"></a>
<strong>add(self, node[, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]]])</strong>
<strong>add(self, node, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]])</strong>
</dt>
<dd>
Add new node to the grid
@ -230,9 +230,8 @@
Gui node
</li>
<li><span class="parameter">index</span>
<span class="types"><span class="type">number</span></span>
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
The node position. By default add as last node
(<em>optional</em>)
</li>
<li><span class="parameter">shift_policy</span>
<span class="types"><span class="type">number</span></span>
@ -393,7 +392,7 @@
</dd>
<dt>
<a name = "get_pos"></a>
<strong>get_pos(self, index, node[, origin_index])</strong>
<strong>get_pos(self, index, node, origin_index)</strong>
</dt>
<dd>
Return pos for grid node index
@ -414,9 +413,8 @@
The node to be placed
</li>
<li><span class="parameter">origin_index</span>
<span class="types"><span class="type">number</span></span>
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
Index of nearby node
(<em>optional</em>)
</li>
</ul>

View File

@ -87,7 +87,7 @@ helper.centrate_nodes(0, node_1, node_2)
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#helper.add_array">helper.add_array(target[, source])</a></td>
<td class="name" nowrap><a href="#helper.add_array">helper.add_array(target, source)</a></td>
<td class="summary">Add all elements from source array to the target array</td>
</tr>
<tr>
@ -111,7 +111,7 @@ helper.centrate_nodes(0, node_1, node_2)
<td class="summary">Calculate distance between two points</td>
</tr>
<tr>
<td class="name" nowrap><a href="#helper.get_border">helper.get_border(node[, offset])</a></td>
<td class="name" nowrap><a href="#helper.get_border">helper.get_border(node, offset)</a></td>
<td class="summary">Distance from node position to his borders</td>
</tr>
<tr>
@ -143,7 +143,7 @@ helper.centrate_nodes(0, node_1, node_2)
<td class="summary">Get text metric from GUI node.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#helper.insert_with_shift">helper.insert_with_shift(array, any[, 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>
</tr>
<tr>
@ -159,7 +159,7 @@ helper.centrate_nodes(0, node_1, node_2)
<td class="summary">Lerp between two values</td>
</tr>
<tr>
<td class="name" nowrap><a href="#helper.remove_with_shift">helper.remove_with_shift(array[, index[, shift_policy]])</a></td>
<td class="name" nowrap><a href="#helper.remove_with_shift">helper.remove_with_shift(array, index, shift_policy)</a></td>
<td class="summary">Remove value from array with shift policy</td>
</tr>
<tr>
@ -189,7 +189,7 @@ helper.centrate_nodes(0, node_1, node_2)
<dl class="function">
<dt>
<a name = "helper.add_array"></a>
<strong>helper.add_array(target[, source])</strong>
<strong>helper.add_array(target, source)</strong>
</dt>
<dd>
Add all elements from source array to the target array
@ -202,9 +202,8 @@ helper.centrate_nodes(0, node_1, node_2)
Array to put elements from source
</li>
<li><span class="parameter">source</span>
<span class="types"><span class="type">any[]</span></span>
<span class="types"><span class="type">any[]</span> or <span class="type">nil</span></span>
The source array to get elements from
(<em>optional</em>)
</li>
</ul>
@ -379,7 +378,7 @@ helper.centrate_nodes(0, node_1, node_2)
</dd>
<dt>
<a name = "helper.get_border"></a>
<strong>helper.get_border(node[, offset])</strong>
<strong>helper.get_border(node, offset)</strong>
</dt>
<dd>
Distance from node position to his borders
@ -392,9 +391,8 @@ helper.centrate_nodes(0, node_1, node_2)
GUI node
</li>
<li><span class="parameter">offset</span>
<span class="types"><span class="type">vector3</span></span>
<span class="types"><span class="type">vector3</span> or <span class="type">nil</span></span>
Offset from node position. Pass current node position to get non relative border values
(<em>optional</em>)
</li>
</ul>
@ -529,7 +527,7 @@ helper.centrate_nodes(0, node_1, node_2)
Gui node
</li>
<li><span class="parameter">include_passed_node_scale</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
True if add current node scale to result
</li>
</ul>
@ -606,7 +604,7 @@ helper.centrate_nodes(0, node_1, node_2)
</dd>
<dt>
<a name = "helper.insert_with_shift"></a>
<strong>helper.insert_with_shift(array, any[, index[, shift_policy]])</strong>
<strong>helper.insert_with_shift(array, any, index, shift_policy)</strong>
</dt>
<dd>
Add value to array with shift policy Shift policy can be: left, right, no_shift
@ -622,14 +620,12 @@ helper.centrate_nodes(0, node_1, node_2)
Item to insert
</li>
<li><span class="parameter">index</span>
<span class="types"><span class="type">number</span></span>
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
Index to insert. If nil, item will be inserted at the end of array
(<em>optional</em>)
</li>
<li><span class="parameter">shift_policy</span>
<span class="types"><span class="type">number</span></span>
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
The druid_const.SHIFT.* constant
(<em>optional</em>)
</li>
</ul>
@ -721,7 +717,7 @@ helper.centrate_nodes(0, node_1, node_2)
</dd>
<dt>
<a name = "helper.remove_with_shift"></a>
<strong>helper.remove_with_shift(array[, index[, shift_policy]])</strong>
<strong>helper.remove_with_shift(array, index, shift_policy)</strong>
</dt>
<dd>
Remove value from array with shift policy Shift policy can be: left, right, no_shift
@ -734,14 +730,12 @@ helper.centrate_nodes(0, node_1, node_2)
Array
</li>
<li><span class="parameter">index</span>
<span class="types"><span class="type">number</span></span>
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
Index to remove. If nil, item will be removed from the end of array
(<em>optional</em>)
</li>
<li><span class="parameter">shift_policy</span>
<span class="types"><span class="type">number</span></span>
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
The druid_const.SHIFT.* constant
(<em>optional</em>)
</li>
</ul>

View File

@ -83,11 +83,11 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#add_hotkey">add_hotkey(self, keys[, callback_argument])</a></td>
<td class="name" nowrap><a href="#add_hotkey">add_hotkey(self, keys, callback_argument)</a></td>
<td class="summary">Add hotkey for component callback</td>
</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">The <a href="../modules/Hotkey.html#">Hotkey</a> constructor</td>
</tr>
</table>
@ -127,7 +127,7 @@
<dl class="function">
<dt>
<a name = "add_hotkey"></a>
<strong>add_hotkey(self, keys[, callback_argument])</strong>
<strong>add_hotkey(self, keys, callback_argument)</strong>
</dt>
<dd>
Add hotkey for component callback
@ -144,9 +144,8 @@
that have to be pressed before key pressed to activate
</li>
<li><span class="parameter">callback_argument</span>
<span class="types"><span class="type">any</span></span>
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
The argument to pass into the callback function
(<em>optional</em>)
</li>
</ul>
@ -157,7 +156,7 @@
</dd>
<dt>
<a name = "init"></a>
<strong>init(self, keys, callback[, callback_argument])</strong>
<strong>init(self, keys, callback, callback_argument)</strong>
</dt>
<dd>
The <a href="../modules/Hotkey.html#">Hotkey</a> constructor
@ -178,9 +177,8 @@
The callback function
</li>
<li><span class="parameter">callback_argument</span>
<span class="types"><span class="type">any</span></span>
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
The argument to pass into the callback function
(<em>optional</em>)
</li>
</ul>

View File

@ -286,7 +286,7 @@
<a href="../modules/Hover.html#">Hover</a>
</li>
<li><span class="parameter">state</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
The hover enabled state
</li>
</ul>
@ -311,7 +311,7 @@
<a href="../modules/Hover.html#">Hover</a>
</li>
<li><span class="parameter">state</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
The hover state
</li>
</ul>
@ -336,7 +336,7 @@
<a href="../modules/Hover.html#">Hover</a>
</li>
<li><span class="parameter">state</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
The mouse hover state
</li>
</ul>

View File

@ -93,7 +93,7 @@
<td class="summary">Return current input field text</td>
</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">The <a href="../modules/Input.html#">Input</a> constructor</td>
</tr>
<tr>
@ -220,7 +220,7 @@
</dd>
<dt>
<a name = "init"></a>
<strong>init(self, click_node, text_node[, keyboard_type])</strong>
<strong>init(self, click_node, text_node, keyboard_type)</strong>
</dt>
<dd>
The <a href="../modules/Input.html#">Input</a> constructor
@ -241,9 +241,8 @@
Text node what will be changed on user input. You can pass text component instead of text node name <a href="../modules/Text.html#">Text</a>
</li>
<li><span class="parameter">keyboard_type</span>
<span class="types"><span class="type">number</span></span>
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
Gui keyboard type for input field
(<em>optional</em>)
</li>
</ul>

View File

@ -89,11 +89,11 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#format">format(self[, a[, b[, c[, d[, e[, f[, g]]]]]]])</a></td>
<td class="name" nowrap><a href="#format">format(self, a, b, c, d, e, f, g)</a></td>
<td class="summary">Format string with new text params on localized text</td>
</tr>
<tr>
<td class="name" nowrap><a href="#init">init(self, node, locale_id[, adjust_type=downscale])</a></td>
<td class="name" nowrap><a href="#init">init(self, node[, locale_id=node_text[, adjust_type=downscale]])</a></td>
<td class="summary">The <a href="../modules/LangText.html#">LangText</a> constructor</td>
</tr>
<tr>
@ -101,7 +101,7 @@
<td class="summary">Setup raw text to lang_text component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#translate">translate(self, locale_id[, a[, b[, c[, d[, e[, f[, g]]]]]]])</a></td>
<td class="name" nowrap><a href="#translate">translate(self, locale_id, a, b, c, d, e, f, g)</a></td>
<td class="summary">Translate the text by locale_id</td>
</tr>
</table>
@ -126,7 +126,7 @@
<dl class="function">
<dt>
<a name = "format"></a>
<strong>format(self[, a[, b[, c[, d[, e[, f[, g]]]]]]])</strong>
<strong>format(self, a, b, c, d, e, f, g)</strong>
</dt>
<dd>
Format string with new text params on localized text
@ -139,39 +139,32 @@
<a href="../modules/LangText.html#">LangText</a>
</li>
<li><span class="parameter">a</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Optional param to string.format
(<em>optional</em>)
</li>
<li><span class="parameter">b</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Optional param to string.format
(<em>optional</em>)
</li>
<li><span class="parameter">c</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Optional param to string.format
(<em>optional</em>)
</li>
<li><span class="parameter">d</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Optional param to string.format
(<em>optional</em>)
</li>
<li><span class="parameter">e</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Optional param to string.format
(<em>optional</em>)
</li>
<li><span class="parameter">f</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Optional param to string.format
(<em>optional</em>)
</li>
<li><span class="parameter">g</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Optional param to string.format
(<em>optional</em>)
</li>
</ul>
@ -188,7 +181,7 @@
</dd>
<dt>
<a name = "init"></a>
<strong>init(self, node, locale_id[, adjust_type=downscale])</strong>
<strong>init(self, node[, locale_id=node_text[, adjust_type=downscale]])</strong>
</dt>
<dd>
The <a href="../modules/LangText.html#">LangText</a> constructor
@ -202,11 +195,12 @@
</li>
<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>
Node name or GUI Text Node itself
The node_id or gui.get_node(node_id)
</li>
<li><span class="parameter">locale_id</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
Default locale id or text from node as default
(<em>default</em> node_text)
</li>
<li><span class="parameter">adjust_type</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
@ -253,7 +247,7 @@
</dd>
<dt>
<a name = "translate"></a>
<strong>translate(self, locale_id[, a[, b[, c[, d[, e[, f[, g]]]]]]])</strong>
<strong>translate(self, locale_id, a, b, c, d, e, f, g)</strong>
</dt>
<dd>
Translate the text by locale_id
@ -270,39 +264,32 @@
Locale id
</li>
<li><span class="parameter">a</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Optional param to string.format
(<em>optional</em>)
</li>
<li><span class="parameter">b</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Optional param to string.format
(<em>optional</em>)
</li>
<li><span class="parameter">c</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Optional param to string.format
(<em>optional</em>)
</li>
<li><span class="parameter">d</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Optional param to string.format
(<em>optional</em>)
</li>
<li><span class="parameter">e</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Optional param to string.format
(<em>optional</em>)
</li>
<li><span class="parameter">f</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Optional param to string.format
(<em>optional</em>)
</li>
<li><span class="parameter">g</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Optional param to string.format
(<em>optional</em>)
</li>
</ul>

View File

@ -82,7 +82,7 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#fit_into_node">fit_into_node(self[, node])</a></td>
<td class="name" nowrap><a href="#fit_into_node">fit_into_node(self, node)</a></td>
<td class="summary">Set node for layout node to fit inside it.</td>
</tr>
<tr>
@ -94,7 +94,7 @@
<td class="summary">Set current size for layout node to fit inside it</td>
</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">The <a href="../modules/Layout.html#">Layout</a> constructor</td>
</tr>
<tr>
@ -143,7 +143,7 @@
<dl class="function">
<dt>
<a name = "fit_into_node"></a>
<strong>fit_into_node(self[, node])</strong>
<strong>fit_into_node(self, node)</strong>
</dt>
<dd>
Set node for layout node to fit inside it. Pass nil to reset
@ -156,9 +156,8 @@
<a href="../modules/Layout.html#">Layout</a>
</li>
<li><span class="parameter">node</span>
<span class="types"><a class="type" href="../modules/Layout.html#node">node</a></span>
<span class="types"><a class="type" href="../modules/Layout.html#node">node</a> or <span class="type">nil</span></span>
(<em>optional</em>)
</li>
</ul>
@ -233,7 +232,7 @@
</dd>
<dt>
<a name = "init"></a>
<strong>init(self, node, mode[, on_size_changed_callback])</strong>
<strong>init(self, node, mode, on_size_changed_callback)</strong>
</dt>
<dd>
The <a href="../modules/Layout.html#">Layout</a> constructor
@ -254,9 +253,8 @@
The layout mode (from const.LAYOUT_MODE)
</li>
<li><span class="parameter">on_size_changed_callback</span>
<span class="types"><span class="type">function</span></span>
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
The callback on window resize
(<em>optional</em>)
</li>
</ul>

View File

@ -119,7 +119,7 @@
<td class="summary">Instant fill progress bar to value</td>
</tr>
<tr>
<td class="name" nowrap><a href="#to">to(self, to[, callback])</a></td>
<td class="name" nowrap><a href="#to">to(self, to, callback)</a></td>
<td class="summary">Start animation of a progress bar</td>
</tr>
</table>
@ -357,7 +357,7 @@
</dd>
<dt>
<a name = "to"></a>
<strong>to(self, to[, callback])</strong>
<strong>to(self, to, callback)</strong>
</dt>
<dd>
Start animation of a progress bar
@ -374,9 +374,8 @@
value between 0..1
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
Callback on animation ends
(<em>optional</em>)
</li>
</ul>

View File

@ -193,7 +193,7 @@
Index in radio group
</li>
<li><span class="parameter">is_instant</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
If is instant state change
</li>
</ul>

View File

@ -128,15 +128,15 @@
<td class="summary">Check node if it visible now on scroll.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#scroll_to">scroll_to(self, point[, is_instant])</a></td>
<td class="name" nowrap><a href="#scroll_to">scroll_to(self, point, is_instant)</a></td>
<td class="summary">Start scroll to target point.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#scroll_to_index">scroll_to_index(self, index[, skip_cb])</a></td>
<td class="name" nowrap><a href="#scroll_to_index">scroll_to_index(self, index, skip_cb)</a></td>
<td class="summary">Scroll to item in scroll by point index.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#scroll_to_percent">scroll_to_percent(self, percent[, is_instant])</a></td>
<td class="name" nowrap><a href="#scroll_to_percent">scroll_to_percent(self, percent, is_instant)</a></td>
<td class="summary">Start scroll to target scroll percent</td>
</tr>
<tr>
@ -415,7 +415,7 @@
</dd>
<dt>
<a name = "scroll_to"></a>
<strong>scroll_to(self, point[, is_instant])</strong>
<strong>scroll_to(self, point, is_instant)</strong>
</dt>
<dd>
Start scroll to target point.
@ -432,9 +432,8 @@
Target point
</li>
<li><span class="parameter">is_instant</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
Instant scroll flag
(<em>optional</em>)
</li>
</ul>
@ -450,7 +449,7 @@
</dd>
<dt>
<a name = "scroll_to_index"></a>
<strong>scroll_to_index(self, index[, skip_cb])</strong>
<strong>scroll_to_index(self, index, skip_cb)</strong>
</dt>
<dd>
Scroll to item in scroll by point index.
@ -467,9 +466,8 @@
Point index
</li>
<li><span class="parameter">skip_cb</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
If true, skip the point callback
(<em>optional</em>)
</li>
</ul>
@ -480,7 +478,7 @@
</dd>
<dt>
<a name = "scroll_to_percent"></a>
<strong>scroll_to_percent(self, percent[, is_instant])</strong>
<strong>scroll_to_percent(self, percent, is_instant)</strong>
</dt>
<dd>
Start scroll to target scroll percent
@ -497,9 +495,8 @@
target percent
</li>
<li><span class="parameter">is_instant</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
instant scroll flag
(<em>optional</em>)
</li>
</ul>
@ -586,7 +583,7 @@
<a href="../modules/Scroll.html#">Scroll</a>
</li>
<li><span class="parameter">state</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
True, if horizontal scroll is enabled
</li>
</ul>
@ -619,7 +616,7 @@
<a href="../modules/Scroll.html#">Scroll</a>
</li>
<li><span class="parameter">state</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
Inert scroll state
</li>
</ul>
@ -718,7 +715,7 @@
<a href="../modules/Scroll.html#">Scroll</a>
</li>
<li><span class="parameter">state</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
True, if vertical scroll is enabled
</li>
</ul>

View File

@ -82,11 +82,11 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<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">The <a href="../modules/Slider.html#">Slider</a> constructor</td>
</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>
<td class="summary">Set value for slider</td>
</tr>
<tr>
@ -147,7 +147,7 @@
<dl class="function">
<dt>
<a name = "init"></a>
<strong>init(self, node, end_pos[, callback])</strong>
<strong>init(self, node, end_pos, callback)</strong>
</dt>
<dd>
The <a href="../modules/Slider.html#">Slider</a> constructor
@ -168,9 +168,8 @@
The end position of slider
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
On slider change callback
(<em>optional</em>)
</li>
</ul>
@ -181,7 +180,7 @@
</dd>
<dt>
<a name = "set"></a>
<strong>set(self, value[, is_silent])</strong>
<strong>set(self, value, is_silent)</strong>
</dt>
<dd>
Set value for slider
@ -198,9 +197,8 @@
Value from 0 to 1
</li>
<li><span class="parameter">is_silent</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
Don't trigger event if true
(<em>optional</em>)
</li>
</ul>

View File

@ -102,7 +102,7 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#add">add(self, item[, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]]])</a></td>
<td class="name" nowrap><a href="#add">add(self, item, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]])</a></td>
<td class="summary">Add new item to the grid</td>
</tr>
<tr>
@ -230,7 +230,7 @@
<dl class="function">
<dt>
<a name = "add"></a>
<strong>add(self, item[, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]]])</strong>
<strong>add(self, item, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]])</strong>
</dt>
<dd>
Add new item to the grid
@ -247,9 +247,8 @@
Gui node
</li>
<li><span class="parameter">index</span>
<span class="types"><span class="type">number</span></span>
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
The item position. By default add as last item
(<em>optional</em>)
</li>
<li><span class="parameter">shift_policy</span>
<span class="types"><span class="type">number</span></span>

View File

@ -231,9 +231,8 @@
<ul>
<li><span class="parameter">click_zone</span>
<span class="types"><a class="type" href="../modules/Swipe.html#node">node</a></span>
<span class="types"><a class="type" href="../modules/Swipe.html#node">node</a> or <span class="type">nil</span></span>
(<em>optional</em>)
</li>
</ul>

View File

@ -105,11 +105,11 @@
<td class="summary">Return current text adjust type</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_text_size">get_text_size(self[, text])</a></td>
<td class="name" nowrap><a href="#get_text_size">get_text_size(self, text)</a></td>
<td class="summary">Calculate text width with font with respect to trailing space</td>
</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">The <a href="../modules/Text.html#">Text</a> constructor</td>
</tr>
<tr>
@ -137,7 +137,7 @@
<td class="summary">Set scale</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_text_adjust">set_text_adjust(self[, adjust_type[, minimal_scale]])</a></td>
<td class="name" nowrap><a href="#set_text_adjust">set_text_adjust(self, adjust_type, minimal_scale)</a></td>
<td class="summary">Set text adjust, refresh the current text visuals, if needed</td>
</tr>
<tr>
@ -242,7 +242,7 @@
</dd>
<dt>
<a name = "get_text_size"></a>
<strong>get_text_size(self[, text])</strong>
<strong>get_text_size(self, text)</strong>
</dt>
<dd>
Calculate text width with font with respect to trailing space
@ -255,9 +255,8 @@
<a href="../modules/Text.html#">Text</a>
</li>
<li><span class="parameter">text</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
(<em>optional</em>)
</li>
</ul>
@ -277,7 +276,7 @@
</dd>
<dt>
<a name = "init"></a>
<strong>init(self, node[, value[, adjust_type=downscale]])</strong>
<strong>init(self, node, value[, adjust_type=downscale])</strong>
</dt>
<dd>
The <a href="../modules/Text.html#">Text</a> constructor
@ -294,9 +293,8 @@
Node name or GUI Text Node itself
</li>
<li><span class="parameter">value</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></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">nil</span></span>
Initial text. Default value is node text from GUI scene.
(<em>optional</em>)
</li>
<li><span class="parameter">adjust_type</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
@ -494,7 +492,7 @@
</dd>
<dt>
<a name = "set_text_adjust"></a>
<strong>set_text_adjust(self[, adjust_type[, minimal_scale]])</strong>
<strong>set_text_adjust(self, adjust_type, minimal_scale)</strong>
</dt>
<dd>
Set text adjust, refresh the current text visuals, if needed
@ -507,14 +505,12 @@
<a href="../modules/Text.html#">Text</a>
</li>
<li><span class="parameter">adjust_type</span>
<span class="types"><span class="type">number</span></span>
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
See const.TEXT_ADJUST. If pass nil - use current adjust type
(<em>optional</em>)
</li>
<li><span class="parameter">minimal_scale</span>
<span class="types"><span class="type">number</span></span>
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
If pass nil - not use minimal scale
(<em>optional</em>)
</li>
</ul>

View File

@ -84,7 +84,7 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<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">The <a href="../modules/Timer.html#">Timer</a> constructor</td>
</tr>
<tr>
@ -141,7 +141,7 @@
<dl class="function">
<dt>
<a name = "init"></a>
<strong>init(self, node, seconds_from[, seconds_to=0[, callback]])</strong>
<strong>init(self, node, seconds_from[, seconds_to=0], callback)</strong>
</dt>
<dd>
The <a href="../modules/Timer.html#">Timer</a> constructor
@ -167,9 +167,8 @@
(<em>default</em> 0)
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
Function on timer end
(<em>optional</em>)
</li>
</ul>
@ -222,7 +221,7 @@
<a href="../modules/Timer.html#">Timer</a>
</li>
<li><span class="parameter">is_on</span>
<span class="types"><span class="type">boolean</span></span>
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
Timer enable state
</li>
</ul>

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -71,7 +71,7 @@ end
--
-- Don't change node enabled state itself.
-- @tparam Blocker self @{Blocker}
-- @tparam boolean state Enabled state
-- @tparam boolean|nil state Enabled state
function Blocker.set_enabled(self, state)
self._is_enabled = state
end

View File

@ -282,10 +282,10 @@ end
--- The @{Button} constructor
-- @tparam Button self @{Button}
-- @tparam string|node node Node name or GUI Node itself
-- @tparam string|node node The node_id or gui.get_node(node_id)
-- @tparam function callback On click button callback
-- @tparam[opt] any custom_args Button events custom arguments
-- @tparam[opt] string|node anim_node Node to animate instead of trigger node.
-- @tparam any|nil custom_args Button events custom arguments
-- @tparam string|node|nil anim_node Node to animate instead of trigger node.
function Button.init(self, node, callback, custom_args, anim_node)
self.druid = self:get_druid()
self.node = self:get_node(node)
@ -447,7 +447,7 @@ end
-- The style.on_set_enabled will be triggered.
-- Disabled button is not clickable.
-- @tparam Button self @{Button}
-- @tparam boolean state Enabled state
-- @tparam boolean|nil state Enabled state
-- @treturn Button Current button instance
-- @usage
-- button:set_enabled(false)
@ -515,8 +515,8 @@ end
--- Set function for additional check for button click availability
-- @tparam Button self
-- @tparam[opt] function check_function Should return true or false. If true - button can be pressed.
-- @tparam[opt] function failure_callback Function will be called on button click, if check function return false
-- @tparam function|nil check_function Should return true or false. If true - button can be pressed.
-- @tparam function|nil failure_callback Function will be called on button click, if check function return false
-- @treturn Button Current button instance
function Button.set_check_function(self, check_function, failure_callback)
self._check_function = check_function
@ -531,7 +531,7 @@ end
--
-- If the game is not HTML, html mode will be not enabled
-- @tparam Button self
-- @tparam[opt] boolean is_web_mode If true - button will be called inside html5 callback
-- @tparam boolean|nil is_web_mode If true - button will be called inside html5 callback
-- @treturn Button Current button instance
-- @usage
-- button:set_web_user_interaction(true)

View File

@ -313,7 +313,7 @@ end
--- Set Drag input enabled or disabled
-- @tparam Drag self @{Drag}
-- @tparam boolean is_enabled
-- @tparam boolean|nil is_enabled
function Drag.set_enabled(self, is_enabled)
self._is_enabled = is_enabled
end

View File

@ -89,7 +89,7 @@ end
--- Set hover state
-- @tparam Hover self @{Hover}
-- @tparam boolean state The hover state
-- @tparam boolean|nil state The hover state
function Hover.set_hover(self, state)
if self._is_hovered ~= state then
self._is_hovered = state
@ -108,7 +108,7 @@ end
--- Set mouse hover state
-- @tparam Hover self @{Hover}
-- @tparam boolean state The mouse hover state
-- @tparam boolean|nil state The mouse hover state
function Hover.set_mouse_hover(self, state)
if self._is_mouse_hovered ~= state then
self._is_mouse_hovered = state
@ -138,7 +138,7 @@ end
-- If hover is not enabled, it will not generate
-- any hover events
-- @tparam Hover self @{Hover}
-- @tparam boolean state The hover enabled state
-- @tparam boolean|nil state The hover enabled state
function Hover.set_enabled(self, state)
self._is_enabled = state

View File

@ -234,7 +234,7 @@ end
--- Start scroll to target point.
-- @tparam Scroll self @{Scroll}
-- @tparam vector3 point Target point
-- @tparam[opt] boolean is_instant Instant scroll flag
-- @tparam boolean|nil is_instant Instant scroll flag
-- @usage scroll:scroll_to(vmath.vector3(0, 50, 0))
-- @usage scroll:scroll_to(vmath.vector3(0), true)
function Scroll.scroll_to(self, point, is_instant)
@ -268,7 +268,7 @@ end
--- Scroll to item in scroll by point index.
-- @tparam Scroll self @{Scroll}
-- @tparam number index Point index
-- @tparam[opt] boolean skip_cb If true, skip the point callback
-- @tparam boolean|nil skip_cb If true, skip the point callback
function Scroll.scroll_to_index(self, index, skip_cb)
if not self.points then
return
@ -291,7 +291,7 @@ end
--- Start scroll to target scroll percent
-- @tparam Scroll self @{Scroll}
-- @tparam vector3 percent target percent
-- @tparam[opt] boolean is_instant instant scroll flag
-- @tparam boolean|nil is_instant instant scroll flag
-- @usage scroll:scroll_to_percent(vmath.vector3(0.5, 0, 0))
function Scroll.scroll_to_percent(self, percent, is_instant)
local border = self.available_pos
@ -339,7 +339,7 @@ end
-- If disabled, scroll through points (if exist)
-- If no points, just simple drag without inertion
-- @tparam Scroll self @{Scroll}
-- @tparam boolean state Inert scroll state
-- @tparam boolean|nil state Inert scroll state
-- @treturn druid.scroll Current scroll instance
function Scroll.set_inert(self, state)
self._is_inert = state
@ -397,7 +397,7 @@ end
--- Lock or unlock horizontal scroll
-- @tparam Scroll self @{Scroll}
-- @tparam boolean state True, if horizontal scroll is enabled
-- @tparam boolean|nil state True, if horizontal scroll is enabled
-- @treturn druid.scroll Current scroll instance
function Scroll.set_horizontal_scroll(self, state)
self._is_horizontal_scroll = state
@ -408,7 +408,7 @@ end
--- Lock or unlock vertical scroll
-- @tparam Scroll self @{Scroll}
-- @tparam boolean state True, if vertical scroll is enabled
-- @tparam boolean|nil state True, if vertical scroll is enabled
-- @treturn druid.scroll Current scroll instance
function Scroll.set_vertical_scroll(self, state)
self._is_vertical_scroll = state

View File

@ -214,7 +214,7 @@ end
--- Add new item to the grid
-- @tparam StaticGrid self @{StaticGrid}
-- @tparam node item Gui node
-- @tparam[opt] number index The item position. By default add as last item
-- @tparam number|nil index The item position. By default add as last item
-- @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
function StaticGrid.add(self, item, index, shift_policy, is_instant)
@ -379,7 +379,7 @@ end
--- Update grid inner state
-- @tparam StaticGrid self @{StaticGrid}
-- @tparam boolean is_instant If true, node position update instantly, otherwise with set_position_function callback
-- @tparam boolean|nil is_instant If true, node position update instantly, otherwise with set_position_function callback
-- @local
function StaticGrid._update(self, is_instant)
self:_update_indexes()
@ -425,7 +425,7 @@ end
--- Update grid nodes position
-- @tparam StaticGrid self @{StaticGrid}
-- @tparam boolean is_instant If true, node position update instantly, otherwise with set_position_function callback
-- @tparam boolean|nil is_instant If true, node position update instantly, otherwise with set_position_function callback
-- @local
function StaticGrid._update_pos(self, is_instant)
local zero_offset = self:_get_zero_offset()

View File

@ -225,7 +225,7 @@ end
--- The @{Text} constructor
-- @tparam Text self @{Text}
-- @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 string|nil value Initial text. Default value is node text from GUI scene.
-- @tparam[opt=downscale] string adjust_type Adjust type for text. By default is DOWNSCALE. Look const.TEXT_ADJUST for reference
function Text.init(self, node, value, adjust_type)
self.node = self:get_node(node)
@ -273,7 +273,7 @@ end
--- Calculate text width with font with respect to trailing space
-- @tparam Text self @{Text}
-- @tparam[opt] string text
-- @tparam string|nil text
-- @treturn number Width
-- @treturn number Height
function Text.get_text_size(self, text)
@ -392,8 +392,8 @@ end
--- Set text adjust, refresh the current text visuals, if needed
-- @tparam Text self @{Text}
-- @tparam[opt] number adjust_type See const.TEXT_ADJUST. If pass nil - use current adjust type
-- @tparam[opt] number minimal_scale If pass nil - not use minimal scale
-- @tparam number|nil adjust_type See const.TEXT_ADJUST. If pass nil - use current adjust type
-- @tparam number|nil minimal_scale If pass nil - not use minimal scale
-- @treturn Text Current text instance
function Text.set_text_adjust(self, adjust_type, minimal_scale)
self.adjust_type = adjust_type

View File

@ -242,7 +242,7 @@ end
-- Default value: 10
-- @tparam BaseComponent self @{BaseComponent}
-- @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|nil is_temporary If true, the reset input priority will return to previous value
-- @treturn number The component input priority
function BaseComponent.set_input_priority(self, value, is_temporary)
assert(value)
@ -290,7 +290,7 @@ end
--
-- If input is disabled, the component will not receive input events
-- @tparam BaseComponent self @{BaseComponent}
-- @tparam boolean state The component input state
-- @tparam boolean|nil state The component input state
-- @treturn BaseComponent BaseComponent itself
function BaseComponent.set_input_enabled(self, state)
self._meta.input_enabled = state
@ -376,7 +376,7 @@ end
--- Set debug logs for component enabled or disabled
-- @tparam BaseComponent self @{BaseComponent}
-- @tparam boolean is_debug
-- @tparam boolean|nil is_debug
-- @local
function BaseComponent.set_debug(self, is_debug)
self._component.is_debug = is_debug

View File

@ -92,7 +92,7 @@ end
--
-- @function druid.new
-- @tparam table context The Druid context. Usually, this is the self of the gui_script. It is passed into all Druid callbacks.
-- @tparam[opt] table style The Druid style table to override style parameters for this Druid instance.
-- @tparam table|nil style The Druid style table to override style parameters for this Druid instance.
-- @treturn druid_instance The Druid instance @{DruidInstance}.
-- @usage
-- local druid = require("druid.druid")

View File

@ -15,7 +15,7 @@ local DruidEvent = class("druid.event")
--- DruidEvent constructor
-- @tparam DruidEvent self @{DruidEvent}
-- @tparam[opt] function initial_callback Subscribe the callback on new event, if callback exist
-- @tparam function|nil initial_callback Subscribe the callback on new event, if callback exist
-- @usage
-- local Event = require("druid.event")
-- ...
@ -32,7 +32,7 @@ end
--- Subscribe callback on event
-- @tparam DruidEvent self @{DruidEvent}
-- @tparam function callback Callback itself
-- @tparam[opt] any context Additional context as first param to callback call, usually it's self
-- @tparam any|nil context Additional context as first param to callback call, usually it's self
-- @usage
-- local function on_long_callback(self)
-- print("Long click!")
@ -57,7 +57,7 @@ end
--- Unsubscribe callback on event
-- @tparam DruidEvent self @{DruidEvent}
-- @tparam function callback Callback itself
-- @tparam[opt] any context Additional context as first param to callback call
-- @tparam any|nil context Additional context as first param to callback call
-- @usage
-- local function on_long_callback(self)
-- print("Long click!")

View File

@ -71,9 +71,9 @@ end
--- Set checkbox state
-- @tparam Checkbox self @{Checkbox}
-- @tparam boolean state Checkbox state
-- @tparam boolean is_silent Don't trigger on_change_state if true
-- @tparam boolean is_instant If instant checkbox change
-- @tparam boolean|nil state Checkbox state
-- @tparam boolean|nil is_silent Don't trigger on_change_state if true
-- @tparam boolean|nil is_instant If instant checkbox change
function Checkbox.set_state(self, state, is_silent, is_instant)
self.state = state
self.style.on_change_state(self, self.node, state, is_instant)

View File

@ -46,7 +46,7 @@ end
--- Set checkbox group state
-- @tparam CheckboxGroup self @{CheckboxGroup}
-- @tparam boolean[] indexes Array of checkbox state
-- @tparam boolean is_instant If instant state change
-- @tparam boolean|nil is_instant If instant state change
function CheckboxGroup.set_state(self, indexes, is_instant)
for i = 1, #indexes do
if self.checkboxes[i] then

View File

@ -100,7 +100,7 @@ end
-- @tparam DynamicGrid self @{DynamicGrid}
-- @tparam number index The grid element index
-- @tparam node node The node to be placed
-- @tparam[opt] number origin_index Index of nearby node
-- @tparam number|nil origin_index Index of nearby node
-- @treturn vector3 Node position
function DynamicGrid.get_pos(self, index, node, origin_index)
local origin_node = self.nodes[origin_index]
@ -140,7 +140,7 @@ end
--- Add new node to the grid
-- @tparam DynamicGrid self @{DynamicGrid}
-- @tparam node node Gui node
-- @tparam[opt] number index The node position. By default add as last node
-- @tparam number|nil index The node position. By default add as last node
-- @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
function DynamicGrid.add(self, node, index, shift_policy, is_instant)
@ -322,7 +322,7 @@ end
--- Update grid inner state
-- @tparam DynamicGrid self @{DynamicGrid}
-- @tparam boolean is_instant If true, node position update instantly, otherwise with set_position_function callback
-- @tparam boolean|nil is_instant If true, node position update instantly, otherwise with set_position_function callback
-- @local
function DynamicGrid._update(self, is_instant)
self:_update_indexes()
@ -378,7 +378,7 @@ end
--- Update grid nodes position
-- @tparam DynamicGrid self @{DynamicGrid}
-- @tparam boolean is_instant If true, node position update instantly, otherwise with set_position_function callback
-- @tparam boolean|nil is_instant If true, node position update instantly, otherwise with set_position_function callback
-- @local
function DynamicGrid._update_pos(self, is_instant)
for index, node in pairs(self.nodes) do

View File

@ -31,7 +31,7 @@ local Hotkey = component.create("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 function callback The callback function
-- @tparam[opt] any callback_argument The argument to pass into the callback function
-- @tparam any|nil callback_argument The argument to pass into the callback function
function Hotkey.init(self, keys, callback, callback_argument)
self.druid = self:get_druid()
@ -63,7 +63,7 @@ end
--- Add hotkey for component callback
-- @tparam Hotkey self @{Hotkey}
-- @tparam string[]|hash[]|string|hash keys that have to be pressed before key pressed to activate
-- @tparam[opt] any callback_argument The argument to pass into the callback function
-- @tparam any|nil callback_argument The argument to pass into the callback function
function Hotkey.add_hotkey(self, keys, callback_argument)
keys = keys or {}
if type(keys) == "string" then

View File

@ -119,7 +119,7 @@ end
-- @tparam Input self @{Input}
-- @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[opt] number keyboard_type Gui keyboard type for input field
-- @tparam number|nil keyboard_type Gui keyboard type for input field
function Input.init(self, click_node, text_node, keyboard_type)
self.druid = self:get_druid(self)

View File

@ -34,8 +34,8 @@ local LangText = component.create("lang_text")
--- The @{LangText} constructor
-- @tparam LangText self @{LangText}
-- @tparam string|node node Node name or GUI Text Node itself
-- @tparam string locale_id Default locale id or text from node as default
-- @tparam string|node node The node_id or gui.get_node(node_id)
-- @tparam[opt=node_text] string locale_id Default locale id or text from node as default
-- @tparam[opt=downscale] string adjust_type Adjust type for text. By default is DOWNSCALE. Look const.TEXT_ADJUST for reference
function LangText.init(self, node, locale_id, adjust_type)
self.druid = self:get_druid()
@ -75,13 +75,13 @@ end
--- Translate the text by locale_id
-- @tparam LangText self @{LangText}
-- @tparam string locale_id Locale id
-- @tparam[opt] string a Optional param to string.format
-- @tparam[opt] string b Optional param to string.format
-- @tparam[opt] string c Optional param to string.format
-- @tparam[opt] string d Optional param to string.format
-- @tparam[opt] string e Optional param to string.format
-- @tparam[opt] string f Optional param to string.format
-- @tparam[opt] string g Optional param to string.format
-- @tparam string|nil a Optional param to string.format
-- @tparam string|nil b Optional param to string.format
-- @tparam string|nil c Optional param to string.format
-- @tparam string|nil d Optional param to string.format
-- @tparam string|nil e Optional param to string.format
-- @tparam string|nil f Optional param to string.format
-- @tparam string|nil g Optional param to string.format
-- @treturn LangText Current instance
function LangText.translate(self, locale_id, a, b, c, d, e, f, g)
self.last_locale_args = { a, b, c, d, e, f, g }
@ -94,13 +94,13 @@ end
--- Format string with new text params on localized text
-- @tparam LangText self @{LangText}
-- @tparam[opt] string a Optional param to string.format
-- @tparam[opt] string b Optional param to string.format
-- @tparam[opt] string c Optional param to string.format
-- @tparam[opt] string d Optional param to string.format
-- @tparam[opt] string e Optional param to string.format
-- @tparam[opt] string f Optional param to string.format
-- @tparam[opt] string g Optional param to string.format
-- @tparam string|nil a Optional param to string.format
-- @tparam string|nil b Optional param to string.format
-- @tparam string|nil c Optional param to string.format
-- @tparam string|nil d Optional param to string.format
-- @tparam string|nil e Optional param to string.format
-- @tparam string|nil f Optional param to string.format
-- @tparam string|nil g Optional param to string.format
-- @treturn LangText Current instance
function LangText.format(self, a, b, c, d, e, f, g)
self.last_locale_args = { a, b, c, d, e, f, g }

View File

@ -32,7 +32,7 @@ local Layout = component.create("layout")
-- @tparam Layout self @{Layout}
-- @tparam node node Gui node
-- @tparam string mode The layout mode (from const.LAYOUT_MODE)
-- @tparam[opt] function on_size_changed_callback The callback on window resize
-- @tparam function|nil on_size_changed_callback The callback on window resize
function Layout.init(self, node, mode, on_size_changed_callback)
self.node = self:get_node(node)
@ -194,7 +194,7 @@ end
--- Set node for layout node to fit inside it. Pass nil to reset
-- @tparam Layout self @{Layout}
-- @tparam[opt] node node
-- @tparam node|nil node
-- @treturn Layout @{Layout}
function Layout.fit_into_node(self, node)
self._fit_node = node

View File

@ -210,7 +210,7 @@ end
--- Start animation of a progress bar
-- @tparam Progress self @{Progress}
-- @tparam number to value between 0..1
-- @tparam[opt] function callback Callback on animation ends
-- @tparam function|nil callback Callback on animation ends
function Progress.to(self, to, callback)
to = helper.clamp(to, 0, 1)
-- cause of float error

View File

@ -55,7 +55,7 @@ end
--- Set radio group state
-- @tparam RadioGroup self @{RadioGroup}
-- @tparam number index Index in radio group
-- @tparam boolean is_instant If is instant state change
-- @tparam boolean|nil is_instant If is instant state change
function RadioGroup.set_state(self, index, is_instant)
on_checkbox_click(self, index, is_instant)
end

View File

@ -60,7 +60,7 @@ end
-- @tparam Slider self @{Slider}
-- @tparam node node Gui pin node
-- @tparam vector3 end_pos The end position of slider
-- @tparam[opt] function callback On slider change callback
-- @tparam function|nil callback On slider change callback
function Slider.init(self, node, end_pos, callback)
self.node = self:get_node(node)
@ -174,7 +174,7 @@ end
--- Set value for slider
-- @tparam Slider self @{Slider}
-- @tparam number value Value from 0 to 1
-- @tparam[opt] boolean is_silent Don't trigger event if true
-- @tparam boolean|nil is_silent Don't trigger event if true
function Slider.set(self, value, is_silent)
value = helper.clamp(value, 0, 1)
set_position(self, value)

View File

@ -13,7 +13,7 @@
-- @tparam node node
--- Restriction zone
-- @tparam[opt] node click_zone
-- @tparam node|nil click_zone
--- Trigger on swipe event(self, swipe_side, dist, delta_time)
-- @tfield DruidEvent on_swipe) @{DruidEvent}

View File

@ -49,7 +49,7 @@ end
-- @tparam node node Gui text node
-- @tparam number seconds_from Start timer value in seconds
-- @tparam[opt=0] number seconds_to End timer value in seconds
-- @tparam[opt] function callback Function on timer end
-- @tparam function|nil callback Function on timer end
function Timer.init(self, node, seconds_from, seconds_to, callback)
self.node = self:get_node(node)
seconds_from = math.max(seconds_from, 0)
@ -110,7 +110,7 @@ end
--- Called when update
-- @tparam Timer self @{Timer}
-- @tparam boolean is_on Timer enable state
-- @tparam boolean|nil is_on Timer enable state
function Timer.set_state(self, is_on)
self.is_on = is_on

View File

@ -48,8 +48,8 @@ end
-- Nodes will be center around 0 x position
-- text_node will be first (at left side)
-- @function helper.centrate_text_with_icon
-- @tparam[opt] text text_node Gui text node
-- @tparam[opt] box icon_node Gui box node
-- @tparam text|nil text_node Gui text node
-- @tparam box|nil icon_node Gui box node
-- @tparam number margin Offset between nodes
-- @local
function M.centrate_text_with_icon(text_node, icon_node, margin)
@ -61,8 +61,8 @@ end
-- Nodes will be center around 0 x position
-- icon_node will be first (at left side)
-- @function helper.centrate_icon_with_text
-- @tparam[opt] box icon_node Gui box node
-- @tparam[opt] text text_node Gui text node
-- @tparam box|nil icon_node Gui box node
-- @tparam text|nil text_node Gui text node
-- @tparam[opt=0] number margin Offset between nodes
-- @local
function M.centrate_icon_with_text(icon_node, text_node, margin)
@ -256,7 +256,7 @@ end
--- Add all elements from source array to the target array
-- @function helper.add_array
-- @tparam any[] target Array to put elements from source
-- @tparam[opt] any[] source The source array to get elements from
-- @tparam any[]|nil source The source array to get elements from
-- @treturn any[] The target array
function M.add_array(target, source)
assert(target)
@ -278,7 +278,7 @@ end
-- @tparam node node
-- @tparam number x
-- @tparam number y
-- @tparam[opt] Node node_click_area
-- @tparam node|nil node_click_area
-- @local
function M.pick_node(node, x, y, node_click_area)
local is_pick = gui.pick_node(node, x, y)
@ -302,7 +302,7 @@ end
--- Get cumulative parent's node scale
-- @function helper.get_scene_scale
-- @tparam node node Gui node
-- @tparam boolean include_passed_node_scale True if add current node scale to result
-- @tparam boolean|nil include_passed_node_scale True if add current node scale to result
-- @treturn vector3 The scene 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)
@ -394,7 +394,7 @@ end
--- Distance from node position to his borders
-- @function helper.get_border
-- @tparam node node GUI node
-- @tparam[opt] vector3 offset Offset from node position. Pass current node position to get non relative border values
-- @tparam vector3|nil offset Offset from node position. Pass current node position to get non relative border values
-- @treturn vector4 Vector4 with border values (left, top, right, down)
function M.get_border(node, offset)
local pivot = gui.get_pivot(node)
@ -452,8 +452,8 @@ end
-- @function helper.insert_with_shift
-- @tparam table array Array
-- @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 shift_policy The druid_const.SHIFT.* constant
-- @tparam number|nil index Index to insert. If nil, item will be inserted at the end of array
-- @tparam number|nil shift_policy The druid_const.SHIFT.* constant
-- @treturn any Inserted item
function M.insert_with_shift(array, item, index, shift_policy)
shift_policy = shift_policy or const.SHIFT.RIGHT
@ -483,8 +483,8 @@ end
-- Shift policy can be: left, right, no_shift
-- @function helper.remove_with_shift
-- @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 shift_policy The druid_const.SHIFT.* constant
-- @tparam number|nil index Index to remove. If nil, item will be removed from the end of array
-- @tparam number|nil shift_policy The druid_const.SHIFT.* constant
-- @treturn any Removed item
function M.remove_with_shift(array, index, shift_policy)
shift_policy = shift_policy or const.SHIFT.RIGHT

View File

@ -518,7 +518,7 @@ end
--- Set debug mode for current Druid instance. It's enable debug log messages
-- @tparam DruidInstance self @{DruidInstance}
-- @tparam boolean is_debug
-- @tparam boolean|nil is_debug
-- @treturn self @{DruidInstance}
-- @local
function DruidInstance.set_debug(self, is_debug)
@ -530,7 +530,7 @@ end
--- Log message, if is_debug mode is enabled
-- @tparam DruidInstance self @{DruidInstance}
-- @tparam string message
-- @tparam[opt] table context
-- @tparam table|nil context
-- @local
function DruidInstance.log_message(self, message, context)
if not self._is_debug then
@ -558,10 +558,10 @@ end
--- Create @{Button} component
-- @tparam DruidInstance self
-- @tparam node node GUI node
-- @tparam string|node node The node_id or gui.get_node(node_id)
-- @tparam function callback Button callback
-- @tparam[opt] table params Button callback params
-- @tparam[opt] node anim_node Button anim node (node, if not provided)
-- @tparam table|nil params Button callback params
-- @tparam node|nil anim_node Button anim node (node, if not provided)
-- @treturn Button @{Button} component
function DruidInstance.new_button(self, node, callback, params, anim_node)
return DruidInstance.new(self, button, node, callback, params, anim_node)
@ -570,7 +570,7 @@ end
--- Create @{Blocker} component
-- @tparam DruidInstance self
-- @tparam node node Gui node
-- @tparam string|node node The node_id or gui.get_node(node_id)
-- @treturn Blocker @{Blocker} component
function DruidInstance.new_blocker(self, node)
return DruidInstance.new(self, blocker, node)
@ -580,7 +580,7 @@ end
--- Create @{BackHandler} component
-- @tparam DruidInstance self
-- @tparam function callback @The callback(self, custom_args) to call on back event
-- @tparam[opt] any params Callback argument
-- @tparam any|nil params Callback argument
-- @treturn BackHandler @{BackHandler} component
function DruidInstance.new_back_handler(self, callback, params)
return DruidInstance.new(self, back_handler, callback, params)
@ -589,7 +589,7 @@ end
--- Create @{Hover} component
-- @tparam DruidInstance self
-- @tparam node node Gui node
-- @tparam string|node node The node_id or gui.get_node(node_id)
-- @tparam function on_hover_callback Hover callback
-- @treturn Hover @{Hover} component
function DruidInstance.new_hover(self, node, on_hover_callback)
@ -599,9 +599,9 @@ end
--- Create @{Text} component
-- @tparam DruidInstance self
-- @tparam node node Gui text node
-- @tparam[opt] string value Initial text. Default value is node text from GUI scene.
-- @tparam[opt] boolean no_adjust If true, text will be not auto-adjust size
-- @tparam string|node node The node_id or gui.get_node(node_id)
-- @tparam string|nil value Initial text. Default value is node text from GUI scene.
-- @tparam boolean|nil no_adjust If true, text will be not auto-adjust size
-- @treturn Text @{Text} component
function DruidInstance.new_text(self, node, value, no_adjust)
return DruidInstance.new(self, text, node, value, no_adjust)
@ -611,32 +611,32 @@ end
--- Create @{StaticGrid} component
-- Deprecated
-- @tparam DruidInstance self
-- @tparam node parent The gui node parent, where items will be placed
-- @tparam string|node parent_node The node_id or gui.get_node(node_id). Parent of all Grid items.
-- @tparam node element Element prefab. Need to get it size
-- @tparam[opt=1] number in_row How many nodes in row can be placed
-- @treturn StaticGrid @{StaticGrid} component
-- @local
function DruidInstance.new_grid(self, parent, element, in_row)
function DruidInstance.new_grid(self, parent_node, element, in_row)
helper.deprecated("The druid:new_grid is deprecated. Please use druid:new_static_grid instead")
return DruidInstance.new(self, static_grid, parent, element, in_row)
return DruidInstance.new(self, static_grid, parent_node, element, in_row)
end
--- Create @{StaticGrid} component
-- @tparam DruidInstance self
-- @tparam node parent The gui node parent, where items will be placed
-- @tparam string|node parent_node The node_id or gui.get_node(node_id). Parent of all Grid items.
-- @tparam node element Element prefab. Need to get it size
-- @tparam[opt=1] number in_row How many nodes in row can be placed
-- @treturn StaticGrid @{StaticGrid} component
function DruidInstance.new_static_grid(self, parent, element, in_row)
return DruidInstance.new(self, static_grid, parent, element, in_row)
function DruidInstance.new_static_grid(self, parent_node, element, in_row)
return DruidInstance.new(self, static_grid, parent_node, element, in_row)
end
--- Create @{Scroll} component
-- @tparam DruidInstance self
-- @tparam node view_node GUI view scroll node
-- @tparam node content_node GUI content scroll node
-- @tparam string|node view_node The node_id or gui.get_node(node_id). Will used as user input node.
-- @tparam string|node content_node The node_id or gui.get_node(node_id). Will used as scrollable node inside view_node.
-- @treturn Scroll @{Scroll} component
function DruidInstance.new_scroll(self, view_node, content_node)
return DruidInstance.new(self, scroll, view_node, content_node)
@ -645,7 +645,7 @@ end
--- Create @{Drag} component
-- @tparam DruidInstance self
-- @tparam node node GUI node to detect dragging
-- @tparam string|node node The node_id or gui.get_node(node_id). Will used as user input node.
-- @tparam function on_drag_callback Callback for on_drag_event(self, dx, dy)
-- @treturn Drag @{Drag} component
function DruidInstance.new_drag(self, node, on_drag_callback)
@ -655,7 +655,7 @@ end
--- Create @{Swipe} component
-- @tparam DruidInstance self
-- @tparam node node Gui node
-- @tparam string|node node The node_id or gui.get_node(node_id). Will used as user input node.
-- @tparam function on_swipe_callback Swipe callback for on_swipe_end event
-- @treturn Swipe @{Swipe} component
function DruidInstance.new_swipe(self, node, on_swipe_callback)
@ -665,38 +665,38 @@ end
--- Create @{DynamicGrid} component
-- @tparam DruidInstance self
-- @tparam node parent The gui node parent, where items will be placed
-- @tparam string|node parent_node The node_id or gui.get_node(node_id). Parent of all Grid items.
-- @treturn DynamicGrid @{DynamicGrid} component
function DruidInstance.new_dynamic_grid(self, parent)
function DruidInstance.new_dynamic_grid(self, parent_node)
return helper.require_component_message("dynamic_grid")
end
--- Create @{LangText} component
-- @tparam DruidInstance self
-- @tparam node node The text node
-- @tparam string locale_id Default locale id
-- @tparam boolean no_adjust If true, will not correct text size
-- @tparam string|node node The_node id or gui.get_node(node_id)
-- @tparam string|nil locale_id Default locale id or text from node as default
-- @tparam string|nil adjust_type Adjust type for text node. Default: const.TEXT_ADJUST.DOWNSCALE
-- @treturn LangText @{LangText} component
function DruidInstance.new_lang_text(self, node, locale_id, no_adjust)
function DruidInstance.new_lang_text(self, node, locale_id, adjust_type)
return helper.require_component_message("lang_text")
end
--- Create @{Slider} component
-- @tparam DruidInstance self
-- @tparam node node Gui pin node
-- @tparam string|node pin_node The_node id or gui.get_node(node_id).
-- @tparam vector3 end_pos The end position of slider
-- @tparam[opt] function callback On slider change callback
-- @tparam function|nil callback On slider change callback
-- @treturn Slider @{Slider} component
function DruidInstance.new_slider(self, node, end_pos, callback)
function DruidInstance.new_slider(self, pin_node, end_pos, callback)
return helper.require_component_message("slider")
end
--- Create @{Checkbox} component
-- @tparam DruidInstance self
-- @tparam node node Gui node
-- @tparam string|node node The_node id or gui.get_node(node_id).
-- @tparam function callback Checkbox callback
-- @tparam[opt=node] node click_node Trigger node, by default equals to node
-- @tparam[opt=false] boolean initial_state The initial state of checkbox, default - false
@ -708,9 +708,9 @@ end
--- Create @{Input} component
-- @tparam DruidInstance self
-- @tparam node click_node Button node to enabled input component
-- @tparam node text_node Text node what will be changed on user input
-- @tparam[opt] number keyboard_type Gui keyboard type for input field
-- @tparam string|node click_node Button node to enabled input component
-- @tparam string|node text_node Text node what will be changed on user input
-- @tparam number|nil keyboard_type Gui keyboard type for input field
-- @treturn Input @{Input} component
function DruidInstance.new_input(self, click_node, text_node, keyboard_type)
return helper.require_component_message("input")
@ -752,10 +752,10 @@ end
--- Create @{Timer} component
-- @tparam DruidInstance self
-- @tparam node node Gui text node
-- @tparam string|node node Gui text node
-- @tparam number seconds_from Start timer value in seconds
-- @tparam[opt=0] number seconds_to End timer value in seconds
-- @tparam[opt] function callback Function on timer end
-- @tparam function|nil callback Function on timer end
-- @treturn Timer @{Timer} component
function DruidInstance.new_timer(self, node, seconds_from, seconds_to, callback)
return helper.require_component_message("timer")
@ -775,7 +775,7 @@ end
--- Create @{Layout} component
-- @tparam DruidInstance self
-- @tparam string|node node Layout node
-- @tparam string|node node The_node id or gui.get_node(node_id).
-- @tparam string mode The layout mode
-- @treturn Layout @{Layout} component
function DruidInstance.new_layout(self, node, mode)
@ -787,7 +787,7 @@ end
-- @tparam DruidInstance self
-- @tparam string|string[] keys_array Keys for trigger action. Should contains one action key and any amount of modificator keys
-- @tparam function callback The callback function
-- @tparam[opt] any callback_argument The argument to pass into the callback function
-- @tparam any|nil callback_argument The argument to pass into the callback function
-- @treturn Hotkey @{Hotkey} component
function DruidInstance.new_hotkey(self, keys_array, callback, callback_argument)
return helper.require_component_message("hotkey")
@ -797,8 +797,8 @@ end
--- Create @{RichText} component.
-- As a template please check rich_text.gui layout.
-- @tparam DruidInstance self
-- @tparam[opt] string template Template name if used
-- @tparam[opt] table nodes Nodes table from gui.clone_tree
-- @tparam string|nil template Template name if used
-- @tparam table|nil nodes Nodes table from gui.clone_tree
-- @treturn RichText @{RichText} component
function DruidInstance.new_rich_text(self, template, nodes)
return helper.require_component_message("rich_text", "custom")