mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 10:27:47 +02:00
Annotations update [3]
This commit is contained in:
parent
50c9b6bad5
commit
c99b97f392
@ -360,7 +360,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">zone</span>
|
<li><span class="parameter">zone</span>
|
||||||
<span class="types"><a class="type" href="../modules/Button.html#node">node</a></span>
|
<span class="types"><a class="type" href="../modules/Button.html#node">node</a> or <span class="type">nil</span></span>
|
||||||
Gui node
|
Gui node
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -158,7 +158,7 @@ end
|
|||||||
<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>
|
||||||
<td class="name" nowrap><a href="#new_checkbox">new_checkbox(self, node, callback[, click_node=node[, initial_state=false]])</a></td>
|
<td class="name" nowrap><a href="#new_checkbox">new_checkbox(self, node, callback, click_node, initial_state)</a></td>
|
||||||
<td class="summary">Create <a href="../modules/Checkbox.html#">Checkbox</a> component</td>
|
<td class="summary">Create <a href="../modules/Checkbox.html#">Checkbox</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -198,7 +198,7 @@ end
|
|||||||
<td class="summary">Create <a href="../modules/Layout.html#">Layout</a> component</td>
|
<td class="summary">Create <a href="../modules/Layout.html#">Layout</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#new_progress">new_progress(self, node, key[, init_value=1])</a></td>
|
<td class="name" nowrap><a href="#new_progress">new_progress(self, node, key, init_value)</a></td>
|
||||||
<td class="summary">Create <a href="../modules/Progress.html#">Progress</a> component</td>
|
<td class="summary">Create <a href="../modules/Progress.html#">Progress</a> component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -218,7 +218,7 @@ end
|
|||||||
<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_node, element[, in_row=1])</a></td>
|
<td class="name" nowrap><a href="#new_static_grid">new_static_grid(self, parent_node, item, in_row)</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>
|
||||||
@ -230,7 +230,7 @@ end
|
|||||||
<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, 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>
|
||||||
@ -311,6 +311,12 @@ end
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">BaseComponent</span></span>
|
||||||
|
Component instance
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -331,7 +337,7 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">callback</span>
|
<li><span class="parameter">callback</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||||
@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>
|
||||||
@ -401,7 +407,7 @@ end
|
|||||||
The node_id or gui.get_node(node_id)
|
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> or <span class="type">nil</span></span>
|
||||||
Button callback
|
Button callback
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">params</span>
|
<li><span class="parameter">params</span>
|
||||||
@ -427,7 +433,7 @@ end
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_checkbox"></a>
|
<a name = "new_checkbox"></a>
|
||||||
<strong>new_checkbox(self, node, callback[, click_node=node[, initial_state=false]])</strong>
|
<strong>new_checkbox(self, node, callback, click_node, initial_state)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create <a href="../modules/Checkbox.html#">Checkbox</a> component
|
Create <a href="../modules/Checkbox.html#">Checkbox</a> component
|
||||||
@ -444,18 +450,16 @@ end
|
|||||||
The_node id or gui.get_node(node_id).
|
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> or <span class="type">nil</span></span>
|
||||||
Checkbox callback
|
Checkbox callback
|
||||||
</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"><span class="type">node</span> or <span class="type">nil</span></span>
|
||||||
Trigger node, by default equals to node
|
Trigger node, Default: node
|
||||||
(<em>default</em> node)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">initial_state</span>
|
<li><span class="parameter">initial_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 initial state of checkbox, default - false
|
The initial state of checkbox, Default: false
|
||||||
(<em>default</em> false)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -568,7 +572,7 @@ end
|
|||||||
The node_id or gui.get_node(node_id). Will used as user input node.
|
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> or <span class="type">nil</span></span>
|
||||||
Callback for on_drag_event(self, dx, dy)
|
Callback for on_drag_event(self, dx, dy)
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -673,7 +677,7 @@ end
|
|||||||
The node_id or gui.get_node(node_id)
|
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> or <span class="type">nil</span></span>
|
||||||
Hover callback
|
Hover callback
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -804,7 +808,7 @@ end
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_progress"></a>
|
<a name = "new_progress"></a>
|
||||||
<strong>new_progress(self, node, key[, init_value=1])</strong>
|
<strong>new_progress(self, node, key, init_value)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create <a href="../modules/Progress.html#">Progress</a> component
|
Create <a href="../modules/Progress.html#">Progress</a> component
|
||||||
@ -825,9 +829,8 @@ end
|
|||||||
Progress bar direction: const.SIDE.X or const.SIDE.Y
|
Progress bar direction: const.SIDE.X or const.SIDE.Y
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">init_value</span>
|
<li><span class="parameter">init_value</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>
|
||||||
Initial value of progress bar
|
Initial value of progress bar. Default: 1
|
||||||
(<em>default</em> 1)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -994,7 +997,7 @@ end
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_static_grid"></a>
|
<a name = "new_static_grid"></a>
|
||||||
<strong>new_static_grid(self, parent_node, element[, in_row=1])</strong>
|
<strong>new_static_grid(self, parent_node, item, in_row)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create <a href="../modules/StaticGrid.html#">StaticGrid</a> component
|
Create <a href="../modules/StaticGrid.html#">StaticGrid</a> component
|
||||||
@ -1010,14 +1013,13 @@ end
|
|||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
||||||
The node_id or gui.get_node(node_id). Parent of all Grid items.
|
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">item</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>
|
||||||
Element prefab. Need to get it size
|
Item prefab. Required to get grid's item size. Can be adjusted separately.
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">in_row</span>
|
<li><span class="parameter">in_row</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>
|
||||||
How many nodes in row can be placed
|
How many nodes in row can be placed
|
||||||
(<em>default</em> 1)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -1051,7 +1053,7 @@ end
|
|||||||
The node_id or gui.get_node(node_id). Will used as user input 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> or <span class="type">nil</span></span>
|
||||||
Swipe callback for on_swipe_end event
|
Swipe callback for on_swipe_end event
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -1108,7 +1110,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, callback)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Create <a href="../modules/Timer.html#">Timer</a> component
|
Create <a href="../modules/Timer.html#">Timer</a> component
|
||||||
@ -1129,9 +1131,8 @@ end
|
|||||||
Start timer value in seconds
|
Start timer value in seconds
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">seconds_to</span>
|
<li><span class="parameter">seconds_to</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>
|
||||||
End timer value in seconds
|
End timer value in seconds
|
||||||
(<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> or <span class="type">nil</span></span>
|
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||||
|
@ -91,7 +91,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<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>
|
||||||
<td class="name" nowrap><a href="#helper.centrate_nodes">helper.centrate_nodes([margin=0], ...)</a></td>
|
<td class="name" nowrap><a href="#helper.centrate_nodes">helper.centrate_nodes(margin, ...)</a></td>
|
||||||
<td class="summary">Centerate nodes by x position with margin.</td>
|
<td class="summary">Centerate nodes by x position with margin.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -163,7 +163,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<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>
|
||||||
<td class="name" nowrap><a href="#helper.round">helper.round(num[, num_decimal_places=0])</a></td>
|
<td class="name" nowrap><a href="#helper.round">helper.round(num, num_decimal_places)</a></td>
|
||||||
<td class="summary">Round number to specified decimal places</td>
|
<td class="summary">Round number to specified decimal places</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -220,7 +220,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "helper.centrate_nodes"></a>
|
<a name = "helper.centrate_nodes"></a>
|
||||||
<strong>helper.centrate_nodes([margin=0], ...)</strong>
|
<strong>helper.centrate_nodes(margin, ...)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Centerate nodes by x position with margin.
|
Centerate nodes by x position with margin.
|
||||||
@ -231,9 +231,8 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">margin</span>
|
<li><span class="parameter">margin</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>
|
||||||
Offset between nodes
|
Offset between nodes
|
||||||
(<em>default</em> 0)
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">...</span>
|
<li><span class="parameter">...</span>
|
||||||
Gui nodes
|
Gui nodes
|
||||||
@ -752,7 +751,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "helper.round"></a>
|
<a name = "helper.round"></a>
|
||||||
<strong>helper.round(num[, num_decimal_places=0])</strong>
|
<strong>helper.round(num, num_decimal_places)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Round number to specified decimal places
|
Round number to specified decimal places
|
||||||
@ -765,9 +764,8 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
Number
|
Number
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">num_decimal_places</span>
|
<li><span class="parameter">num_decimal_places</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>
|
||||||
Decimal places
|
Decimal places
|
||||||
(<em>default</em> 0)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -107,6 +107,10 @@
|
|||||||
</table>
|
</table>
|
||||||
<h2><a href="#Fields">Fields</a></h2>
|
<h2><a href="#Fields">Fields</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#node">node</a></td>
|
||||||
|
<td class="summary">Text node</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#on_change">on_change</a></td>
|
<td class="name" nowrap><a href="#on_change">on_change</a></td>
|
||||||
<td class="summary">On change text callback</td>
|
<td class="summary">On change text callback</td>
|
||||||
@ -194,7 +198,7 @@
|
|||||||
<a href="../modules/LangText.html#">LangText</a>
|
<a href="../modules/LangText.html#">LangText</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">node</span>
|
<li><span class="parameter">node</span>
|
||||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <a class="type" href="../modules/LangText.html#node">node</a></span>
|
||||||
The node_id or gui.get_node(node_id)
|
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>
|
||||||
@ -308,6 +312,26 @@
|
|||||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
||||||
|
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "node"></a>
|
||||||
|
<strong>node</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Text node
|
||||||
|
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">node</span>
|
||||||
|
<span class="types"><a class="type" href="../modules/LangText.html#node">node</a></span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "on_change"></a>
|
<a name = "on_change"></a>
|
||||||
<strong>on_change</strong>
|
<strong>on_change</strong>
|
||||||
|
@ -144,7 +144,7 @@
|
|||||||
<td class="summary">Strict drag scroll area.</td>
|
<td class="summary">Strict drag scroll area.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#set_extra_stretch_size">set_extra_stretch_size(self[, stretch_size=0])</a></td>
|
<td class="name" nowrap><a href="#set_extra_stretch_size">set_extra_stretch_size(self, stretch_size)</a></td>
|
||||||
<td class="summary">Set extra size for scroll stretching.</td>
|
<td class="summary">Set extra size for scroll stretching.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -537,7 +537,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "set_extra_stretch_size"></a>
|
<a name = "set_extra_stretch_size"></a>
|
||||||
<strong>set_extra_stretch_size(self[, stretch_size=0])</strong>
|
<strong>set_extra_stretch_size(self, stretch_size)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set extra size for scroll stretching.
|
Set extra size for scroll stretching.
|
||||||
@ -551,9 +551,8 @@
|
|||||||
<a href="../modules/Scroll.html#">Scroll</a>
|
<a href="../modules/Scroll.html#">Scroll</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">stretch_size</span>
|
<li><span class="parameter">stretch_size</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>
|
||||||
Size in pixels of additional scroll area
|
Size in pixels of additional scroll area
|
||||||
(<em>default</em> 0)
|
|
||||||
</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, is_instant)</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>
|
||||||
@ -142,7 +142,7 @@
|
|||||||
<td class="summary">The <a href="../modules/StaticGrid.html#">StaticGrid</a> constructor</td>
|
<td class="summary">The <a href="../modules/StaticGrid.html#">StaticGrid</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#remove">remove(self, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]])</a></td>
|
<td class="name" nowrap><a href="#remove">remove(self, index, shift_policy, is_instant)</a></td>
|
||||||
<td class="summary">Remove the item from the grid.</td>
|
<td class="summary">Remove the item from 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, is_instant)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Add new item to the grid
|
Add new item to the grid
|
||||||
@ -244,21 +244,19 @@
|
|||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">item</span>
|
<li><span class="parameter">item</span>
|
||||||
<span class="types"><span class="type">node</span></span>
|
<span class="types"><span class="type">node</span></span>
|
||||||
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> or <span class="type">nil</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
|
||||||
</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>
|
||||||
How shift nodes, if required. See const.SHIFT
|
How shift nodes, if required. Default: const.SHIFT.RIGHT
|
||||||
(<em>default</em> SHIFT.RIGHT)
|
|
||||||
</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 true, update node positions instantly
|
If true, update node positions instantly
|
||||||
(<em>default</em> false)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -532,7 +530,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "remove"></a>
|
<a name = "remove"></a>
|
||||||
<strong>remove(self, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]])</strong>
|
<strong>remove(self, index, shift_policy, is_instant)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Remove the item from the grid. Note that gui node will be not deleted
|
Remove the item from the grid. Note that gui node will be not deleted
|
||||||
@ -549,14 +547,12 @@
|
|||||||
The grid node index to remove
|
The grid node index to remove
|
||||||
</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>
|
||||||
How shift nodes, if required. See const.SHIFT
|
How shift nodes, if required. Default: const.SHIFT.RIGHT
|
||||||
(<em>default</em> SHIFT.RIGHT)
|
|
||||||
</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 true, update node positions instantly
|
If true, update node positions instantly
|
||||||
(<em>default</em> false)
|
|
||||||
</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, 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, callback)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
The <a href="../modules/Timer.html#">Timer</a> constructor
|
The <a href="../modules/Timer.html#">Timer</a> constructor
|
||||||
@ -162,9 +162,8 @@
|
|||||||
Start timer value in seconds
|
Start timer value in seconds
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">seconds_to</span>
|
<li><span class="parameter">seconds_to</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>
|
||||||
End timer value in seconds
|
End timer value in seconds
|
||||||
(<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> or <span class="type">nil</span></span>
|
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -478,7 +478,7 @@ end
|
|||||||
--
|
--
|
||||||
-- This functions calls automatically if you don't disable it in game.project: druid.no_stencil_check
|
-- This functions calls automatically if you don't disable it in game.project: druid.no_stencil_check
|
||||||
-- @tparam Button self @{Button}
|
-- @tparam Button self @{Button}
|
||||||
-- @tparam node zone Gui node
|
-- @tparam node|nil zone Gui node
|
||||||
-- @treturn Button Current button instance
|
-- @treturn Button Current button instance
|
||||||
-- @usage
|
-- @usage
|
||||||
-- button:set_click_zone("stencil_node")
|
-- button:set_click_zone("stencil_node")
|
||||||
|
@ -359,7 +359,7 @@ end
|
|||||||
--- Set extra size for scroll stretching.
|
--- Set extra size for scroll stretching.
|
||||||
-- Set 0 to disable stretching effect
|
-- Set 0 to disable stretching effect
|
||||||
-- @tparam Scroll self @{Scroll}
|
-- @tparam Scroll self @{Scroll}
|
||||||
-- @tparam[opt=0] number stretch_size Size in pixels of additional scroll area
|
-- @tparam number|nil stretch_size Size in pixels of additional scroll area
|
||||||
-- @treturn druid.scroll Current scroll instance
|
-- @treturn druid.scroll Current scroll instance
|
||||||
function Scroll.set_extra_stretch_size(self, stretch_size)
|
function Scroll.set_extra_stretch_size(self, stretch_size)
|
||||||
self.style.EXTRA_STRETCH_SIZE = stretch_size or 0
|
self.style.EXTRA_STRETCH_SIZE = stretch_size or 0
|
||||||
|
@ -213,10 +213,10 @@ 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 number|nil 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 number|nil shift_policy How shift nodes, if required. Default: const.SHIFT.RIGHT
|
||||||
-- @tparam[opt=false] boolean is_instant If true, update node positions instantly
|
-- @tparam boolean|nil 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)
|
||||||
index = index or ((self.last_index or 0) + 1)
|
index = index or ((self.last_index or 0) + 1)
|
||||||
|
|
||||||
@ -239,8 +239,8 @@ end
|
|||||||
--- Remove the item from the grid. Note that gui node will be not deleted
|
--- Remove the item from the grid. Note that gui node will be not deleted
|
||||||
-- @tparam StaticGrid self @{StaticGrid}
|
-- @tparam StaticGrid self @{StaticGrid}
|
||||||
-- @tparam number index The grid node index to remove
|
-- @tparam number index The grid node index to remove
|
||||||
-- @tparam[opt=SHIFT.RIGHT] number shift_policy How shift nodes, if required. See const.SHIFT
|
-- @tparam number|nil shift_policy How shift nodes, if required. Default: const.SHIFT.RIGHT
|
||||||
-- @tparam[opt=false] boolean is_instant If true, update node positions instantly
|
-- @tparam boolean|nil is_instant If true, update node positions instantly
|
||||||
-- @treturn node The deleted gui node from grid
|
-- @treturn node The deleted gui node from grid
|
||||||
function StaticGrid.remove(self, index, shift_policy, is_instant)
|
function StaticGrid.remove(self, index, shift_policy, is_instant)
|
||||||
assert(self.nodes[index], "No grid item at given index " .. index)
|
assert(self.nodes[index], "No grid item at given index " .. index)
|
||||||
|
@ -347,7 +347,7 @@ end
|
|||||||
-- by `BaseComponent.create`
|
-- by `BaseComponent.create`
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @tparam string name BaseComponent name
|
-- @tparam string name BaseComponent name
|
||||||
-- @tparam[opt=DEFAULT] number input_priority The input priority. The bigger number processed first
|
-- @tparam number|nil input_priority The input priority. The bigger number processed first
|
||||||
-- @local
|
-- @local
|
||||||
function BaseComponent.initialize(self, name, input_priority)
|
function BaseComponent.initialize(self, name, input_priority)
|
||||||
self._component = {
|
self._component = {
|
||||||
@ -483,7 +483,7 @@ end
|
|||||||
--- Create new component. It will inheritance from basic Druid component.
|
--- Create new component. It will inheritance from basic Druid component.
|
||||||
-- @function BaseComponent.create
|
-- @function BaseComponent.create
|
||||||
-- @tparam string name BaseComponent name
|
-- @tparam string name BaseComponent name
|
||||||
-- @tparam[opt=DEFAULT] number input_priority The input priority. The bigger number processed first
|
-- @tparam number|nil input_priority The input priority. The bigger number processed first
|
||||||
-- @local
|
-- @local
|
||||||
function BaseComponent.create(name, input_priority)
|
function BaseComponent.create(name, input_priority)
|
||||||
-- Yea, inheritance here
|
-- Yea, inheritance here
|
||||||
|
@ -7,18 +7,18 @@
|
|||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.ACTION_TEXT = hash(sys.get_config("druid.input_text", "text"))
|
M.ACTION_TEXT = hash(sys.get_config_string("druid.input_text", "text"))
|
||||||
M.ACTION_TOUCH = hash(sys.get_config("druid.input_touch", "touch"))
|
M.ACTION_TOUCH = hash(sys.get_config_string("druid.input_touch", "touch"))
|
||||||
M.ACTION_MARKED_TEXT = hash(sys.get_config("druid.input_marked_text", "marked_text"))
|
M.ACTION_MARKED_TEXT = hash(sys.get_config_string("druid.input_marked_text", "marked_text"))
|
||||||
M.ACTION_ESC = hash(sys.get_config("druid.input_key_esc", "key_esc"))
|
M.ACTION_ESC = hash(sys.get_config_string("druid.input_key_esc", "key_esc"))
|
||||||
M.ACTION_BACK = hash(sys.get_config("druid.input_key_back", "key_back"))
|
M.ACTION_BACK = hash(sys.get_config_string("druid.input_key_back", "key_back"))
|
||||||
M.ACTION_ENTER = hash(sys.get_config("druid.input_key_enter", "key_enter"))
|
M.ACTION_ENTER = hash(sys.get_config_string("druid.input_key_enter", "key_enter"))
|
||||||
M.ACTION_MULTITOUCH = hash(sys.get_config("druid.input_multitouch", "touch_multi"))
|
M.ACTION_MULTITOUCH = hash(sys.get_config_string("druid.input_multitouch", "touch_multi"))
|
||||||
M.ACTION_BACKSPACE = hash(sys.get_config("druid.input_key_backspace", "key_backspace"))
|
M.ACTION_BACKSPACE = hash(sys.get_config_string("druid.input_key_backspace", "key_backspace"))
|
||||||
M.ACTION_SCROLL_UP = hash(sys.get_config("druid.input_scroll_up", "mouse_wheel_up"))
|
M.ACTION_SCROLL_UP = hash(sys.get_config_string("druid.input_scroll_up", "mouse_wheel_up"))
|
||||||
M.ACTION_SCROLL_DOWN = hash(sys.get_config("druid.input_scroll_down", "mouse_wheel_down"))
|
M.ACTION_SCROLL_DOWN = hash(sys.get_config_string("druid.input_scroll_down", "mouse_wheel_down"))
|
||||||
|
|
||||||
M.IS_STENCIL_CHECK = not (sys.get_config("druid.no_stencil_check") == "1")
|
M.IS_STENCIL_CHECK = not (sys.get_config_string("druid.no_stencil_check") == "1")
|
||||||
|
|
||||||
|
|
||||||
M.ON_INPUT = "on_input"
|
M.ON_INPUT = "on_input"
|
||||||
|
@ -23,6 +23,9 @@
|
|||||||
--- The text component
|
--- The text component
|
||||||
-- @tfield Text text @{Text}
|
-- @tfield Text text @{Text}
|
||||||
|
|
||||||
|
--- Text node
|
||||||
|
-- @tfield node node
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
local Event = require("druid.event")
|
local Event = require("druid.event")
|
||||||
|
@ -48,7 +48,7 @@ end
|
|||||||
-- @tparam Timer self @{Timer}
|
-- @tparam Timer self @{Timer}
|
||||||
-- @tparam node node Gui text node
|
-- @tparam node node Gui text node
|
||||||
-- @tparam number seconds_from Start timer value in seconds
|
-- @tparam number seconds_from Start timer value in seconds
|
||||||
-- @tparam[opt=0] number seconds_to End timer value in seconds
|
-- @tparam number|nil seconds_to End timer value in seconds
|
||||||
-- @tparam function|nil 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)
|
||||||
|
@ -63,7 +63,7 @@ end
|
|||||||
-- @function helper.centrate_icon_with_text
|
-- @function helper.centrate_icon_with_text
|
||||||
-- @tparam box|nil icon_node Gui box node
|
-- @tparam box|nil icon_node Gui box node
|
||||||
-- @tparam text|nil text_node Gui text node
|
-- @tparam text|nil text_node Gui text node
|
||||||
-- @tparam[opt=0] number margin Offset between nodes
|
-- @tparam number|nil 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)
|
||||||
return M.centrate_nodes(margin, icon_node, text_node)
|
return M.centrate_nodes(margin, icon_node, text_node)
|
||||||
@ -75,7 +75,7 @@ end
|
|||||||
-- This functions calculate total width of nodes and set position for each node.
|
-- This functions calculate total width of nodes and set position for each node.
|
||||||
-- The centrate will be around 0 x position.
|
-- The centrate will be around 0 x position.
|
||||||
-- @function helper.centrate_nodes
|
-- @function helper.centrate_nodes
|
||||||
-- @tparam[opt=0] number margin Offset between nodes
|
-- @tparam number|nil margin Offset between nodes
|
||||||
-- @param ... Gui nodes
|
-- @param ... Gui nodes
|
||||||
function M.centrate_nodes(margin, ...)
|
function M.centrate_nodes(margin, ...)
|
||||||
margin = margin or 0
|
margin = margin or 0
|
||||||
@ -200,7 +200,7 @@ end
|
|||||||
--- Round number to specified decimal places
|
--- Round number to specified decimal places
|
||||||
-- @function helper.round
|
-- @function helper.round
|
||||||
-- @tparam number num Number
|
-- @tparam number num Number
|
||||||
-- @tparam[opt=0] number num_decimal_places Decimal places
|
-- @tparam number|nil num_decimal_places Decimal places
|
||||||
-- @treturn number Rounded number
|
-- @treturn number Rounded number
|
||||||
function M.round(num, num_decimal_places)
|
function M.round(num, num_decimal_places)
|
||||||
local mult = 10^(num_decimal_places or 0)
|
local mult = 10^(num_decimal_places or 0)
|
||||||
|
@ -261,6 +261,7 @@ end
|
|||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam BaseComponent component Component module
|
-- @tparam BaseComponent component Component module
|
||||||
-- @tparam any ... Other component params to pass it to component:init function
|
-- @tparam any ... Other component params to pass it to component:init function
|
||||||
|
-- @treturn BaseComponent Component instance
|
||||||
function DruidInstance.new(self, component, ...)
|
function DruidInstance.new(self, component, ...)
|
||||||
local instance = create(self, component)
|
local instance = create(self, component)
|
||||||
|
|
||||||
@ -559,7 +560,7 @@ end
|
|||||||
--- Create @{Button} component
|
--- Create @{Button} component
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam string|node node The node_id or gui.get_node(node_id)
|
-- @tparam string|node node The node_id or gui.get_node(node_id)
|
||||||
-- @tparam function callback Button callback
|
-- @tparam function|nil callback Button callback
|
||||||
-- @tparam table|nil params Button callback params
|
-- @tparam table|nil params Button callback params
|
||||||
-- @tparam node|nil 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
|
||||||
@ -579,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|nil callback @The callback(self, custom_args) to call on back event
|
||||||
-- @tparam any|nil 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)
|
||||||
@ -590,7 +591,7 @@ end
|
|||||||
--- Create @{Hover} component
|
--- Create @{Hover} component
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam string|node node The node_id or gui.get_node(node_id)
|
-- @tparam string|node node The node_id or gui.get_node(node_id)
|
||||||
-- @tparam function on_hover_callback Hover callback
|
-- @tparam function|nil 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)
|
||||||
return DruidInstance.new(self, hover, node, on_hover_callback)
|
return DruidInstance.new(self, hover, node, on_hover_callback)
|
||||||
@ -612,24 +613,24 @@ end
|
|||||||
-- Deprecated
|
-- Deprecated
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam string|node parent_node The node_id or gui.get_node(node_id). Parent of all Grid items.
|
-- @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 item Element prefab. Required to get grid's item size. Can be adjusted separately.
|
||||||
-- @tparam[opt=1] number in_row How many nodes in row can be placed
|
-- @tparam number|nil 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_node, element, in_row)
|
function DruidInstance.new_grid(self, parent_node, item, 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_node, element, in_row)
|
return DruidInstance.new(self, static_grid, parent_node, item, in_row)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Create @{StaticGrid} component
|
--- Create @{StaticGrid} component
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam string|node parent_node The node_id or gui.get_node(node_id). Parent of all Grid items.
|
-- @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 string|node item Item prefab. Required to get grid's item size. Can be adjusted separately.
|
||||||
-- @tparam[opt=1] number in_row How many nodes in row can be placed
|
-- @tparam number|nil 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_node, element, in_row)
|
function DruidInstance.new_static_grid(self, parent_node, item, in_row)
|
||||||
return DruidInstance.new(self, static_grid, parent_node, element, in_row)
|
return DruidInstance.new(self, static_grid, parent_node, item, in_row)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -646,7 +647,7 @@ end
|
|||||||
--- Create @{Drag} component
|
--- Create @{Drag} component
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam string|node node The node_id or gui.get_node(node_id). Will used as user input node.
|
-- @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|nil 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)
|
||||||
return DruidInstance.new(self, drag, node, on_drag_callback)
|
return DruidInstance.new(self, drag, node, on_drag_callback)
|
||||||
@ -656,7 +657,7 @@ end
|
|||||||
--- Create @{Swipe} component
|
--- Create @{Swipe} component
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam string|node node The node_id or gui.get_node(node_id). Will used as user input 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|nil 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)
|
||||||
return helper.require_component_message("swipe")
|
return helper.require_component_message("swipe")
|
||||||
@ -697,9 +698,9 @@ end
|
|||||||
--- Create @{Checkbox} component
|
--- Create @{Checkbox} component
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam string|node node The_node id or gui.get_node(node_id).
|
-- @tparam string|node node The_node id or gui.get_node(node_id).
|
||||||
-- @tparam function callback Checkbox callback
|
-- @tparam function|nil callback Checkbox callback
|
||||||
-- @tparam[opt=node] node click_node Trigger node, by default equals to node
|
-- @tparam node|nil click_node Trigger node, Default: node
|
||||||
-- @tparam[opt=false] boolean initial_state The initial state of checkbox, default - false
|
-- @tparam boolean|nil initial_state The initial state of checkbox, Default: false
|
||||||
-- @treturn Checkbox @{Checkbox} component
|
-- @treturn Checkbox @{Checkbox} component
|
||||||
function DruidInstance.new_checkbox(self, node, callback, click_node, initial_state)
|
function DruidInstance.new_checkbox(self, node, callback, click_node, initial_state)
|
||||||
return helper.require_component_message("checkbox")
|
return helper.require_component_message("checkbox")
|
||||||
@ -754,7 +755,7 @@ end
|
|||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam string|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 number|nil seconds_to End timer value in seconds
|
||||||
-- @tparam function|nil 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)
|
||||||
@ -766,7 +767,7 @@ end
|
|||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam string|node node Progress bar fill node or node name
|
-- @tparam string|node node Progress bar fill node or node name
|
||||||
-- @tparam string key Progress bar direction: const.SIDE.X or const.SIDE.Y
|
-- @tparam string key Progress bar direction: const.SIDE.X or const.SIDE.Y
|
||||||
-- @tparam[opt=1] number init_value Initial value of progress bar
|
-- @tparam number|nil init_value Initial value of progress bar. Default: 1
|
||||||
-- @treturn Progress @{Progress} component
|
-- @treturn Progress @{Progress} component
|
||||||
function DruidInstance.new_progress(self, node, key, init_value)
|
function DruidInstance.new_progress(self, node, key, init_value)
|
||||||
return helper.require_component_message("progress")
|
return helper.require_component_message("progress")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user