mirror of
https://github.com/Insality/druid
synced 2025-09-27 10:02:19 +02:00
Annotations update [3]
This commit is contained in:
@@ -360,7 +360,7 @@ local button = self.druid:new_button("button_name", on_button_click, c
|
||||
<a href="../modules/Button.html#">Button</a>
|
||||
</li>
|
||||
<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
|
||||
</li>
|
||||
</ul>
|
||||
|
@@ -158,7 +158,7 @@ end
|
||||
<td class="summary">Create <a href="../modules/Button.html#">Button</a> component</td>
|
||||
</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>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -198,7 +198,7 @@ end
|
||||
<td class="summary">Create <a href="../modules/Layout.html#">Layout</a> component</td>
|
||||
</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>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -218,7 +218,7 @@ end
|
||||
<td class="summary">Create <a href="../modules/Slider.html#">Slider</a> component</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#new_static_grid">new_static_grid(self, parent_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>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -230,7 +230,7 @@ end
|
||||
<td class="summary">Create <a href="../modules/Text.html#">Text</a> component</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#new_timer">new_timer(self, node, seconds_from[, seconds_to=0], callback)</a></td>
|
||||
<td class="name" nowrap><a href="#new_timer">new_timer(self, node, seconds_from, seconds_to, callback)</a></td>
|
||||
<td class="summary">Create <a href="../modules/Timer.html#">Timer</a> component</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -311,6 +311,12 @@ end
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">BaseComponent</span></span>
|
||||
Component instance
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
@@ -331,7 +337,7 @@ end
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||
@The callback(self, custom_args) to call on back event
|
||||
</li>
|
||||
<li><span class="parameter">params</span>
|
||||
@@ -401,7 +407,7 @@ end
|
||||
The node_id or gui.get_node(node_id)
|
||||
</li>
|
||||
<li><span class="parameter">callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||
Button callback
|
||||
</li>
|
||||
<li><span class="parameter">params</span>
|
||||
@@ -427,7 +433,7 @@ end
|
||||
</dd>
|
||||
<dt>
|
||||
<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>
|
||||
<dd>
|
||||
Create <a href="../modules/Checkbox.html#">Checkbox</a> component
|
||||
@@ -444,18 +450,16 @@ end
|
||||
The_node id or gui.get_node(node_id).
|
||||
</li>
|
||||
<li><span class="parameter">callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||
Checkbox callback
|
||||
</li>
|
||||
<li><span class="parameter">click_node</span>
|
||||
<span class="types"><span class="type">node</span></span>
|
||||
Trigger node, by default equals to node
|
||||
(<em>default</em> node)
|
||||
<span class="types"><span class="type">node</span> or <span class="type">nil</span></span>
|
||||
Trigger node, Default: node
|
||||
</li>
|
||||
<li><span class="parameter">initial_state</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
The initial state of checkbox, default - false
|
||||
(<em>default</em> false)
|
||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||
The initial state of checkbox, Default: false
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -568,7 +572,7 @@ end
|
||||
The node_id or gui.get_node(node_id). Will used as user input node.
|
||||
</li>
|
||||
<li><span class="parameter">on_drag_callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||
Callback for on_drag_event(self, dx, dy)
|
||||
</li>
|
||||
</ul>
|
||||
@@ -673,7 +677,7 @@ end
|
||||
The node_id or gui.get_node(node_id)
|
||||
</li>
|
||||
<li><span class="parameter">on_hover_callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||
Hover callback
|
||||
</li>
|
||||
</ul>
|
||||
@@ -804,7 +808,7 @@ end
|
||||
</dd>
|
||||
<dt>
|
||||
<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>
|
||||
<dd>
|
||||
Create <a href="../modules/Progress.html#">Progress</a> component
|
||||
@@ -825,9 +829,8 @@ end
|
||||
Progress bar direction: const.SIDE.X or const.SIDE.Y
|
||||
</li>
|
||||
<li><span class="parameter">init_value</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
Initial value of progress bar
|
||||
(<em>default</em> 1)
|
||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
||||
Initial value of progress bar. Default: 1
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -994,7 +997,7 @@ end
|
||||
</dd>
|
||||
<dt>
|
||||
<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>
|
||||
<dd>
|
||||
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>
|
||||
The node_id or gui.get_node(node_id). Parent of all Grid items.
|
||||
</li>
|
||||
<li><span class="parameter">element</span>
|
||||
<span class="types"><span class="type">node</span></span>
|
||||
Element prefab. Need to get it size
|
||||
<li><span class="parameter">item</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>
|
||||
Item prefab. Required to get grid's item size. Can be adjusted separately.
|
||||
</li>
|
||||
<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
|
||||
(<em>default</em> 1)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -1051,7 +1053,7 @@ end
|
||||
The node_id or gui.get_node(node_id). Will used as user input node.
|
||||
</li>
|
||||
<li><span class="parameter">on_swipe_callback</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||
Swipe callback for on_swipe_end event
|
||||
</li>
|
||||
</ul>
|
||||
@@ -1108,7 +1110,7 @@ end
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "new_timer"></a>
|
||||
<strong>new_timer(self, node, seconds_from[, seconds_to=0], callback)</strong>
|
||||
<strong>new_timer(self, node, seconds_from, seconds_to, callback)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Create <a href="../modules/Timer.html#">Timer</a> component
|
||||
@@ -1129,9 +1131,8 @@ end
|
||||
Start timer value in seconds
|
||||
</li>
|
||||
<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
|
||||
(<em>default</em> 0)
|
||||
</li>
|
||||
<li><span class="parameter">callback</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -220,7 +220,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "helper.centrate_nodes"></a>
|
||||
<strong>helper.centrate_nodes([margin=0], ...)</strong>
|
||||
<strong>helper.centrate_nodes(margin, ...)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Centerate nodes by x position with margin.
|
||||
@@ -231,9 +231,8 @@ helper.centrate_nodes(0, node_1, node_2)
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<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
|
||||
(<em>default</em> 0)
|
||||
</li>
|
||||
<li><span class="parameter">...</span>
|
||||
Gui nodes
|
||||
@@ -752,7 +751,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "helper.round"></a>
|
||||
<strong>helper.round(num[, num_decimal_places=0])</strong>
|
||||
<strong>helper.round(num, num_decimal_places)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Round number to specified decimal places
|
||||
@@ -765,9 +764,8 @@ helper.centrate_nodes(0, node_1, node_2)
|
||||
Number
|
||||
</li>
|
||||
<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
|
||||
(<em>default</em> 0)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@@ -107,6 +107,10 @@
|
||||
</table>
|
||||
<h2><a href="#Fields">Fields</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#node">node</a></td>
|
||||
<td class="summary">Text node</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#on_change">on_change</a></td>
|
||||
<td class="summary">On change text callback</td>
|
||||
@@ -194,7 +198,7 @@
|
||||
<a href="../modules/LangText.html#">LangText</a>
|
||||
</li>
|
||||
<li><span class="parameter">node</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a> or <span class="type">node</span></span>
|
||||
<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)
|
||||
</li>
|
||||
<li><span class="parameter">locale_id</span>
|
||||
@@ -308,6 +312,26 @@
|
||||
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
||||
|
||||
<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>
|
||||
<a name = "on_change"></a>
|
||||
<strong>on_change</strong>
|
||||
|
@@ -144,7 +144,7 @@
|
||||
<td class="summary">Strict drag scroll area.</td>
|
||||
</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>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -537,7 +537,7 @@
|
||||
</dd>
|
||||
<dt>
|
||||
<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>
|
||||
<dd>
|
||||
Set extra size for scroll stretching.
|
||||
@@ -551,9 +551,8 @@
|
||||
<a href="../modules/Scroll.html#">Scroll</a>
|
||||
</li>
|
||||
<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
|
||||
(<em>default</em> 0)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@@ -102,7 +102,7 @@
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#add">add(self, item, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]])</a></td>
|
||||
<td class="name" nowrap><a href="#add">add(self, item, index, shift_policy, is_instant)</a></td>
|
||||
<td class="summary">Add new item to the grid</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -142,7 +142,7 @@
|
||||
<td class="summary">The <a href="../modules/StaticGrid.html#">StaticGrid</a> constructor</td>
|
||||
</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>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -230,7 +230,7 @@
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "add"></a>
|
||||
<strong>add(self, item, index[, shift_policy=SHIFT.RIGHT[, is_instant=false]])</strong>
|
||||
<strong>add(self, item, index, shift_policy, is_instant)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Add new item to the grid
|
||||
@@ -244,21 +244,19 @@
|
||||
</li>
|
||||
<li><span class="parameter">item</span>
|
||||
<span class="types"><span class="type">node</span></span>
|
||||
Gui node
|
||||
GUI node
|
||||
</li>
|
||||
<li><span class="parameter">index</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
|
||||
</li>
|
||||
<li><span class="parameter">shift_policy</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
How shift nodes, if required. See const.SHIFT
|
||||
(<em>default</em> SHIFT.RIGHT)
|
||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
||||
How shift nodes, if required. Default: const.SHIFT.RIGHT
|
||||
</li>
|
||||
<li><span class="parameter">is_instant</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||
If true, update node positions instantly
|
||||
(<em>default</em> false)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -532,7 +530,7 @@
|
||||
</dd>
|
||||
<dt>
|
||||
<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>
|
||||
<dd>
|
||||
Remove the item from the grid. Note that gui node will be not deleted
|
||||
@@ -549,14 +547,12 @@
|
||||
The grid node index to remove
|
||||
</li>
|
||||
<li><span class="parameter">shift_policy</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
How shift nodes, if required. See const.SHIFT
|
||||
(<em>default</em> SHIFT.RIGHT)
|
||||
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
||||
How shift nodes, if required. Default: const.SHIFT.RIGHT
|
||||
</li>
|
||||
<li><span class="parameter">is_instant</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||
If true, update node positions instantly
|
||||
(<em>default</em> false)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@@ -84,7 +84,7 @@
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#init">init(self, node, seconds_from[, seconds_to=0], callback)</a></td>
|
||||
<td class="name" nowrap><a href="#init">init(self, node, seconds_from, seconds_to, callback)</a></td>
|
||||
<td class="summary">The <a href="../modules/Timer.html#">Timer</a> constructor</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -141,7 +141,7 @@
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "init"></a>
|
||||
<strong>init(self, node, seconds_from[, seconds_to=0], callback)</strong>
|
||||
<strong>init(self, node, seconds_from, seconds_to, callback)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
The <a href="../modules/Timer.html#">Timer</a> constructor
|
||||
@@ -162,9 +162,8 @@
|
||||
Start timer value in seconds
|
||||
</li>
|
||||
<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
|
||||
(<em>default</em> 0)
|
||||
</li>
|
||||
<li><span class="parameter">callback</span>
|
||||
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||
|
Reference in New Issue
Block a user