Update docs, config generations, fix linter

This commit is contained in:
Insality
2024-10-15 19:34:07 +03:00
parent 2f5336fa4f
commit 5848921cba
44 changed files with 1880 additions and 1336 deletions

View File

@@ -93,10 +93,18 @@
<td class="summary">Return current input field text</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_text_selected_replaced">get_text_selected_replaced(self, text)</a></td>
<td class="summary">Replace selected text with new text</td>
</tr>
<tr>
<td class="name" nowrap><a href="#init">init(self, click_node, text_node, keyboard_type)</a></td>
<td class="summary">The <a href="../modules/Input.html#">Input</a> constructor</td>
</tr>
<tr>
<td class="name" nowrap><a href="#move_selection">move_selection(self, delta, is_add_to_selection, is_move_to_end)</a></td>
<td class="summary">Change cursor position by delta</td>
</tr>
<tr>
<td class="name" nowrap><a href="#reset_changes">reset_changes(self)</a></td>
<td class="summary">Reset current input selection and return previous value</td>
</tr>
@@ -105,6 +113,10 @@
<td class="summary">Select input field.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#select_cursor">select_cursor(self, cursor_index, start_index, end_index)</a></td>
<td class="summary">Set cursor position in input field</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_allowed_characters">set_allowed_characters(self, characters)</a></td>
<td class="summary">Set allowed charaters for input field.</td>
</tr>
@@ -139,6 +151,18 @@
<td class="summary">Button component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#current_value">current_value</a></td>
<td class="summary">Current input value with marked text</td>
</tr>
<tr>
<td class="name" nowrap><a href="#cursor_index">cursor_index</a></td>
<td class="summary">The cursor index.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#end_index">end_index</a></td>
<td class="summary">Theselection end index.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#is_empty">is_empty</a></td>
<td class="summary">Is current input is empty now</td>
</tr>
@@ -151,6 +175,14 @@
<td class="summary">Gui keyboard type for input field</td>
</tr>
<tr>
<td class="name" nowrap><a href="#marked_text_width">marked_text_width</a></td>
<td class="summary">Marked text width</td>
</tr>
<tr>
<td class="name" nowrap><a href="#marked_value">marked_value</a></td>
<td class="summary">Marked text for input field.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#max_length">max_length</a></td>
<td class="summary">Max length for input text</td>
</tr>
@@ -164,7 +196,7 @@
</tr>
<tr>
<td class="name" nowrap><a href="#on_input_select">on_input_select</a></td>
<td class="summary">On input field select callback(self, button_node)</td>
<td class="summary">On input field select callback(self, input_instance)</td>
</tr>
<tr>
<td class="name" nowrap><a href="#on_input_text">on_input_text</a></td>
@@ -172,16 +204,36 @@
</tr>
<tr>
<td class="name" nowrap><a href="#on_input_unselect">on_input_unselect</a></td>
<td class="summary">On input field unselect callback(self, input_text)</td>
<td class="summary">On input field unselect callback(self, input_text, input_instance)</td>
</tr>
<tr>
<td class="name" nowrap><a href="#on_input_wrong">on_input_wrong</a></td>
<td class="summary">On trying user input with not allowed character callback(self, params, button_instance)</td>
<td class="summary">On trying user input with not allowed character callback(self, params, input_text)</td>
</tr>
<tr>
<td class="name" nowrap><a href="#on_select_cursor_change">on_select_cursor_change</a></td>
<td class="summary">On cursor position change callback(self, cursor_index, start_index, end_index)</td>
</tr>
<tr>
<td class="name" nowrap><a href="#previous_value">previous_value</a></td>
<td class="summary">Previous input value</td>
</tr>
<tr>
<td class="name" nowrap><a href="#start_index">start_index</a></td>
<td class="summary">The selection start index.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#text">text</a></td>
<td class="summary">Text component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#text_width">text_width</a></td>
<td class="summary">Text width</td>
</tr>
<tr>
<td class="name" nowrap><a href="#value">value</a></td>
<td class="summary">Current input value</td>
</tr>
</table>
<br/>
@@ -217,6 +269,37 @@
</dd>
<dt>
<a name = "get_text_selected_replaced"></a>
<strong>get_text_selected_replaced(self, text)</strong>
</dt>
<dd>
Replace selected text with new text
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><span class="type">Input</span></span>
<a href="../modules/Input.html#">Input</a>
</li>
<li><span class="parameter">text</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
The text to replace selected text
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
New input text
</ol>
</dd>
<dt>
<a name = "init"></a>
@@ -250,6 +333,39 @@
</dd>
<dt>
<a name = "move_selection"></a>
<strong>move_selection(self, delta, is_add_to_selection, is_move_to_end)</strong>
</dt>
<dd>
Change cursor position by delta
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><span class="type">Input</span></span>
<a href="../modules/Input.html#">Input</a>
</li>
<li><span class="parameter">delta</span>
<span class="types"><span class="type">number</span></span>
side for cursor position, -1 for left, 1 for right
</li>
<li><span class="parameter">is_add_to_selection</span>
<span class="types"><span class="type">boolean</span></span>
(Shift key)
</li>
<li><span class="parameter">is_move_to_end</span>
<span class="types"><span class="type">boolean</span></span>
(Ctrl key)
</li>
</ul>
</dd>
<dt>
<a name = "reset_changes"></a>
@@ -267,6 +383,12 @@
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">druid.input</span></span>
Current input instance
</ol>
@@ -292,6 +414,45 @@
</dd>
<dt>
<a name = "select_cursor"></a>
<strong>select_cursor(self, cursor_index, start_index, end_index)</strong>
</dt>
<dd>
Set cursor position in input field
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><span class="type">Input</span></span>
<a href="../modules/Input.html#">Input</a>
</li>
<li><span class="parameter">cursor_index</span>
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
Cursor index for cursor position, if nil - will be set to the end of the text
</li>
<li><span class="parameter">start_index</span>
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
Start index for cursor position, if nil - will be set to the end of the text
</li>
<li><span class="parameter">end_index</span>
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
End index for cursor position, if nil - will be set to the start_index
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">druid.input</span></span>
Current input instance
</ol>
</dd>
<dt>
<a name = "set_allowed_characters"></a>
@@ -432,10 +593,6 @@
<span class="types"><span class="type">boolean</span></span>
If true, call unselect on select selected input. Default: false
</li>
<li><span class="parameter">NO_CONSUME_INPUT_WHILE_SELECTED</span>
<span class="types"><span class="type">boolean</span></span>
If true, will not consume input while input is selected. It's allow to interact with other components while input is selected (text input still captured). Default: false
</li>
<li><span class="parameter">on_select</span>
<span class="types"><span class="type">function</span></span>
(self, button_node) Callback on input field selecting
@@ -502,6 +659,66 @@
</dd>
<dt>
<a name = "current_value"></a>
<strong>current_value</strong>
</dt>
<dd>
Current input value with marked text
<ul>
<li><span class="parameter">current_value</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
</li>
</ul>
</dd>
<dt>
<a name = "cursor_index"></a>
<strong>cursor_index</strong>
</dt>
<dd>
The cursor index. The index of letter cursor after. Leftmost cursor - 0
<ul>
<li><span class="parameter">cursor_index</span>
<span class="types"><span class="type">number</span></span>
</li>
</ul>
</dd>
<dt>
<a name = "end_index"></a>
<strong>end_index</strong>
</dt>
<dd>
Theselection end index. The index of letter cursor before. Rightmost selection - #text
<ul>
<li><span class="parameter">end_index</span>
<span class="types"><span class="type">number</span></span>
</li>
</ul>
</dd>
<dt>
<a name = "is_empty"></a>
@@ -562,6 +779,46 @@
</dd>
<dt>
<a name = "marked_text_width"></a>
<strong>marked_text_width</strong>
</dt>
<dd>
Marked text width
<ul>
<li><span class="parameter">marked_text_width</span>
<span class="types"><span class="type">number</span></span>
</li>
</ul>
</dd>
<dt>
<a name = "marked_value"></a>
<strong>marked_value</strong>
</dt>
<dd>
Marked text for input field. Info: https://defold.com/manuals/input-key-and-text/#marked-text
<ul>
<li><span class="parameter">marked_value</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
</li>
</ul>
</dd>
<dt>
<a name = "max_length"></a>
@@ -628,7 +885,7 @@
<strong>on_input_select</strong>
</dt>
<dd>
On input field select callback(self, button_node)
On input field select callback(self, input_instance)
<ul>
@@ -668,7 +925,7 @@
<strong>on_input_unselect</strong>
</dt>
<dd>
On input field unselect callback(self, input_text)
On input field unselect callback(self, input_text, input_instance)
<ul>
@@ -688,7 +945,7 @@
<strong>on_input_wrong</strong>
</dt>
<dd>
On trying user input with not allowed character callback(self, params, button_instance)
On trying user input with not allowed character callback(self, params, input_text)
<ul>
@@ -702,6 +959,66 @@
</dd>
<dt>
<a name = "on_select_cursor_change"></a>
<strong>on_select_cursor_change</strong>
</dt>
<dd>
On cursor position change callback(self, cursor_index, start_index, end_index)
<ul>
<li><span class="parameter">on_select_cursor_change</span>
<span class="types"><span class="type">DruidEvent</span></span>
<a href="../modules/DruidEvent.html#">DruidEvent</a>
</li>
</ul>
</dd>
<dt>
<a name = "previous_value"></a>
<strong>previous_value</strong>
</dt>
<dd>
Previous input value
<ul>
<li><span class="parameter">previous_value</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
</li>
</ul>
</dd>
<dt>
<a name = "start_index"></a>
<strong>start_index</strong>
</dt>
<dd>
The selection start index. The index of letter cursor after. Leftmost selection - 0
<ul>
<li><span class="parameter">start_index</span>
<span class="types"><span class="type">number</span></span>
</li>
</ul>
</dd>
<dt>
<a name = "text"></a>
@@ -722,6 +1039,46 @@
</dd>
<dt>
<a name = "text_width"></a>
<strong>text_width</strong>
</dt>
<dd>
Text width
<ul>
<li><span class="parameter">text_width</span>
<span class="types"><span class="type">number</span></span>
</li>
</ul>
</dd>
<dt>
<a name = "value"></a>
<strong>value</strong>
</dt>
<dd>
Current input value
<ul>
<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>
</li>
</ul>
</dd>
</dl>