mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 10:27:47 +02:00
Annotations update [2]
This commit is contained in:
parent
86b92f90a7
commit
50c9b6bad5
@ -492,7 +492,7 @@ return AwesomeComponent
|
|||||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">state</span>
|
<li><span class="parameter">state</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
The component input state
|
The component input state
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -527,7 +527,7 @@ return AwesomeComponent
|
|||||||
The new input priority value
|
The new input priority value
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">is_temporary</span>
|
<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
|
If true, the reset input priority will return to previous value
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -189,7 +189,7 @@ local blocker = self.druid:new_blocker(node)
|
|||||||
<a href="../modules/Blocker.html#">Blocker</a>
|
<a href="../modules/Blocker.html#">Blocker</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">state</span>
|
<li><span class="parameter">state</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
Enabled state
|
Enabled state
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -110,7 +110,7 @@ local button = self.druid:new_button("button_name", on_button_click, c
|
|||||||
<td class="summary">Get current key name to trigger this button.</td>
|
<td class="summary">Get current key name to trigger this button.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">The <a href="../modules/Button.html#">Button</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -118,7 +118,7 @@ local button = self.druid:new_button("button_name", on_button_click, c
|
|||||||
<td class="summary">Get button enabled state.</td>
|
<td class="summary">Get button enabled state.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Set function for additional check for button click availability</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -134,7 +134,7 @@ local button = self.druid:new_button("button_name", on_button_click, c
|
|||||||
<td class="summary">Set key name to trigger this button by keyboard.</td>
|
<td class="summary">Set key name to trigger this button by keyboard.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Set Button mode to work inside user HTML5 interaction event.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -241,7 +241,7 @@ local button = self.druid:new_button("button_name", on_button_click, c
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "init"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
The <a href="../modules/Button.html#">Button</a> constructor
|
The <a href="../modules/Button.html#">Button</a> constructor
|
||||||
@ -255,21 +255,19 @@ local button = self.druid:new_button("button_name", on_button_click, c
|
|||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">node</span>
|
<li><span class="parameter">node</span>
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <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> 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>
|
||||||
<li><span class="parameter">callback</span>
|
<li><span class="parameter">callback</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span></span>
|
||||||
On click button callback
|
On click button callback
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">custom_args</span>
|
<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
|
Button events custom arguments
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">anim_node</span>
|
<li><span class="parameter">anim_node</span>
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <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.
|
Node to animate instead of trigger node.
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -312,7 +310,7 @@ local button = self.druid:new_button("button_name", on_button_click, c
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "set_check_function"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set function for additional check for button click availability
|
Set function for additional check for button click availability
|
||||||
@ -325,14 +323,12 @@ local button = self.druid:new_button("button_name", on_button_click, c
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">check_function</span>
|
<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.
|
Should return true or false. If true - button can be pressed.
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">failure_callback</span>
|
<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
|
Function will be called on button click, if check function return false
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -401,7 +397,7 @@ local button = self.druid:new_button("button_name", on_button_click, c
|
|||||||
<a href="../modules/Button.html#">Button</a>
|
<a href="../modules/Button.html#">Button</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">state</span>
|
<li><span class="parameter">state</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
Enabled state
|
Enabled state
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -459,7 +455,7 @@ button:set_enabled(<span class="keyword">true</span>)</pre>
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "set_web_user_interaction"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set Button mode to work inside user HTML5 interaction event.
|
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>
|
||||||
<li><span class="parameter">is_web_mode</span>
|
<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
|
If true - button will be called inside html5 callback
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -210,15 +210,15 @@
|
|||||||
<a href="../modules/Checkbox.html#">Checkbox</a>
|
<a href="../modules/Checkbox.html#">Checkbox</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">state</span>
|
<li><span class="parameter">state</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
Checkbox state
|
Checkbox state
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">is_silent</span>
|
<li><span class="parameter">is_silent</span>
|
||||||
<span class="types"><span class="type">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
|
Don't trigger on_change_state if true
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">is_instant</span>
|
<li><span class="parameter">is_instant</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
If instant checkbox change
|
If instant checkbox change
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -193,7 +193,7 @@
|
|||||||
Array of checkbox state
|
Array of checkbox state
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">is_instant</span>
|
<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
|
If instant state change
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -266,7 +266,7 @@
|
|||||||
<a href="../modules/Drag.html#">Drag</a>
|
<a href="../modules/Drag.html#">Drag</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">is_enabled</span>
|
<li><span class="parameter">is_enabled</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -120,7 +120,7 @@ end
|
|||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#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>
|
<td class="summary">Create a new Druid instance for creating GUI components.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -158,7 +158,7 @@ end
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "druid.new"></a>
|
<a name = "druid.new"></a>
|
||||||
<strong>druid.new(context[, style])</strong>
|
<strong>druid.new(context, style)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create a new Druid instance for creating GUI components.
|
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.
|
The Druid context. Usually, this is the self of the gui_script. It is passed into all Druid callbacks.
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">style</span>
|
<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.
|
The Druid style table to override style parameters for this Druid instance.
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
<td class="summary">Clear the all event handlers</td>
|
<td class="summary">Clear the all event handlers</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">DruidEvent constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -95,7 +95,7 @@
|
|||||||
<td class="summary">Return true, if event have at lease one handler</td>
|
<td class="summary">Return true, if event have at lease one handler</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Subscribe callback on event</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -103,7 +103,7 @@
|
|||||||
<td class="summary">Trigger the event and call all subscribed callbacks</td>
|
<td class="summary">Trigger the event and call all subscribed callbacks</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Unsubscribe callback on event</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -142,7 +142,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "initialize"></a>
|
<a name = "initialize"></a>
|
||||||
<strong>initialize(self[, initial_callback])</strong>
|
<strong>initialize(self, initial_callback)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
DruidEvent constructor
|
DruidEvent constructor
|
||||||
@ -155,9 +155,8 @@
|
|||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">initial_callback</span>
|
<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
|
Subscribe the callback on new event, if callback exist
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -205,7 +204,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "subscribe"></a>
|
<a name = "subscribe"></a>
|
||||||
<strong>subscribe(self, callback[, context])</strong>
|
<strong>subscribe(self, callback, context)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Subscribe callback on event
|
Subscribe callback on event
|
||||||
@ -222,9 +221,8 @@
|
|||||||
Callback itself
|
Callback itself
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">context</span>
|
<li><span class="parameter">context</span>
|
||||||
<span class="types"><span class="type">any</span></span>
|
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
|
||||||
Additional context as first param to callback call, usually it's self
|
Additional context as first param to callback call, usually it's self
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -276,7 +274,7 @@ event:trigger(<span class="string">"Param1"</span>, <span class="string">"Param2
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "unsubscribe"></a>
|
<a name = "unsubscribe"></a>
|
||||||
<strong>unsubscribe(self, callback[, context])</strong>
|
<strong>unsubscribe(self, callback, context)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Unsubscribe callback on event
|
Unsubscribe callback on event
|
||||||
@ -293,9 +291,8 @@ event:trigger(<span class="string">"Param1"</span>, <span class="string">"Param2
|
|||||||
Callback itself
|
Callback itself
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">context</span>
|
<li><span class="parameter">context</span>
|
||||||
<span class="types"><span class="type">any</span></span>
|
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
|
||||||
Additional context as first param to callback call
|
Additional context as first param to callback call
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ end
|
|||||||
<td class="summary">Create new component.</td>
|
<td class="summary">Create new component.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Create <a href="../modules/BackHandler.html#">BackHandler</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -154,7 +154,7 @@ end
|
|||||||
<td class="summary">Create <a href="../modules/Blocker.html#">Blocker</a> component</td>
|
<td class="summary">Create <a href="../modules/Blocker.html#">Blocker</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Create <a href="../modules/Button.html#">Button</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -174,11 +174,11 @@ end
|
|||||||
<td class="summary">Create <a href="../modules/Drag.html#">Drag</a> component</td>
|
<td class="summary">Create <a href="../modules/Drag.html#">Drag</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Create <a href="../modules/DynamicGrid.html#">DynamicGrid</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#new_hotkey">new_hotkey(self, keys_array, callback[, 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>
|
<td class="summary">Create <a href="../modules/Hotkey.html#">Hotkey</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -186,11 +186,11 @@ end
|
|||||||
<td class="summary">Create <a href="../modules/Hover.html#">Hover</a> component</td>
|
<td class="summary">Create <a href="../modules/Hover.html#">Hover</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Create <a href="../modules/Input.html#">Input</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Create <a href="../modules/LangText.html#">LangText</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -206,7 +206,7 @@ end
|
|||||||
<td class="summary">Create <a href="../modules/RadioGroup.html#">RadioGroup</a> component</td>
|
<td class="summary">Create <a href="../modules/RadioGroup.html#">RadioGroup</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Create <a href="../modules/RichText.html#">RichText</a> component.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -214,11 +214,11 @@ end
|
|||||||
<td class="summary">Create <a href="../modules/Scroll.html#">Scroll</a> component</td>
|
<td class="summary">Create <a href="../modules/Scroll.html#">Scroll</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Create <a href="../modules/Slider.html#">Slider</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Create <a href="../modules/StaticGrid.html#">StaticGrid</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -226,11 +226,11 @@ end
|
|||||||
<td class="summary">Create <a href="../modules/Swipe.html#">Swipe</a> component</td>
|
<td class="summary">Create <a href="../modules/Swipe.html#">Swipe</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Create <a href="../modules/Text.html#">Text</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Create <a href="../modules/Timer.html#">Timer</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -318,7 +318,7 @@ end
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_back_handler"></a>
|
<a name = "new_back_handler"></a>
|
||||||
<strong>new_back_handler(self, callback[, params])</strong>
|
<strong>new_back_handler(self, callback, params)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create <a href="../modules/BackHandler.html#">BackHandler</a> component
|
Create <a href="../modules/BackHandler.html#">BackHandler</a> component
|
||||||
@ -335,9 +335,8 @@ end
|
|||||||
@The callback(self, custom_args) to call on back event
|
@The callback(self, custom_args) to call on back event
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">params</span>
|
<li><span class="parameter">params</span>
|
||||||
<span class="types"><span class="type">any</span></span>
|
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
|
||||||
Callback argument
|
Callback argument
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -367,8 +366,8 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">node</span>
|
<li><span class="parameter">node</span>
|
||||||
<span class="types"><span class="type">node</span></span>
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
||||||
Gui node
|
The node_id or gui.get_node(node_id)
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -385,7 +384,7 @@ end
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_button"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create <a href="../modules/Button.html#">Button</a> component
|
Create <a href="../modules/Button.html#">Button</a> component
|
||||||
@ -398,22 +397,20 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">node</span>
|
<li><span class="parameter">node</span>
|
||||||
<span class="types"><span class="type">node</span></span>
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
||||||
GUI node
|
The node_id or gui.get_node(node_id)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">callback</span>
|
<li><span class="parameter">callback</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span></span>
|
||||||
Button callback
|
Button callback
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">params</span>
|
<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
|
Button callback params
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">anim_node</span>
|
<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)
|
Button anim node (node, if not provided)
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -443,8 +440,8 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">node</span>
|
<li><span class="parameter">node</span>
|
||||||
<span class="types"><span class="type">node</span></span>
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
||||||
Gui node
|
The_node id or gui.get_node(node_id).
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">callback</span>
|
<li><span class="parameter">callback</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span></span>
|
||||||
@ -567,8 +564,8 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">node</span>
|
<li><span class="parameter">node</span>
|
||||||
<span class="types"><span class="type">node</span></span>
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
||||||
GUI node to detect dragging
|
The node_id or gui.get_node(node_id). Will used as user input node.
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">on_drag_callback</span>
|
<li><span class="parameter">on_drag_callback</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span></span>
|
||||||
@ -589,7 +586,7 @@ end
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_dynamic_grid"></a>
|
<a name = "new_dynamic_grid"></a>
|
||||||
<strong>new_dynamic_grid(self, parent)</strong>
|
<strong>new_dynamic_grid(self, parent_node)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create <a href="../modules/DynamicGrid.html#">DynamicGrid</a> component
|
Create <a href="../modules/DynamicGrid.html#">DynamicGrid</a> component
|
||||||
@ -601,9 +598,9 @@ end
|
|||||||
<span class="types"><span class="type">DruidInstance</span></span>
|
<span class="types"><span class="type">DruidInstance</span></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">parent</span>
|
<li><span class="parameter">parent_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>
|
||||||
The gui node parent, where items will be placed
|
The node_id or gui.get_node(node_id). Parent of all Grid items.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -620,7 +617,7 @@ end
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_hotkey"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create <a href="../modules/Hotkey.html#">Hotkey</a> component
|
Create <a href="../modules/Hotkey.html#">Hotkey</a> component
|
||||||
@ -641,9 +638,8 @@ end
|
|||||||
The callback function
|
The callback function
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">callback_argument</span>
|
<li><span class="parameter">callback_argument</span>
|
||||||
<span class="types"><span class="type">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
|
The argument to pass into the callback function
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -673,8 +669,8 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">node</span>
|
<li><span class="parameter">node</span>
|
||||||
<span class="types"><span class="type">node</span></span>
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
||||||
Gui node
|
The node_id or gui.get_node(node_id)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">on_hover_callback</span>
|
<li><span class="parameter">on_hover_callback</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span></span>
|
||||||
@ -695,7 +691,7 @@ end
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_input"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create <a href="../modules/Input.html#">Input</a> component
|
Create <a href="../modules/Input.html#">Input</a> component
|
||||||
@ -708,17 +704,16 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">click_node</span>
|
<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
|
Button node to enabled input component
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">text_node</span>
|
<li><span class="parameter">text_node</span>
|
||||||
<span class="types"><span class="type">node</span></span>
|
<span class="types"><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
|
Text node what will be changed on user input
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">keyboard_type</span>
|
<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
|
Gui keyboard type for input field
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -735,7 +730,7 @@ end
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_lang_text"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create <a href="../modules/LangText.html#">LangText</a> component
|
Create <a href="../modules/LangText.html#">LangText</a> component
|
||||||
@ -748,16 +743,16 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">node</span>
|
<li><span class="parameter">node</span>
|
||||||
<span class="types"><span class="type">node</span></span>
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
||||||
The text node
|
The_node id or gui.get_node(node_id)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">locale_id</span>
|
<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>
|
<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
|
Default locale id or text from node as default
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">no_adjust</span>
|
<li><span class="parameter">adjust_type</span>
|
||||||
<span class="types"><span class="type">boolean</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">nil</span></span>
|
||||||
If true, will not correct text size
|
Adjust type for text node. Default: const.TEXT_ADJUST.DOWNSCALE
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -788,7 +783,7 @@ end
|
|||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">node</span>
|
<li><span class="parameter">node</span>
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
||||||
Layout node
|
The_node id or gui.get_node(node_id).
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">mode</span>
|
<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>
|
<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>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_rich_text"></a>
|
<a name = "new_rich_text"></a>
|
||||||
<strong>new_rich_text(self[, template[, nodes]])</strong>
|
<strong>new_rich_text(self, template, nodes)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create <a href="../modules/RichText.html#">RichText</a> component.
|
Create <a href="../modules/RichText.html#">RichText</a> component.
|
||||||
@ -903,14 +898,12 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">template</span>
|
<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
|
Template name if used
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">nodes</span>
|
<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
|
Nodes table from gui.clone_tree
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -940,12 +933,12 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">view_node</span>
|
<li><span class="parameter">view_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 view scroll node
|
The node_id or gui.get_node(node_id). Will used as user input node.
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">content_node</span>
|
<li><span class="parameter">content_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 content scroll node
|
The node_id or gui.get_node(node_id). Will used as scrollable node inside view_node.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -962,7 +955,7 @@ end
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_slider"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create <a href="../modules/Slider.html#">Slider</a> component
|
Create <a href="../modules/Slider.html#">Slider</a> component
|
||||||
@ -974,18 +967,17 @@ end
|
|||||||
<span class="types"><span class="type">DruidInstance</span></span>
|
<span class="types"><span class="type">DruidInstance</span></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">node</span>
|
<li><span class="parameter">pin_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 pin node
|
The_node id or gui.get_node(node_id).
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">end_pos</span>
|
<li><span class="parameter">end_pos</span>
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
<span class="types"><span class="type">vector3</span></span>
|
||||||
The end position of slider
|
The end position of slider
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">callback</span>
|
<li><span class="parameter">callback</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||||
On slider change callback
|
On slider change callback
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -1002,7 +994,7 @@ end
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_static_grid"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create <a href="../modules/StaticGrid.html#">StaticGrid</a> component
|
Create <a href="../modules/StaticGrid.html#">StaticGrid</a> component
|
||||||
@ -1014,9 +1006,9 @@ end
|
|||||||
<span class="types"><span class="type">DruidInstance</span></span>
|
<span class="types"><span class="type">DruidInstance</span></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">parent</span>
|
<li><span class="parameter">parent_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>
|
||||||
The gui node parent, where items will be placed
|
The node_id or gui.get_node(node_id). Parent of all Grid items.
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">element</span>
|
<li><span class="parameter">element</span>
|
||||||
<span class="types"><span class="type">node</span></span>
|
<span class="types"><span class="type">node</span></span>
|
||||||
@ -1055,8 +1047,8 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">node</span>
|
<li><span class="parameter">node</span>
|
||||||
<span class="types"><span class="type">node</span></span>
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
||||||
Gui node
|
The node_id or gui.get_node(node_id). Will used as user input node.
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">on_swipe_callback</span>
|
<li><span class="parameter">on_swipe_callback</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span></span>
|
||||||
@ -1077,7 +1069,7 @@ end
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_text"></a>
|
<a name = "new_text"></a>
|
||||||
<strong>new_text(self, node[, value[, no_adjust]])</strong>
|
<strong>new_text(self, node, value, no_adjust)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create <a href="../modules/Text.html#">Text</a> component
|
Create <a href="../modules/Text.html#">Text</a> component
|
||||||
@ -1090,18 +1082,16 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">node</span>
|
<li><span class="parameter">node</span>
|
||||||
<span class="types"><span class="type">node</span></span>
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
||||||
Gui text node
|
The node_id or gui.get_node(node_id)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">value</span>
|
<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.
|
Initial text. Default value is node text from GUI scene.
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">no_adjust</span>
|
<li><span class="parameter">no_adjust</span>
|
||||||
<span class="types"><span class="type">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
|
If true, text will be not auto-adjust size
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -1118,7 +1108,7 @@ end
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_timer"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create <a href="../modules/Timer.html#">Timer</a> component
|
Create <a href="../modules/Timer.html#">Timer</a> component
|
||||||
@ -1131,7 +1121,7 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">node</span>
|
<li><span class="parameter">node</span>
|
||||||
<span class="types"><span class="type">node</span></span>
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
||||||
Gui text node
|
Gui text node
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">seconds_from</span>
|
<li><span class="parameter">seconds_from</span>
|
||||||
@ -1144,9 +1134,8 @@ end
|
|||||||
(<em>default</em> 0)
|
(<em>default</em> 0)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">callback</span>
|
<li><span class="parameter">callback</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||||
Function on timer end
|
Function on timer end
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
<td class="summary">Return side vector to correct node shifting</td>
|
<td class="summary">Return side vector to correct node shifting</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Add new node to the grid</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -110,7 +110,7 @@
|
|||||||
<td class="summary">Return DynamicGrid offset, where DynamicGrid content starts.</td>
|
<td class="summary">Return DynamicGrid offset, where DynamicGrid content starts.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Return pos for grid node index</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -213,7 +213,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "add"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Add new node to the grid
|
Add new node to the grid
|
||||||
@ -230,9 +230,8 @@
|
|||||||
Gui node
|
Gui node
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">index</span>
|
<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
|
The node position. By default add as last node
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">shift_policy</span>
|
<li><span class="parameter">shift_policy</span>
|
||||||
<span class="types"><span class="type">number</span></span>
|
<span class="types"><span class="type">number</span></span>
|
||||||
@ -393,7 +392,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "get_pos"></a>
|
<a name = "get_pos"></a>
|
||||||
<strong>get_pos(self, index, node[, origin_index])</strong>
|
<strong>get_pos(self, index, node, origin_index)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Return pos for grid node index
|
Return pos for grid node index
|
||||||
@ -414,9 +413,8 @@
|
|||||||
The node to be placed
|
The node to be placed
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">origin_index</span>
|
<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
|
Index of nearby node
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#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>
|
<td class="summary">Add all elements from source array to the target array</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -111,7 +111,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<td class="summary">Calculate distance between two points</td>
|
<td class="summary">Calculate distance between two points</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Distance from node position to his borders</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -143,7 +143,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<td class="summary">Get text metric from GUI node.</td>
|
<td class="summary">Get text metric from GUI node.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#helper.insert_with_shift">helper.insert_with_shift(array, 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>
|
<td class="summary">Add value to array with shift policy</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -159,7 +159,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<td class="summary">Lerp between two values</td>
|
<td class="summary">Lerp between two values</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Remove value from array with shift policy</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -189,7 +189,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "helper.add_array"></a>
|
<a name = "helper.add_array"></a>
|
||||||
<strong>helper.add_array(target[, source])</strong>
|
<strong>helper.add_array(target, source)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Add all elements from source array to the target array
|
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
|
Array to put elements from source
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">source</span>
|
<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
|
The source array to get elements from
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -379,7 +378,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "helper.get_border"></a>
|
<a name = "helper.get_border"></a>
|
||||||
<strong>helper.get_border(node[, offset])</strong>
|
<strong>helper.get_border(node, offset)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Distance from node position to his borders
|
Distance from node position to his borders
|
||||||
@ -392,9 +391,8 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
GUI node
|
GUI node
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">offset</span>
|
<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
|
Offset from node position. Pass current node position to get non relative border values
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -529,7 +527,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
Gui node
|
Gui node
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">include_passed_node_scale</span>
|
<li><span class="parameter">include_passed_node_scale</span>
|
||||||
<span class="types"><span class="type">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
|
True if add current node scale to result
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -606,7 +604,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "helper.insert_with_shift"></a>
|
<a name = "helper.insert_with_shift"></a>
|
||||||
<strong>helper.insert_with_shift(array, any[, index[, shift_policy]])</strong>
|
<strong>helper.insert_with_shift(array, any, index, shift_policy)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Add value to array with shift policy Shift policy can be: left, right, no_shift
|
Add value to array with shift policy Shift policy can be: left, right, no_shift
|
||||||
@ -622,14 +620,12 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
Item to insert
|
Item to insert
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">index</span>
|
<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
|
Index to insert. If nil, item will be inserted at the end of array
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">shift_policy</span>
|
<li><span class="parameter">shift_policy</span>
|
||||||
<span class="types"><span class="type">number</span></span>
|
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
||||||
The druid_const.SHIFT.* constant
|
The druid_const.SHIFT.* constant
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -721,7 +717,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "helper.remove_with_shift"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Remove value from array with shift policy Shift policy can be: left, right, no_shift
|
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
|
Array
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">index</span>
|
<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
|
Index to remove. If nil, item will be removed from the end of array
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">shift_policy</span>
|
<li><span class="parameter">shift_policy</span>
|
||||||
<span class="types"><span class="type">number</span></span>
|
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
||||||
The druid_const.SHIFT.* constant
|
The druid_const.SHIFT.* constant
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -83,11 +83,11 @@
|
|||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#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>
|
<td class="summary">Add hotkey for component callback</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, keys, callback[, callback_argument])</a></td>
|
<td class="name" nowrap><a href="#init">init(self, keys, callback, callback_argument)</a></td>
|
||||||
<td class="summary">The <a href="../modules/Hotkey.html#">Hotkey</a> constructor</td>
|
<td class="summary">The <a href="../modules/Hotkey.html#">Hotkey</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -127,7 +127,7 @@
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "add_hotkey"></a>
|
<a name = "add_hotkey"></a>
|
||||||
<strong>add_hotkey(self, keys[, callback_argument])</strong>
|
<strong>add_hotkey(self, keys, callback_argument)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Add hotkey for component callback
|
Add hotkey for component callback
|
||||||
@ -144,9 +144,8 @@
|
|||||||
that have to be pressed before key pressed to activate
|
that have to be pressed before key pressed to activate
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">callback_argument</span>
|
<li><span class="parameter">callback_argument</span>
|
||||||
<span class="types"><span class="type">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
|
The argument to pass into the callback function
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -157,7 +156,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "init"></a>
|
<a name = "init"></a>
|
||||||
<strong>init(self, keys, callback[, callback_argument])</strong>
|
<strong>init(self, keys, callback, callback_argument)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
The <a href="../modules/Hotkey.html#">Hotkey</a> constructor
|
The <a href="../modules/Hotkey.html#">Hotkey</a> constructor
|
||||||
@ -178,9 +177,8 @@
|
|||||||
The callback function
|
The callback function
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">callback_argument</span>
|
<li><span class="parameter">callback_argument</span>
|
||||||
<span class="types"><span class="type">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
|
The argument to pass into the callback function
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@
|
|||||||
<a href="../modules/Hover.html#">Hover</a>
|
<a href="../modules/Hover.html#">Hover</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">state</span>
|
<li><span class="parameter">state</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
The hover enabled state
|
The hover enabled state
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -311,7 +311,7 @@
|
|||||||
<a href="../modules/Hover.html#">Hover</a>
|
<a href="../modules/Hover.html#">Hover</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">state</span>
|
<li><span class="parameter">state</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
The hover state
|
The hover state
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -336,7 +336,7 @@
|
|||||||
<a href="../modules/Hover.html#">Hover</a>
|
<a href="../modules/Hover.html#">Hover</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">state</span>
|
<li><span class="parameter">state</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
The mouse hover state
|
The mouse hover state
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
<td class="summary">Return current input field text</td>
|
<td class="summary">Return current input field text</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, click_node, text_node[, keyboard_type])</a></td>
|
<td class="name" nowrap><a href="#init">init(self, click_node, text_node, keyboard_type)</a></td>
|
||||||
<td class="summary">The <a href="../modules/Input.html#">Input</a> constructor</td>
|
<td class="summary">The <a href="../modules/Input.html#">Input</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -220,7 +220,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "init"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
The <a href="../modules/Input.html#">Input</a> constructor
|
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>
|
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>
|
||||||
<li><span class="parameter">keyboard_type</span>
|
<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
|
Gui keyboard type for input field
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -89,11 +89,11 @@
|
|||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#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>
|
<td class="summary">Format string with new text params on localized text</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">The <a href="../modules/LangText.html#">LangText</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -101,7 +101,7 @@
|
|||||||
<td class="summary">Setup raw text to lang_text component</td>
|
<td class="summary">Setup raw text to lang_text component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Translate the text by locale_id</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -126,7 +126,7 @@
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "format"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Format string with new text params on localized text
|
Format string with new text params on localized text
|
||||||
@ -139,39 +139,32 @@
|
|||||||
<a href="../modules/LangText.html#">LangText</a>
|
<a href="../modules/LangText.html#">LangText</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">a</span>
|
<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
|
Optional param to string.format
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">b</span>
|
<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
|
Optional param to string.format
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">c</span>
|
<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
|
Optional param to string.format
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">d</span>
|
<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
|
Optional param to string.format
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">e</span>
|
<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
|
Optional param to string.format
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">f</span>
|
<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
|
Optional param to string.format
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">g</span>
|
<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
|
Optional param to string.format
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -188,7 +181,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "init"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
The <a href="../modules/LangText.html#">LangText</a> constructor
|
The <a href="../modules/LangText.html#">LangText</a> constructor
|
||||||
@ -202,11 +195,12 @@
|
|||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">node</span>
|
<li><span class="parameter">node</span>
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
||||||
Node name or GUI Text Node itself
|
The node_id or gui.get_node(node_id)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">locale_id</span>
|
<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>
|
<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
|
Default locale id or text from node as default
|
||||||
|
(<em>default</em> node_text)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">adjust_type</span>
|
<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>
|
<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>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "translate"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Translate the text by locale_id
|
Translate the text by locale_id
|
||||||
@ -270,39 +264,32 @@
|
|||||||
Locale id
|
Locale id
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">a</span>
|
<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
|
Optional param to string.format
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">b</span>
|
<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
|
Optional param to string.format
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">c</span>
|
<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
|
Optional param to string.format
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">d</span>
|
<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
|
Optional param to string.format
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">e</span>
|
<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
|
Optional param to string.format
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">f</span>
|
<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
|
Optional param to string.format
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">g</span>
|
<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
|
Optional param to string.format
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#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>
|
<td class="summary">Set node for layout node to fit inside it.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -94,7 +94,7 @@
|
|||||||
<td class="summary">Set current size for layout node to fit inside it</td>
|
<td class="summary">Set current size for layout node to fit inside it</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, node, mode[, on_size_changed_callback])</a></td>
|
<td class="name" nowrap><a href="#init">init(self, node, mode, on_size_changed_callback)</a></td>
|
||||||
<td class="summary">The <a href="../modules/Layout.html#">Layout</a> constructor</td>
|
<td class="summary">The <a href="../modules/Layout.html#">Layout</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -143,7 +143,7 @@
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "fit_into_node"></a>
|
<a name = "fit_into_node"></a>
|
||||||
<strong>fit_into_node(self[, node])</strong>
|
<strong>fit_into_node(self, node)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set node for layout node to fit inside it. Pass nil to reset
|
Set node for layout node to fit inside it. Pass nil to reset
|
||||||
@ -156,9 +156,8 @@
|
|||||||
<a href="../modules/Layout.html#">Layout</a>
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">node</span>
|
<li><span class="parameter">node</span>
|
||||||
<span class="types"><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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -233,7 +232,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "init"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
The <a href="../modules/Layout.html#">Layout</a> constructor
|
The <a href="../modules/Layout.html#">Layout</a> constructor
|
||||||
@ -254,9 +253,8 @@
|
|||||||
The layout mode (from const.LAYOUT_MODE)
|
The layout mode (from const.LAYOUT_MODE)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">on_size_changed_callback</span>
|
<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
|
The callback on window resize
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@
|
|||||||
<td class="summary">Instant fill progress bar to value</td>
|
<td class="summary">Instant fill progress bar to value</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Start animation of a progress bar</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -357,7 +357,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "to"></a>
|
<a name = "to"></a>
|
||||||
<strong>to(self, to[, callback])</strong>
|
<strong>to(self, to, callback)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Start animation of a progress bar
|
Start animation of a progress bar
|
||||||
@ -374,9 +374,8 @@
|
|||||||
value between 0..1
|
value between 0..1
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">callback</span>
|
<li><span class="parameter">callback</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||||
Callback on animation ends
|
Callback on animation ends
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@
|
|||||||
Index in radio group
|
Index in radio group
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">is_instant</span>
|
<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
|
If is instant state change
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -128,15 +128,15 @@
|
|||||||
<td class="summary">Check node if it visible now on scroll.</td>
|
<td class="summary">Check node if it visible now on scroll.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Start scroll to target point.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Scroll to item in scroll by point index.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Start scroll to target scroll percent</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -415,7 +415,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "scroll_to"></a>
|
<a name = "scroll_to"></a>
|
||||||
<strong>scroll_to(self, point[, is_instant])</strong>
|
<strong>scroll_to(self, point, is_instant)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Start scroll to target point.
|
Start scroll to target point.
|
||||||
@ -432,9 +432,8 @@
|
|||||||
Target point
|
Target point
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">is_instant</span>
|
<li><span class="parameter">is_instant</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
Instant scroll flag
|
Instant scroll flag
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -450,7 +449,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "scroll_to_index"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Scroll to item in scroll by point index.
|
Scroll to item in scroll by point index.
|
||||||
@ -467,9 +466,8 @@
|
|||||||
Point index
|
Point index
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">skip_cb</span>
|
<li><span class="parameter">skip_cb</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
If true, skip the point callback
|
If true, skip the point callback
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -480,7 +478,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "scroll_to_percent"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Start scroll to target scroll percent
|
Start scroll to target scroll percent
|
||||||
@ -497,9 +495,8 @@
|
|||||||
target percent
|
target percent
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">is_instant</span>
|
<li><span class="parameter">is_instant</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
instant scroll flag
|
instant scroll flag
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -586,7 +583,7 @@
|
|||||||
<a href="../modules/Scroll.html#">Scroll</a>
|
<a href="../modules/Scroll.html#">Scroll</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">state</span>
|
<li><span class="parameter">state</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
True, if horizontal scroll is enabled
|
True, if horizontal scroll is enabled
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -619,7 +616,7 @@
|
|||||||
<a href="../modules/Scroll.html#">Scroll</a>
|
<a href="../modules/Scroll.html#">Scroll</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">state</span>
|
<li><span class="parameter">state</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
Inert scroll state
|
Inert scroll state
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -718,7 +715,7 @@
|
|||||||
<a href="../modules/Scroll.html#">Scroll</a>
|
<a href="../modules/Scroll.html#">Scroll</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">state</span>
|
<li><span class="parameter">state</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
True, if vertical scroll is enabled
|
True, if vertical scroll is enabled
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -82,11 +82,11 @@
|
|||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#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>
|
<td class="summary">The <a href="../modules/Slider.html#">Slider</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#set">set(self, value[, is_silent])</a></td>
|
<td class="name" nowrap><a href="#set">set(self, value, is_silent)</a></td>
|
||||||
<td class="summary">Set value for slider</td>
|
<td class="summary">Set value for slider</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -147,7 +147,7 @@
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "init"></a>
|
<a name = "init"></a>
|
||||||
<strong>init(self, node, end_pos[, callback])</strong>
|
<strong>init(self, node, end_pos, callback)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
The <a href="../modules/Slider.html#">Slider</a> constructor
|
The <a href="../modules/Slider.html#">Slider</a> constructor
|
||||||
@ -168,9 +168,8 @@
|
|||||||
The end position of slider
|
The end position of slider
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">callback</span>
|
<li><span class="parameter">callback</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||||
On slider change callback
|
On slider change callback
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -181,7 +180,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "set"></a>
|
<a name = "set"></a>
|
||||||
<strong>set(self, value[, is_silent])</strong>
|
<strong>set(self, value, is_silent)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set value for slider
|
Set value for slider
|
||||||
@ -198,9 +197,8 @@
|
|||||||
Value from 0 to 1
|
Value from 0 to 1
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">is_silent</span>
|
<li><span class="parameter">is_silent</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
Don't trigger event if true
|
Don't trigger event if true
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@
|
|||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#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>
|
<td class="summary">Add new item to the grid</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -230,7 +230,7 @@
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "add"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Add new item to the grid
|
Add new item to the grid
|
||||||
@ -247,9 +247,8 @@
|
|||||||
Gui node
|
Gui node
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">index</span>
|
<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
|
The item position. By default add as last item
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">shift_policy</span>
|
<li><span class="parameter">shift_policy</span>
|
||||||
<span class="types"><span class="type">number</span></span>
|
<span class="types"><span class="type">number</span></span>
|
||||||
|
@ -231,9 +231,8 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">click_zone</span>
|
<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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -105,11 +105,11 @@
|
|||||||
<td class="summary">Return current text adjust type</td>
|
<td class="summary">Return current text adjust type</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Calculate text width with font with respect to trailing space</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, node[, value[, adjust_type=downscale]])</a></td>
|
<td class="name" nowrap><a href="#init">init(self, node, value[, adjust_type=downscale])</a></td>
|
||||||
<td class="summary">The <a href="../modules/Text.html#">Text</a> constructor</td>
|
<td class="summary">The <a href="../modules/Text.html#">Text</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -137,7 +137,7 @@
|
|||||||
<td class="summary">Set scale</td>
|
<td class="summary">Set scale</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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>
|
<td class="summary">Set text adjust, refresh the current text visuals, if needed</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -242,7 +242,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "get_text_size"></a>
|
<a name = "get_text_size"></a>
|
||||||
<strong>get_text_size(self[, text])</strong>
|
<strong>get_text_size(self, text)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Calculate text width with font with respect to trailing space
|
Calculate text width with font with respect to trailing space
|
||||||
@ -255,9 +255,8 @@
|
|||||||
<a href="../modules/Text.html#">Text</a>
|
<a href="../modules/Text.html#">Text</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">text</span>
|
<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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -277,7 +276,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "init"></a>
|
<a name = "init"></a>
|
||||||
<strong>init(self, node[, value[, adjust_type=downscale]])</strong>
|
<strong>init(self, node, value[, adjust_type=downscale])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
The <a href="../modules/Text.html#">Text</a> constructor
|
The <a href="../modules/Text.html#">Text</a> constructor
|
||||||
@ -294,9 +293,8 @@
|
|||||||
Node name or GUI Text Node itself
|
Node name or GUI Text Node itself
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">value</span>
|
<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.
|
Initial text. Default value is node text from GUI scene.
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">adjust_type</span>
|
<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>
|
<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>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "set_text_adjust"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set text adjust, refresh the current text visuals, if needed
|
Set text adjust, refresh the current text visuals, if needed
|
||||||
@ -507,14 +505,12 @@
|
|||||||
<a href="../modules/Text.html#">Text</a>
|
<a href="../modules/Text.html#">Text</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">adjust_type</span>
|
<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
|
See const.TEXT_ADJUST. If pass nil - use current adjust type
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">minimal_scale</span>
|
<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
|
If pass nil - not use minimal scale
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#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>
|
<td class="summary">The <a href="../modules/Timer.html#">Timer</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -141,7 +141,7 @@
|
|||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "init"></a>
|
<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>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
The <a href="../modules/Timer.html#">Timer</a> constructor
|
The <a href="../modules/Timer.html#">Timer</a> constructor
|
||||||
@ -167,9 +167,8 @@
|
|||||||
(<em>default</em> 0)
|
(<em>default</em> 0)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">callback</span>
|
<li><span class="parameter">callback</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||||
Function on timer end
|
Function on timer end
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -222,7 +221,7 @@
|
|||||||
<a href="../modules/Timer.html#">Timer</a>
|
<a href="../modules/Timer.html#">Timer</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">is_on</span>
|
<li><span class="parameter">is_on</span>
|
||||||
<span class="types"><span class="type">boolean</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
Timer enable state
|
Timer enable state
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -46,7 +46,7 @@ local BackHandler = component.create("back_handler")
|
|||||||
--- The @{BackHandler} constructor
|
--- The @{BackHandler} constructor
|
||||||
-- @tparam BackHandler self @{BackHandler}
|
-- @tparam BackHandler self @{BackHandler}
|
||||||
-- @tparam function callback @The callback(self, custom_args) to call on back event
|
-- @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
|
-- @local
|
||||||
function BackHandler.init(self, callback, custom_args)
|
function BackHandler.init(self, callback, custom_args)
|
||||||
self.params = custom_args
|
self.params = custom_args
|
||||||
|
@ -71,7 +71,7 @@ end
|
|||||||
--
|
--
|
||||||
-- Don't change node enabled state itself.
|
-- Don't change node enabled state itself.
|
||||||
-- @tparam Blocker self @{Blocker}
|
-- @tparam Blocker self @{Blocker}
|
||||||
-- @tparam boolean state Enabled state
|
-- @tparam boolean|nil state Enabled state
|
||||||
function Blocker.set_enabled(self, state)
|
function Blocker.set_enabled(self, state)
|
||||||
self._is_enabled = state
|
self._is_enabled = state
|
||||||
end
|
end
|
||||||
|
@ -282,10 +282,10 @@ end
|
|||||||
|
|
||||||
--- The @{Button} constructor
|
--- The @{Button} constructor
|
||||||
-- @tparam Button self @{Button}
|
-- @tparam Button self @{Button}
|
||||||
-- @tparam string|node node Node name or GUI Node itself
|
-- @tparam string|node node The node_id or gui.get_node(node_id)
|
||||||
-- @tparam function callback On click button callback
|
-- @tparam function callback On click button callback
|
||||||
-- @tparam[opt] any custom_args Button events custom arguments
|
-- @tparam any|nil custom_args Button events custom arguments
|
||||||
-- @tparam[opt] string|node anim_node Node to animate instead of trigger node.
|
-- @tparam string|node|nil anim_node Node to animate instead of trigger node.
|
||||||
function Button.init(self, node, callback, custom_args, anim_node)
|
function Button.init(self, node, callback, custom_args, anim_node)
|
||||||
self.druid = self:get_druid()
|
self.druid = self:get_druid()
|
||||||
self.node = self:get_node(node)
|
self.node = self:get_node(node)
|
||||||
@ -447,7 +447,7 @@ end
|
|||||||
-- The style.on_set_enabled will be triggered.
|
-- The style.on_set_enabled will be triggered.
|
||||||
-- Disabled button is not clickable.
|
-- Disabled button is not clickable.
|
||||||
-- @tparam Button self @{Button}
|
-- @tparam Button self @{Button}
|
||||||
-- @tparam boolean state Enabled state
|
-- @tparam boolean|nil state Enabled state
|
||||||
-- @treturn Button Current button instance
|
-- @treturn Button Current button instance
|
||||||
-- @usage
|
-- @usage
|
||||||
-- button:set_enabled(false)
|
-- button:set_enabled(false)
|
||||||
@ -515,8 +515,8 @@ end
|
|||||||
|
|
||||||
--- Set function for additional check for button click availability
|
--- Set function for additional check for button click availability
|
||||||
-- @tparam Button self
|
-- @tparam Button self
|
||||||
-- @tparam[opt] function check_function Should return true or false. If true - button can be pressed.
|
-- @tparam function|nil 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 failure_callback Function will be called on button click, if check function return false
|
||||||
-- @treturn Button Current button instance
|
-- @treturn Button Current button instance
|
||||||
function Button.set_check_function(self, check_function, failure_callback)
|
function Button.set_check_function(self, check_function, failure_callback)
|
||||||
self._check_function = check_function
|
self._check_function = check_function
|
||||||
@ -531,7 +531,7 @@ end
|
|||||||
--
|
--
|
||||||
-- If the game is not HTML, html mode will be not enabled
|
-- If the game is not HTML, html mode will be not enabled
|
||||||
-- @tparam Button self
|
-- @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
|
-- @treturn Button Current button instance
|
||||||
-- @usage
|
-- @usage
|
||||||
-- button:set_web_user_interaction(true)
|
-- button:set_web_user_interaction(true)
|
||||||
|
@ -313,7 +313,7 @@ end
|
|||||||
|
|
||||||
--- Set Drag input enabled or disabled
|
--- Set Drag input enabled or disabled
|
||||||
-- @tparam Drag self @{Drag}
|
-- @tparam Drag self @{Drag}
|
||||||
-- @tparam boolean is_enabled
|
-- @tparam boolean|nil is_enabled
|
||||||
function Drag.set_enabled(self, is_enabled)
|
function Drag.set_enabled(self, is_enabled)
|
||||||
self._is_enabled = is_enabled
|
self._is_enabled = is_enabled
|
||||||
end
|
end
|
||||||
|
@ -89,7 +89,7 @@ end
|
|||||||
|
|
||||||
--- Set hover state
|
--- Set hover state
|
||||||
-- @tparam Hover self @{Hover}
|
-- @tparam Hover self @{Hover}
|
||||||
-- @tparam boolean state The hover state
|
-- @tparam boolean|nil state The hover state
|
||||||
function Hover.set_hover(self, state)
|
function Hover.set_hover(self, state)
|
||||||
if self._is_hovered ~= state then
|
if self._is_hovered ~= state then
|
||||||
self._is_hovered = state
|
self._is_hovered = state
|
||||||
@ -108,7 +108,7 @@ end
|
|||||||
|
|
||||||
--- Set mouse hover state
|
--- Set mouse hover state
|
||||||
-- @tparam Hover self @{Hover}
|
-- @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)
|
function Hover.set_mouse_hover(self, state)
|
||||||
if self._is_mouse_hovered ~= state then
|
if self._is_mouse_hovered ~= state then
|
||||||
self._is_mouse_hovered = state
|
self._is_mouse_hovered = state
|
||||||
@ -138,7 +138,7 @@ end
|
|||||||
-- If hover is not enabled, it will not generate
|
-- If hover is not enabled, it will not generate
|
||||||
-- any hover events
|
-- any hover events
|
||||||
-- @tparam Hover self @{Hover}
|
-- @tparam Hover self @{Hover}
|
||||||
-- @tparam boolean state The hover enabled state
|
-- @tparam boolean|nil state The hover enabled state
|
||||||
function Hover.set_enabled(self, state)
|
function Hover.set_enabled(self, state)
|
||||||
self._is_enabled = state
|
self._is_enabled = state
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ end
|
|||||||
--- Start scroll to target point.
|
--- Start scroll to target point.
|
||||||
-- @tparam Scroll self @{Scroll}
|
-- @tparam Scroll self @{Scroll}
|
||||||
-- @tparam vector3 point Target point
|
-- @tparam vector3 point Target point
|
||||||
-- @tparam[opt] 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, 50, 0))
|
||||||
-- @usage scroll:scroll_to(vmath.vector3(0), true)
|
-- @usage scroll:scroll_to(vmath.vector3(0), true)
|
||||||
function Scroll.scroll_to(self, point, is_instant)
|
function Scroll.scroll_to(self, point, is_instant)
|
||||||
@ -268,7 +268,7 @@ end
|
|||||||
--- Scroll to item in scroll by point index.
|
--- Scroll to item in scroll by point index.
|
||||||
-- @tparam Scroll self @{Scroll}
|
-- @tparam Scroll self @{Scroll}
|
||||||
-- @tparam number index Point index
|
-- @tparam number index Point index
|
||||||
-- @tparam[opt] 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)
|
function Scroll.scroll_to_index(self, index, skip_cb)
|
||||||
if not self.points then
|
if not self.points then
|
||||||
return
|
return
|
||||||
@ -291,7 +291,7 @@ end
|
|||||||
--- Start scroll to target scroll percent
|
--- Start scroll to target scroll percent
|
||||||
-- @tparam Scroll self @{Scroll}
|
-- @tparam Scroll self @{Scroll}
|
||||||
-- @tparam vector3 percent target percent
|
-- @tparam vector3 percent target percent
|
||||||
-- @tparam[opt] 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))
|
-- @usage scroll:scroll_to_percent(vmath.vector3(0.5, 0, 0))
|
||||||
function Scroll.scroll_to_percent(self, percent, is_instant)
|
function Scroll.scroll_to_percent(self, percent, is_instant)
|
||||||
local border = self.available_pos
|
local border = self.available_pos
|
||||||
@ -339,7 +339,7 @@ end
|
|||||||
-- If disabled, scroll through points (if exist)
|
-- If disabled, scroll through points (if exist)
|
||||||
-- If no points, just simple drag without inertion
|
-- If no points, just simple drag without inertion
|
||||||
-- @tparam Scroll self @{Scroll}
|
-- @tparam Scroll self @{Scroll}
|
||||||
-- @tparam boolean state Inert scroll state
|
-- @tparam boolean|nil state Inert scroll state
|
||||||
-- @treturn druid.scroll Current scroll instance
|
-- @treturn druid.scroll Current scroll instance
|
||||||
function Scroll.set_inert(self, state)
|
function Scroll.set_inert(self, state)
|
||||||
self._is_inert = state
|
self._is_inert = state
|
||||||
@ -397,7 +397,7 @@ end
|
|||||||
|
|
||||||
--- Lock or unlock horizontal scroll
|
--- Lock or unlock horizontal scroll
|
||||||
-- @tparam Scroll self @{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
|
-- @treturn druid.scroll Current scroll instance
|
||||||
function Scroll.set_horizontal_scroll(self, state)
|
function Scroll.set_horizontal_scroll(self, state)
|
||||||
self._is_horizontal_scroll = state
|
self._is_horizontal_scroll = state
|
||||||
@ -408,7 +408,7 @@ end
|
|||||||
|
|
||||||
--- Lock or unlock vertical scroll
|
--- Lock or unlock vertical scroll
|
||||||
-- @tparam Scroll self @{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
|
-- @treturn druid.scroll Current scroll instance
|
||||||
function Scroll.set_vertical_scroll(self, state)
|
function Scroll.set_vertical_scroll(self, state)
|
||||||
self._is_vertical_scroll = state
|
self._is_vertical_scroll = state
|
||||||
|
@ -214,7 +214,7 @@ end
|
|||||||
--- Add new item to the grid
|
--- Add new item to the grid
|
||||||
-- @tparam StaticGrid self @{StaticGrid}
|
-- @tparam StaticGrid self @{StaticGrid}
|
||||||
-- @tparam node item Gui node
|
-- @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=SHIFT.RIGHT] number shift_policy How shift nodes, if required. See const.SHIFT
|
||||||
-- @tparam[opt=false] boolean is_instant If true, update node positions instantly
|
-- @tparam[opt=false] boolean is_instant If true, update node positions instantly
|
||||||
function StaticGrid.add(self, item, index, shift_policy, is_instant)
|
function StaticGrid.add(self, item, index, shift_policy, is_instant)
|
||||||
@ -379,7 +379,7 @@ end
|
|||||||
|
|
||||||
--- Update grid inner state
|
--- Update grid inner state
|
||||||
-- @tparam StaticGrid self @{StaticGrid}
|
-- @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
|
-- @local
|
||||||
function StaticGrid._update(self, is_instant)
|
function StaticGrid._update(self, is_instant)
|
||||||
self:_update_indexes()
|
self:_update_indexes()
|
||||||
@ -425,7 +425,7 @@ end
|
|||||||
|
|
||||||
--- Update grid nodes position
|
--- Update grid nodes position
|
||||||
-- @tparam StaticGrid self @{StaticGrid}
|
-- @tparam StaticGrid self @{StaticGrid}
|
||||||
-- @tparam 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
|
-- @local
|
||||||
function StaticGrid._update_pos(self, is_instant)
|
function StaticGrid._update_pos(self, is_instant)
|
||||||
local zero_offset = self:_get_zero_offset()
|
local zero_offset = self:_get_zero_offset()
|
||||||
|
@ -225,7 +225,7 @@ end
|
|||||||
--- The @{Text} constructor
|
--- The @{Text} constructor
|
||||||
-- @tparam Text self @{Text}
|
-- @tparam Text self @{Text}
|
||||||
-- @tparam string|node node Node name or GUI Text Node itself
|
-- @tparam string|node node Node name or GUI Text Node itself
|
||||||
-- @tparam[opt] string value Initial text. Default value is node text from GUI scene.
|
-- @tparam 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
|
-- @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)
|
function Text.init(self, node, value, adjust_type)
|
||||||
self.node = self:get_node(node)
|
self.node = self:get_node(node)
|
||||||
@ -273,7 +273,7 @@ end
|
|||||||
|
|
||||||
--- Calculate text width with font with respect to trailing space
|
--- Calculate text width with font with respect to trailing space
|
||||||
-- @tparam Text self @{Text}
|
-- @tparam Text self @{Text}
|
||||||
-- @tparam[opt] string text
|
-- @tparam string|nil text
|
||||||
-- @treturn number Width
|
-- @treturn number Width
|
||||||
-- @treturn number Height
|
-- @treturn number Height
|
||||||
function Text.get_text_size(self, text)
|
function Text.get_text_size(self, text)
|
||||||
@ -392,8 +392,8 @@ end
|
|||||||
|
|
||||||
--- Set text adjust, refresh the current text visuals, if needed
|
--- Set text adjust, refresh the current text visuals, if needed
|
||||||
-- @tparam Text self @{Text}
|
-- @tparam Text self @{Text}
|
||||||
-- @tparam[opt] number adjust_type See const.TEXT_ADJUST. If pass nil - use current adjust type
|
-- @tparam number|nil 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 minimal_scale If pass nil - not use minimal scale
|
||||||
-- @treturn Text Current text instance
|
-- @treturn Text Current text instance
|
||||||
function Text.set_text_adjust(self, adjust_type, minimal_scale)
|
function Text.set_text_adjust(self, adjust_type, minimal_scale)
|
||||||
self.adjust_type = adjust_type
|
self.adjust_type = adjust_type
|
||||||
|
@ -242,7 +242,7 @@ end
|
|||||||
-- Default value: 10
|
-- Default value: 10
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @tparam number value The new input priority value
|
-- @tparam number value The new input priority value
|
||||||
-- @tparam boolean is_temporary If true, the reset input priority will return to previous value
|
-- @tparam boolean|nil is_temporary If true, the reset input priority will return to previous value
|
||||||
-- @treturn number The component input priority
|
-- @treturn number The component input priority
|
||||||
function BaseComponent.set_input_priority(self, value, is_temporary)
|
function BaseComponent.set_input_priority(self, value, is_temporary)
|
||||||
assert(value)
|
assert(value)
|
||||||
@ -290,7 +290,7 @@ end
|
|||||||
--
|
--
|
||||||
-- If input is disabled, the component will not receive input events
|
-- If input is disabled, the component will not receive input events
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @tparam boolean state The component input state
|
-- @tparam boolean|nil state The component input state
|
||||||
-- @treturn BaseComponent BaseComponent itself
|
-- @treturn BaseComponent BaseComponent itself
|
||||||
function BaseComponent.set_input_enabled(self, state)
|
function BaseComponent.set_input_enabled(self, state)
|
||||||
self._meta.input_enabled = state
|
self._meta.input_enabled = state
|
||||||
@ -376,7 +376,7 @@ end
|
|||||||
|
|
||||||
--- Set debug logs for component enabled or disabled
|
--- Set debug logs for component enabled or disabled
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @tparam boolean is_debug
|
-- @tparam boolean|nil is_debug
|
||||||
-- @local
|
-- @local
|
||||||
function BaseComponent.set_debug(self, is_debug)
|
function BaseComponent.set_debug(self, is_debug)
|
||||||
self._component.is_debug = is_debug
|
self._component.is_debug = is_debug
|
||||||
|
@ -92,7 +92,7 @@ end
|
|||||||
--
|
--
|
||||||
-- @function druid.new
|
-- @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 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}.
|
-- @treturn druid_instance The Druid instance @{DruidInstance}.
|
||||||
-- @usage
|
-- @usage
|
||||||
-- local druid = require("druid.druid")
|
-- local druid = require("druid.druid")
|
||||||
|
@ -15,7 +15,7 @@ local DruidEvent = class("druid.event")
|
|||||||
|
|
||||||
--- DruidEvent constructor
|
--- DruidEvent constructor
|
||||||
-- @tparam DruidEvent self @{DruidEvent}
|
-- @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
|
-- @usage
|
||||||
-- local Event = require("druid.event")
|
-- local Event = require("druid.event")
|
||||||
-- ...
|
-- ...
|
||||||
@ -32,7 +32,7 @@ end
|
|||||||
--- Subscribe callback on event
|
--- Subscribe callback on event
|
||||||
-- @tparam DruidEvent self @{DruidEvent}
|
-- @tparam DruidEvent self @{DruidEvent}
|
||||||
-- @tparam function callback Callback itself
|
-- @tparam function callback Callback itself
|
||||||
-- @tparam[opt] any context Additional context as first param to callback call, usually it's self
|
-- @tparam any|nil context Additional context as first param to callback call, usually it's self
|
||||||
-- @usage
|
-- @usage
|
||||||
-- local function on_long_callback(self)
|
-- local function on_long_callback(self)
|
||||||
-- print("Long click!")
|
-- print("Long click!")
|
||||||
@ -57,7 +57,7 @@ end
|
|||||||
--- Unsubscribe callback on event
|
--- Unsubscribe callback on event
|
||||||
-- @tparam DruidEvent self @{DruidEvent}
|
-- @tparam DruidEvent self @{DruidEvent}
|
||||||
-- @tparam function callback Callback itself
|
-- @tparam function callback Callback itself
|
||||||
-- @tparam[opt] any context Additional context as first param to callback call
|
-- @tparam any|nil context Additional context as first param to callback call
|
||||||
-- @usage
|
-- @usage
|
||||||
-- local function on_long_callback(self)
|
-- local function on_long_callback(self)
|
||||||
-- print("Long click!")
|
-- print("Long click!")
|
||||||
|
@ -71,9 +71,9 @@ end
|
|||||||
|
|
||||||
--- Set checkbox state
|
--- Set checkbox state
|
||||||
-- @tparam Checkbox self @{Checkbox}
|
-- @tparam Checkbox self @{Checkbox}
|
||||||
-- @tparam boolean state Checkbox state
|
-- @tparam boolean|nil state Checkbox state
|
||||||
-- @tparam boolean is_silent Don't trigger on_change_state if true
|
-- @tparam boolean|nil is_silent Don't trigger on_change_state if true
|
||||||
-- @tparam boolean is_instant If instant checkbox change
|
-- @tparam boolean|nil is_instant If instant checkbox change
|
||||||
function Checkbox.set_state(self, state, is_silent, is_instant)
|
function Checkbox.set_state(self, state, is_silent, is_instant)
|
||||||
self.state = state
|
self.state = state
|
||||||
self.style.on_change_state(self, self.node, state, is_instant)
|
self.style.on_change_state(self, self.node, state, is_instant)
|
||||||
|
@ -46,7 +46,7 @@ end
|
|||||||
--- Set checkbox group state
|
--- Set checkbox group state
|
||||||
-- @tparam CheckboxGroup self @{CheckboxGroup}
|
-- @tparam CheckboxGroup self @{CheckboxGroup}
|
||||||
-- @tparam boolean[] indexes Array of checkbox state
|
-- @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)
|
function CheckboxGroup.set_state(self, indexes, is_instant)
|
||||||
for i = 1, #indexes do
|
for i = 1, #indexes do
|
||||||
if self.checkboxes[i] then
|
if self.checkboxes[i] then
|
||||||
|
@ -100,7 +100,7 @@ end
|
|||||||
-- @tparam DynamicGrid self @{DynamicGrid}
|
-- @tparam DynamicGrid self @{DynamicGrid}
|
||||||
-- @tparam number index The grid element index
|
-- @tparam number index The grid element index
|
||||||
-- @tparam node node The node to be placed
|
-- @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
|
-- @treturn vector3 Node position
|
||||||
function DynamicGrid.get_pos(self, index, node, origin_index)
|
function DynamicGrid.get_pos(self, index, node, origin_index)
|
||||||
local origin_node = self.nodes[origin_index]
|
local origin_node = self.nodes[origin_index]
|
||||||
@ -140,7 +140,7 @@ end
|
|||||||
--- Add new node to the grid
|
--- Add new node to the grid
|
||||||
-- @tparam DynamicGrid self @{DynamicGrid}
|
-- @tparam DynamicGrid self @{DynamicGrid}
|
||||||
-- @tparam node node Gui node
|
-- @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=SHIFT.RIGHT] number shift_policy How shift nodes, if required. See const.SHIFT
|
||||||
-- @tparam[opt=false] boolean is_instant If true, update node positions instantly
|
-- @tparam[opt=false] boolean is_instant If true, update node positions instantly
|
||||||
function DynamicGrid.add(self, node, index, shift_policy, is_instant)
|
function DynamicGrid.add(self, node, index, shift_policy, is_instant)
|
||||||
@ -322,7 +322,7 @@ end
|
|||||||
|
|
||||||
--- Update grid inner state
|
--- Update grid inner state
|
||||||
-- @tparam DynamicGrid self @{DynamicGrid}
|
-- @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
|
-- @local
|
||||||
function DynamicGrid._update(self, is_instant)
|
function DynamicGrid._update(self, is_instant)
|
||||||
self:_update_indexes()
|
self:_update_indexes()
|
||||||
@ -378,7 +378,7 @@ end
|
|||||||
|
|
||||||
--- Update grid nodes position
|
--- Update grid nodes position
|
||||||
-- @tparam DynamicGrid self @{DynamicGrid}
|
-- @tparam DynamicGrid self @{DynamicGrid}
|
||||||
-- @tparam 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
|
-- @local
|
||||||
function DynamicGrid._update_pos(self, is_instant)
|
function DynamicGrid._update_pos(self, is_instant)
|
||||||
for index, node in pairs(self.nodes) do
|
for index, node in pairs(self.nodes) do
|
||||||
|
@ -31,7 +31,7 @@ local Hotkey = component.create("hotkey")
|
|||||||
-- @tparam Hotkey self @{Hotkey}
|
-- @tparam Hotkey self @{Hotkey}
|
||||||
-- @tparam string[]|string keys The keys to be pressed for trigger callback. Should contains one key and any modificator keys
|
-- @tparam string[]|string keys The keys to be pressed for trigger callback. Should contains one key and any modificator keys
|
||||||
-- @tparam function callback The callback function
|
-- @tparam function callback The callback function
|
||||||
-- @tparam[opt] 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)
|
function Hotkey.init(self, keys, callback, callback_argument)
|
||||||
self.druid = self:get_druid()
|
self.druid = self:get_druid()
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ end
|
|||||||
--- Add hotkey for component callback
|
--- Add hotkey for component callback
|
||||||
-- @tparam Hotkey self @{Hotkey}
|
-- @tparam Hotkey self @{Hotkey}
|
||||||
-- @tparam string[]|hash[]|string|hash keys that have to be pressed before key pressed to activate
|
-- @tparam string[]|hash[]|string|hash keys that have to be pressed before key pressed to activate
|
||||||
-- @tparam[opt] 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)
|
function Hotkey.add_hotkey(self, keys, callback_argument)
|
||||||
keys = keys or {}
|
keys = keys or {}
|
||||||
if type(keys) == "string" then
|
if type(keys) == "string" then
|
||||||
|
@ -119,7 +119,7 @@ end
|
|||||||
-- @tparam Input self @{Input}
|
-- @tparam Input self @{Input}
|
||||||
-- @tparam node click_node Node to enabled input component
|
-- @tparam node click_node Node to enabled input component
|
||||||
-- @tparam node|Text text_node Text node what will be changed on user input. You can pass text component instead of text node name @{Text}
|
-- @tparam node|Text text_node Text node what will be changed on user input. You can pass text component instead of text node name @{Text}
|
||||||
-- @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)
|
function Input.init(self, click_node, text_node, keyboard_type)
|
||||||
self.druid = self:get_druid(self)
|
self.druid = self:get_druid(self)
|
||||||
|
|
||||||
|
@ -34,8 +34,8 @@ local LangText = component.create("lang_text")
|
|||||||
|
|
||||||
--- The @{LangText} constructor
|
--- The @{LangText} constructor
|
||||||
-- @tparam LangText self @{LangText}
|
-- @tparam LangText self @{LangText}
|
||||||
-- @tparam string|node node Node name or GUI Text Node itself
|
-- @tparam string|node node The node_id or gui.get_node(node_id)
|
||||||
-- @tparam string locale_id Default locale id or text from node as default
|
-- @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
|
-- @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)
|
function LangText.init(self, node, locale_id, adjust_type)
|
||||||
self.druid = self:get_druid()
|
self.druid = self:get_druid()
|
||||||
@ -75,13 +75,13 @@ end
|
|||||||
--- Translate the text by locale_id
|
--- Translate the text by locale_id
|
||||||
-- @tparam LangText self @{LangText}
|
-- @tparam LangText self @{LangText}
|
||||||
-- @tparam string locale_id Locale id
|
-- @tparam string locale_id Locale id
|
||||||
-- @tparam[opt] string a Optional param to string.format
|
-- @tparam string|nil a Optional param to string.format
|
||||||
-- @tparam[opt] string b Optional param to string.format
|
-- @tparam string|nil b Optional param to string.format
|
||||||
-- @tparam[opt] string c Optional param to string.format
|
-- @tparam string|nil c Optional param to string.format
|
||||||
-- @tparam[opt] string d Optional param to string.format
|
-- @tparam string|nil d Optional param to string.format
|
||||||
-- @tparam[opt] string e Optional param to string.format
|
-- @tparam string|nil e Optional param to string.format
|
||||||
-- @tparam[opt] string f Optional param to string.format
|
-- @tparam string|nil f Optional param to string.format
|
||||||
-- @tparam[opt] string g Optional param to string.format
|
-- @tparam string|nil g Optional param to string.format
|
||||||
-- @treturn LangText Current instance
|
-- @treturn LangText Current instance
|
||||||
function LangText.translate(self, locale_id, a, b, c, d, e, f, g)
|
function LangText.translate(self, locale_id, a, b, c, d, e, f, g)
|
||||||
self.last_locale_args = { 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
|
--- Format string with new text params on localized text
|
||||||
-- @tparam LangText self @{LangText}
|
-- @tparam LangText self @{LangText}
|
||||||
-- @tparam[opt] string a Optional param to string.format
|
-- @tparam string|nil a Optional param to string.format
|
||||||
-- @tparam[opt] string b Optional param to string.format
|
-- @tparam string|nil b Optional param to string.format
|
||||||
-- @tparam[opt] string c Optional param to string.format
|
-- @tparam string|nil c Optional param to string.format
|
||||||
-- @tparam[opt] string d Optional param to string.format
|
-- @tparam string|nil d Optional param to string.format
|
||||||
-- @tparam[opt] string e Optional param to string.format
|
-- @tparam string|nil e Optional param to string.format
|
||||||
-- @tparam[opt] string f Optional param to string.format
|
-- @tparam string|nil f Optional param to string.format
|
||||||
-- @tparam[opt] string g Optional param to string.format
|
-- @tparam string|nil g Optional param to string.format
|
||||||
-- @treturn LangText Current instance
|
-- @treturn LangText Current instance
|
||||||
function LangText.format(self, a, b, c, d, e, f, g)
|
function LangText.format(self, a, b, c, d, e, f, g)
|
||||||
self.last_locale_args = { a, b, c, d, e, f, g }
|
self.last_locale_args = { a, b, c, d, e, f, g }
|
||||||
|
@ -32,7 +32,7 @@ local Layout = component.create("layout")
|
|||||||
-- @tparam Layout self @{Layout}
|
-- @tparam Layout self @{Layout}
|
||||||
-- @tparam node node Gui node
|
-- @tparam node node Gui node
|
||||||
-- @tparam string mode The layout mode (from const.LAYOUT_MODE)
|
-- @tparam string mode The layout mode (from const.LAYOUT_MODE)
|
||||||
-- @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)
|
function Layout.init(self, node, mode, on_size_changed_callback)
|
||||||
self.node = self:get_node(node)
|
self.node = self:get_node(node)
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ end
|
|||||||
|
|
||||||
--- Set node for layout node to fit inside it. Pass nil to reset
|
--- Set node for layout node to fit inside it. Pass nil to reset
|
||||||
-- @tparam Layout self @{Layout}
|
-- @tparam Layout self @{Layout}
|
||||||
-- @tparam[opt] node node
|
-- @tparam node|nil node
|
||||||
-- @treturn Layout @{Layout}
|
-- @treturn Layout @{Layout}
|
||||||
function Layout.fit_into_node(self, node)
|
function Layout.fit_into_node(self, node)
|
||||||
self._fit_node = node
|
self._fit_node = node
|
||||||
|
@ -210,7 +210,7 @@ end
|
|||||||
--- Start animation of a progress bar
|
--- Start animation of a progress bar
|
||||||
-- @tparam Progress self @{Progress}
|
-- @tparam Progress self @{Progress}
|
||||||
-- @tparam number to value between 0..1
|
-- @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)
|
function Progress.to(self, to, callback)
|
||||||
to = helper.clamp(to, 0, 1)
|
to = helper.clamp(to, 0, 1)
|
||||||
-- cause of float error
|
-- cause of float error
|
||||||
|
@ -55,7 +55,7 @@ end
|
|||||||
--- Set radio group state
|
--- Set radio group state
|
||||||
-- @tparam RadioGroup self @{RadioGroup}
|
-- @tparam RadioGroup self @{RadioGroup}
|
||||||
-- @tparam number index Index in radio group
|
-- @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)
|
function RadioGroup.set_state(self, index, is_instant)
|
||||||
on_checkbox_click(self, index, is_instant)
|
on_checkbox_click(self, index, is_instant)
|
||||||
end
|
end
|
||||||
|
@ -60,7 +60,7 @@ end
|
|||||||
-- @tparam Slider self @{Slider}
|
-- @tparam Slider self @{Slider}
|
||||||
-- @tparam node node Gui pin node
|
-- @tparam node node Gui pin node
|
||||||
-- @tparam vector3 end_pos The end position of slider
|
-- @tparam vector3 end_pos The end position of slider
|
||||||
-- @tparam[opt] function callback On slider change callback
|
-- @tparam function|nil callback On slider change callback
|
||||||
function Slider.init(self, node, end_pos, callback)
|
function Slider.init(self, node, end_pos, callback)
|
||||||
self.node = self:get_node(node)
|
self.node = self:get_node(node)
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ end
|
|||||||
--- Set value for slider
|
--- Set value for slider
|
||||||
-- @tparam Slider self @{Slider}
|
-- @tparam Slider self @{Slider}
|
||||||
-- @tparam number value Value from 0 to 1
|
-- @tparam number value Value from 0 to 1
|
||||||
-- @tparam[opt] 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)
|
function Slider.set(self, value, is_silent)
|
||||||
value = helper.clamp(value, 0, 1)
|
value = helper.clamp(value, 0, 1)
|
||||||
set_position(self, value)
|
set_position(self, value)
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
-- @tparam node node
|
-- @tparam node node
|
||||||
|
|
||||||
--- Restriction zone
|
--- Restriction zone
|
||||||
-- @tparam[opt] node click_zone
|
-- @tparam node|nil click_zone
|
||||||
|
|
||||||
--- Trigger on swipe event(self, swipe_side, dist, delta_time)
|
--- Trigger on swipe event(self, swipe_side, dist, delta_time)
|
||||||
-- @tfield DruidEvent on_swipe) @{DruidEvent}
|
-- @tfield DruidEvent on_swipe) @{DruidEvent}
|
||||||
|
@ -49,7 +49,7 @@ end
|
|||||||
-- @tparam node node Gui text node
|
-- @tparam node node Gui text node
|
||||||
-- @tparam number seconds_from Start timer value in seconds
|
-- @tparam number seconds_from Start timer value in seconds
|
||||||
-- @tparam[opt=0] number seconds_to End 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)
|
function Timer.init(self, node, seconds_from, seconds_to, callback)
|
||||||
self.node = self:get_node(node)
|
self.node = self:get_node(node)
|
||||||
seconds_from = math.max(seconds_from, 0)
|
seconds_from = math.max(seconds_from, 0)
|
||||||
@ -110,7 +110,7 @@ end
|
|||||||
|
|
||||||
--- Called when update
|
--- Called when update
|
||||||
-- @tparam Timer self @{Timer}
|
-- @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)
|
function Timer.set_state(self, is_on)
|
||||||
self.is_on = is_on
|
self.is_on = is_on
|
||||||
|
|
||||||
|
@ -48,8 +48,8 @@ end
|
|||||||
-- Nodes will be center around 0 x position
|
-- Nodes will be center around 0 x position
|
||||||
-- text_node will be first (at left side)
|
-- text_node will be first (at left side)
|
||||||
-- @function helper.centrate_text_with_icon
|
-- @function helper.centrate_text_with_icon
|
||||||
-- @tparam[opt] text text_node Gui text node
|
-- @tparam text|nil text_node Gui text node
|
||||||
-- @tparam[opt] box icon_node Gui box node
|
-- @tparam box|nil icon_node Gui box node
|
||||||
-- @tparam number margin Offset between nodes
|
-- @tparam number margin Offset between nodes
|
||||||
-- @local
|
-- @local
|
||||||
function M.centrate_text_with_icon(text_node, icon_node, margin)
|
function M.centrate_text_with_icon(text_node, icon_node, margin)
|
||||||
@ -61,8 +61,8 @@ end
|
|||||||
-- Nodes will be center around 0 x position
|
-- Nodes will be center around 0 x position
|
||||||
-- icon_node will be first (at left side)
|
-- icon_node will be first (at left side)
|
||||||
-- @function helper.centrate_icon_with_text
|
-- @function helper.centrate_icon_with_text
|
||||||
-- @tparam[opt] box icon_node Gui box node
|
-- @tparam box|nil icon_node Gui box node
|
||||||
-- @tparam[opt] text text_node Gui text node
|
-- @tparam text|nil text_node Gui text node
|
||||||
-- @tparam[opt=0] number margin Offset between nodes
|
-- @tparam[opt=0] number margin Offset between nodes
|
||||||
-- @local
|
-- @local
|
||||||
function M.centrate_icon_with_text(icon_node, text_node, margin)
|
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
|
--- Add all elements from source array to the target array
|
||||||
-- @function helper.add_array
|
-- @function helper.add_array
|
||||||
-- @tparam any[] target Array to put elements from source
|
-- @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
|
-- @treturn any[] The target array
|
||||||
function M.add_array(target, source)
|
function M.add_array(target, source)
|
||||||
assert(target)
|
assert(target)
|
||||||
@ -278,7 +278,7 @@ end
|
|||||||
-- @tparam node node
|
-- @tparam node node
|
||||||
-- @tparam number x
|
-- @tparam number x
|
||||||
-- @tparam number y
|
-- @tparam number y
|
||||||
-- @tparam[opt] Node node_click_area
|
-- @tparam node|nil node_click_area
|
||||||
-- @local
|
-- @local
|
||||||
function M.pick_node(node, x, y, node_click_area)
|
function M.pick_node(node, x, y, node_click_area)
|
||||||
local is_pick = gui.pick_node(node, x, y)
|
local is_pick = gui.pick_node(node, x, y)
|
||||||
@ -302,7 +302,7 @@ end
|
|||||||
--- Get cumulative parent's node scale
|
--- Get cumulative parent's node scale
|
||||||
-- @function helper.get_scene_scale
|
-- @function helper.get_scene_scale
|
||||||
-- @tparam node node Gui node
|
-- @tparam node node Gui node
|
||||||
-- @tparam 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
|
-- @treturn vector3 The scene node scale
|
||||||
function M.get_scene_scale(node, include_passed_node_scale)
|
function M.get_scene_scale(node, include_passed_node_scale)
|
||||||
local scale = include_passed_node_scale and gui.get_scale(node) or vmath.vector3(1)
|
local scale = include_passed_node_scale and gui.get_scale(node) or vmath.vector3(1)
|
||||||
@ -394,7 +394,7 @@ end
|
|||||||
--- Distance from node position to his borders
|
--- Distance from node position to his borders
|
||||||
-- @function helper.get_border
|
-- @function helper.get_border
|
||||||
-- @tparam node node GUI node
|
-- @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)
|
-- @treturn vector4 Vector4 with border values (left, top, right, down)
|
||||||
function M.get_border(node, offset)
|
function M.get_border(node, offset)
|
||||||
local pivot = gui.get_pivot(node)
|
local pivot = gui.get_pivot(node)
|
||||||
@ -452,8 +452,8 @@ end
|
|||||||
-- @function helper.insert_with_shift
|
-- @function helper.insert_with_shift
|
||||||
-- @tparam table array Array
|
-- @tparam table array Array
|
||||||
-- @param any Item to insert
|
-- @param any Item to insert
|
||||||
-- @tparam[opt] number index Index to insert. If nil, item will be inserted at the end of array
|
-- @tparam number|nil 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 shift_policy The druid_const.SHIFT.* constant
|
||||||
-- @treturn any Inserted item
|
-- @treturn any Inserted item
|
||||||
function M.insert_with_shift(array, item, index, shift_policy)
|
function M.insert_with_shift(array, item, index, shift_policy)
|
||||||
shift_policy = shift_policy or const.SHIFT.RIGHT
|
shift_policy = shift_policy or const.SHIFT.RIGHT
|
||||||
@ -483,8 +483,8 @@ end
|
|||||||
-- Shift policy can be: left, right, no_shift
|
-- Shift policy can be: left, right, no_shift
|
||||||
-- @function helper.remove_with_shift
|
-- @function helper.remove_with_shift
|
||||||
-- @tparam table array Array
|
-- @tparam table array Array
|
||||||
-- @tparam[opt] number index Index to remove. If nil, item will be removed from the end of array
|
-- @tparam number|nil 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 shift_policy The druid_const.SHIFT.* constant
|
||||||
-- @treturn any Removed item
|
-- @treturn any Removed item
|
||||||
function M.remove_with_shift(array, index, shift_policy)
|
function M.remove_with_shift(array, index, shift_policy)
|
||||||
shift_policy = shift_policy or const.SHIFT.RIGHT
|
shift_policy = shift_policy or const.SHIFT.RIGHT
|
||||||
|
@ -518,7 +518,7 @@ end
|
|||||||
|
|
||||||
--- Set debug mode for current Druid instance. It's enable debug log messages
|
--- Set debug mode for current Druid instance. It's enable debug log messages
|
||||||
-- @tparam DruidInstance self @{DruidInstance}
|
-- @tparam DruidInstance self @{DruidInstance}
|
||||||
-- @tparam boolean is_debug
|
-- @tparam boolean|nil is_debug
|
||||||
-- @treturn self @{DruidInstance}
|
-- @treturn self @{DruidInstance}
|
||||||
-- @local
|
-- @local
|
||||||
function DruidInstance.set_debug(self, is_debug)
|
function DruidInstance.set_debug(self, is_debug)
|
||||||
@ -530,7 +530,7 @@ end
|
|||||||
--- Log message, if is_debug mode is enabled
|
--- Log message, if is_debug mode is enabled
|
||||||
-- @tparam DruidInstance self @{DruidInstance}
|
-- @tparam DruidInstance self @{DruidInstance}
|
||||||
-- @tparam string message
|
-- @tparam string message
|
||||||
-- @tparam[opt] table context
|
-- @tparam table|nil context
|
||||||
-- @local
|
-- @local
|
||||||
function DruidInstance.log_message(self, message, context)
|
function DruidInstance.log_message(self, message, context)
|
||||||
if not self._is_debug then
|
if not self._is_debug then
|
||||||
@ -558,10 +558,10 @@ end
|
|||||||
|
|
||||||
--- Create @{Button} component
|
--- Create @{Button} component
|
||||||
-- @tparam DruidInstance self
|
-- @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 function callback Button callback
|
||||||
-- @tparam[opt] table params Button callback params
|
-- @tparam table|nil params Button callback params
|
||||||
-- @tparam[opt] node anim_node Button anim node (node, if not provided)
|
-- @tparam node|nil anim_node Button anim node (node, if not provided)
|
||||||
-- @treturn Button @{Button} component
|
-- @treturn Button @{Button} component
|
||||||
function DruidInstance.new_button(self, node, callback, params, anim_node)
|
function DruidInstance.new_button(self, node, callback, params, anim_node)
|
||||||
return DruidInstance.new(self, button, node, callback, params, anim_node)
|
return DruidInstance.new(self, button, node, callback, params, anim_node)
|
||||||
@ -570,7 +570,7 @@ end
|
|||||||
|
|
||||||
--- Create @{Blocker} component
|
--- Create @{Blocker} component
|
||||||
-- @tparam DruidInstance self
|
-- @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
|
-- @treturn Blocker @{Blocker} component
|
||||||
function DruidInstance.new_blocker(self, node)
|
function DruidInstance.new_blocker(self, node)
|
||||||
return DruidInstance.new(self, blocker, node)
|
return DruidInstance.new(self, blocker, node)
|
||||||
@ -580,7 +580,7 @@ end
|
|||||||
--- Create @{BackHandler} component
|
--- Create @{BackHandler} component
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam function callback @The callback(self, custom_args) to call on back event
|
-- @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
|
-- @treturn BackHandler @{BackHandler} component
|
||||||
function DruidInstance.new_back_handler(self, callback, params)
|
function DruidInstance.new_back_handler(self, callback, params)
|
||||||
return DruidInstance.new(self, back_handler, callback, params)
|
return DruidInstance.new(self, back_handler, callback, params)
|
||||||
@ -589,7 +589,7 @@ end
|
|||||||
|
|
||||||
--- Create @{Hover} component
|
--- Create @{Hover} component
|
||||||
-- @tparam DruidInstance self
|
-- @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
|
-- @tparam function on_hover_callback Hover callback
|
||||||
-- @treturn Hover @{Hover} component
|
-- @treturn Hover @{Hover} component
|
||||||
function DruidInstance.new_hover(self, node, on_hover_callback)
|
function DruidInstance.new_hover(self, node, on_hover_callback)
|
||||||
@ -599,9 +599,9 @@ end
|
|||||||
|
|
||||||
--- Create @{Text} component
|
--- Create @{Text} component
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam node node Gui text node
|
-- @tparam string|node node The node_id or gui.get_node(node_id)
|
||||||
-- @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] boolean no_adjust If true, text will be not auto-adjust size
|
-- @tparam boolean|nil no_adjust If true, text will be not auto-adjust size
|
||||||
-- @treturn Text @{Text} component
|
-- @treturn Text @{Text} component
|
||||||
function DruidInstance.new_text(self, node, value, no_adjust)
|
function DruidInstance.new_text(self, node, value, no_adjust)
|
||||||
return DruidInstance.new(self, text, node, value, no_adjust)
|
return DruidInstance.new(self, text, node, value, no_adjust)
|
||||||
@ -611,32 +611,32 @@ end
|
|||||||
--- Create @{StaticGrid} component
|
--- Create @{StaticGrid} component
|
||||||
-- Deprecated
|
-- Deprecated
|
||||||
-- @tparam DruidInstance self
|
-- @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 node element Element prefab. Need to get it size
|
||||||
-- @tparam[opt=1] number in_row How many nodes in row can be placed
|
-- @tparam[opt=1] number in_row How many nodes in row can be placed
|
||||||
-- @treturn StaticGrid @{StaticGrid} component
|
-- @treturn StaticGrid @{StaticGrid} component
|
||||||
-- @local
|
-- @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")
|
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
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Create @{StaticGrid} component
|
--- Create @{StaticGrid} component
|
||||||
-- @tparam DruidInstance self
|
-- @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 node element Element prefab. Need to get it size
|
||||||
-- @tparam[opt=1] number in_row How many nodes in row can be placed
|
-- @tparam[opt=1] number in_row How many nodes in row can be placed
|
||||||
-- @treturn StaticGrid @{StaticGrid} component
|
-- @treturn StaticGrid @{StaticGrid} component
|
||||||
function DruidInstance.new_static_grid(self, parent, element, in_row)
|
function DruidInstance.new_static_grid(self, parent_node, element, in_row)
|
||||||
return DruidInstance.new(self, static_grid, parent, element, in_row)
|
return DruidInstance.new(self, static_grid, parent_node, element, in_row)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Create @{Scroll} component
|
--- Create @{Scroll} component
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam node view_node GUI view scroll node
|
-- @tparam string|node view_node The node_id or gui.get_node(node_id). Will used as user input node.
|
||||||
-- @tparam node content_node GUI content scroll 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
|
-- @treturn Scroll @{Scroll} component
|
||||||
function DruidInstance.new_scroll(self, view_node, content_node)
|
function DruidInstance.new_scroll(self, view_node, content_node)
|
||||||
return DruidInstance.new(self, scroll, view_node, content_node)
|
return DruidInstance.new(self, scroll, view_node, content_node)
|
||||||
@ -645,7 +645,7 @@ end
|
|||||||
|
|
||||||
--- Create @{Drag} component
|
--- Create @{Drag} component
|
||||||
-- @tparam DruidInstance self
|
-- @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)
|
-- @tparam function on_drag_callback Callback for on_drag_event(self, dx, dy)
|
||||||
-- @treturn Drag @{Drag} component
|
-- @treturn Drag @{Drag} component
|
||||||
function DruidInstance.new_drag(self, node, on_drag_callback)
|
function DruidInstance.new_drag(self, node, on_drag_callback)
|
||||||
@ -655,7 +655,7 @@ end
|
|||||||
|
|
||||||
--- Create @{Swipe} component
|
--- Create @{Swipe} component
|
||||||
-- @tparam DruidInstance self
|
-- @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
|
-- @tparam function on_swipe_callback Swipe callback for on_swipe_end event
|
||||||
-- @treturn Swipe @{Swipe} component
|
-- @treturn Swipe @{Swipe} component
|
||||||
function DruidInstance.new_swipe(self, node, on_swipe_callback)
|
function DruidInstance.new_swipe(self, node, on_swipe_callback)
|
||||||
@ -665,38 +665,38 @@ end
|
|||||||
|
|
||||||
--- Create @{DynamicGrid} component
|
--- Create @{DynamicGrid} component
|
||||||
-- @tparam DruidInstance self
|
-- @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
|
-- @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")
|
return helper.require_component_message("dynamic_grid")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Create @{LangText} component
|
--- Create @{LangText} component
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam node node The text node
|
-- @tparam string|node node The_node id or gui.get_node(node_id)
|
||||||
-- @tparam string locale_id Default locale id
|
-- @tparam string|nil locale_id Default locale id or text from node as default
|
||||||
-- @tparam boolean no_adjust If true, will not correct text size
|
-- @tparam string|nil adjust_type Adjust type for text node. Default: const.TEXT_ADJUST.DOWNSCALE
|
||||||
-- @treturn LangText @{LangText} component
|
-- @treturn LangText @{LangText} component
|
||||||
function DruidInstance.new_lang_text(self, node, locale_id, no_adjust)
|
function DruidInstance.new_lang_text(self, node, locale_id, adjust_type)
|
||||||
return helper.require_component_message("lang_text")
|
return helper.require_component_message("lang_text")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Create @{Slider} component
|
--- Create @{Slider} component
|
||||||
-- @tparam DruidInstance self
|
-- @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 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
|
-- @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")
|
return helper.require_component_message("slider")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Create @{Checkbox} component
|
--- Create @{Checkbox} component
|
||||||
-- @tparam DruidInstance self
|
-- @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 function callback Checkbox callback
|
||||||
-- @tparam[opt=node] node click_node Trigger node, by default equals to node
|
-- @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
|
-- @tparam[opt=false] boolean initial_state The initial state of checkbox, default - false
|
||||||
@ -708,9 +708,9 @@ end
|
|||||||
|
|
||||||
--- Create @{Input} component
|
--- Create @{Input} component
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam node click_node Button node to enabled input component
|
-- @tparam string|node click_node Button node to enabled input component
|
||||||
-- @tparam node text_node Text node what will be changed on user input
|
-- @tparam string|node text_node Text node what will be changed on user input
|
||||||
-- @tparam[opt] number keyboard_type Gui keyboard type for input field
|
-- @tparam number|nil keyboard_type Gui keyboard type for input field
|
||||||
-- @treturn Input @{Input} component
|
-- @treturn Input @{Input} component
|
||||||
function DruidInstance.new_input(self, click_node, text_node, keyboard_type)
|
function DruidInstance.new_input(self, click_node, text_node, keyboard_type)
|
||||||
return helper.require_component_message("input")
|
return helper.require_component_message("input")
|
||||||
@ -752,10 +752,10 @@ end
|
|||||||
|
|
||||||
--- Create @{Timer} component
|
--- Create @{Timer} component
|
||||||
-- @tparam DruidInstance self
|
-- @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 number seconds_from Start timer value in seconds
|
||||||
-- @tparam[opt=0] number seconds_to End 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
|
-- @treturn Timer @{Timer} component
|
||||||
function DruidInstance.new_timer(self, node, seconds_from, seconds_to, callback)
|
function DruidInstance.new_timer(self, node, seconds_from, seconds_to, callback)
|
||||||
return helper.require_component_message("timer")
|
return helper.require_component_message("timer")
|
||||||
@ -775,7 +775,7 @@ end
|
|||||||
|
|
||||||
--- Create @{Layout} component
|
--- Create @{Layout} component
|
||||||
-- @tparam DruidInstance self
|
-- @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
|
-- @tparam string mode The layout mode
|
||||||
-- @treturn Layout @{Layout} component
|
-- @treturn Layout @{Layout} component
|
||||||
function DruidInstance.new_layout(self, node, mode)
|
function DruidInstance.new_layout(self, node, mode)
|
||||||
@ -787,7 +787,7 @@ end
|
|||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam string|string[] keys_array Keys for trigger action. Should contains one action key and any amount of modificator keys
|
-- @tparam string|string[] keys_array Keys for trigger action. Should contains one action key and any amount of modificator keys
|
||||||
-- @tparam function callback The callback function
|
-- @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
|
-- @treturn Hotkey @{Hotkey} component
|
||||||
function DruidInstance.new_hotkey(self, keys_array, callback, callback_argument)
|
function DruidInstance.new_hotkey(self, keys_array, callback, callback_argument)
|
||||||
return helper.require_component_message("hotkey")
|
return helper.require_component_message("hotkey")
|
||||||
@ -797,8 +797,8 @@ end
|
|||||||
--- Create @{RichText} component.
|
--- Create @{RichText} component.
|
||||||
-- As a template please check rich_text.gui layout.
|
-- As a template please check rich_text.gui layout.
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam[opt] string template Template name if used
|
-- @tparam string|nil template Template name if used
|
||||||
-- @tparam[opt] table nodes Nodes table from gui.clone_tree
|
-- @tparam table|nil nodes Nodes table from gui.clone_tree
|
||||||
-- @treturn RichText @{RichText} component
|
-- @treturn RichText @{RichText} component
|
||||||
function DruidInstance.new_rich_text(self, template, nodes)
|
function DruidInstance.new_rich_text(self, template, nodes)
|
||||||
return helper.require_component_message("rich_text", "custom")
|
return helper.require_component_message("rich_text", "custom")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user