mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 18:37:44 +02:00
Merge pull request #247 from Insality/update_annotations
Update Druid annotations
This commit is contained in:
commit
5d4039da4f
2
.github/workflows/ci-workflow.yml
vendored
2
.github/workflows/ci-workflow.yml
vendored
@ -12,7 +12,7 @@ jobs:
|
|||||||
lfs: true
|
lfs: true
|
||||||
- uses: actions/setup-java@v1
|
- uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: '13'
|
java-version: '17'
|
||||||
|
|
||||||
- name: Build && Run
|
- name: Build && Run
|
||||||
run: |
|
run: |
|
||||||
|
@ -16,3 +16,4 @@ date,sha,version,build_size,build_time,platform,mode,is_cache_using,commits_coun
|
|||||||
2023-08-05T16:02:55Z,628723386eb3875f7190d079a2e7c510d044a311,0.11.692,2456,40,js-web,release,true,692
|
2023-08-05T16:02:55Z,628723386eb3875f7190d079a2e7c510d044a311,0.11.692,2456,40,js-web,release,true,692
|
||||||
2023-08-05T16:31:19Z,37fff52aa59feb20f761ef4d340d9f677743d54b,0.11.693,2456,43,js-web,release,true,693
|
2023-08-05T16:31:19Z,37fff52aa59feb20f761ef4d340d9f677743d54b,0.11.693,2456,43,js-web,release,true,693
|
||||||
2023-08-05T16:41:25Z,d7dd4a86b81d73d345ad7e136de9c2c488bc4d8b,0.11.694,2452,43,js-web,release,true,694
|
2023-08-05T16:41:25Z,d7dd4a86b81d73d345ad7e136de9c2c488bc4d8b,0.11.694,2452,43,js-web,release,true,694
|
||||||
|
2023-10-20T08:23:33Z,9132dc477b645d674ec21efbfcf85f48ef0ea8a6,0.11.718,2544,47,js-web,release,true,718
|
||||||
|
|
@ -1 +1 @@
|
|||||||
{"content":[{"name":"game.projectc","size":4114,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":23008,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":607568,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":24253,"pieces":[{"name":"game.dmanifest0","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game.public.der0","offset":0}]}]}
|
{"content":[{"name":"game.projectc","size":4141,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":23248,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":608384,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":26065,"pieces":[{"name":"game.dmanifest0","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game.public.der0","offset":0}]}]}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,12 +1,12 @@
|
|||||||
[project]
|
[project]
|
||||||
title = druid
|
title = druid
|
||||||
version = 0.11.694
|
version = 0.11.718
|
||||||
write_log = 0
|
write_log = 0
|
||||||
compress_archive = 1
|
compress_archive = 1
|
||||||
publisher = Insality
|
publisher = Insality
|
||||||
developer = Insality
|
developer = Insality
|
||||||
commit_sha = d7dd4a86b81d73d345ad7e136de9c2c488bc4d8b
|
commit_sha = 9132dc477b645d674ec21efbfcf85f48ef0ea8a6
|
||||||
build_date = 2023-08-05T16:41:25Z
|
build_date = 2023-10-20T08:23:33Z
|
||||||
title_as_file_name = druid
|
title_as_file_name = druid
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
@ -102,6 +102,7 @@ max_count = 0
|
|||||||
max_count = 64
|
max_count = 64
|
||||||
max_particlefx_count = 64
|
max_particlefx_count = 64
|
||||||
max_particle_count = 1024
|
max_particle_count = 1024
|
||||||
|
max_animation_count = 1024
|
||||||
|
|
||||||
[collection]
|
[collection]
|
||||||
max_instances = 128
|
max_instances = 128
|
||||||
@ -126,7 +127,7 @@ default_language = en
|
|||||||
localizations = en
|
localizations = en
|
||||||
|
|
||||||
[android]
|
[android]
|
||||||
version_code = 694
|
version_code = 718
|
||||||
minimum_sdk_version = 19
|
minimum_sdk_version = 19
|
||||||
target_sdk_version = 33
|
target_sdk_version = 33
|
||||||
package = com.insality.druid
|
package = com.insality.druid
|
||||||
|
@ -132,7 +132,10 @@ var EngineLoader = {
|
|||||||
async function fetchWithProgress(path) {
|
async function fetchWithProgress(path) {
|
||||||
const response = await fetch(path);
|
const response = await fetch(path);
|
||||||
// May be incorrect if compressed
|
// May be incorrect if compressed
|
||||||
const contentLength = response.headers.get("Content-Length");
|
var contentLength = response.headers.get("Content-Length");
|
||||||
|
if (!contentLength){
|
||||||
|
contentLength = EngineLoader.wasm_size;
|
||||||
|
}
|
||||||
const total = parseInt(contentLength, 10);
|
const total = parseInt(contentLength, 10);
|
||||||
|
|
||||||
let bytesLoaded = 0;
|
let bytesLoaded = 0;
|
||||||
@ -725,7 +728,7 @@ var Module = {
|
|||||||
FS.syncfs(true, function(err) {
|
FS.syncfs(true, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
Module._syncTries += 1;
|
Module._syncTries += 1;
|
||||||
console.error("FS syncfs error: " + err);
|
console.warn("Unable to synchronize mounted file systems: " + err);
|
||||||
if (Module._syncMaxTries > Module._syncTries) {
|
if (Module._syncMaxTries > Module._syncTries) {
|
||||||
Module.preSync(done);
|
Module.preSync(done);
|
||||||
} else {
|
} else {
|
||||||
@ -847,7 +850,7 @@ var Module = {
|
|||||||
Module._syncInProgress = false;
|
Module._syncInProgress = false;
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error("Module._startSyncFS error: " + err);
|
console.warn("Unable to synchronize mounted file systems: " + err);
|
||||||
Module._syncTries += 1;
|
Module._syncTries += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -7,7 +7,7 @@
|
|||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<!-- The above 4 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
<!-- The above 4 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||||
|
|
||||||
<title>druid 0.11.694</title>
|
<title>druid 0.11.718</title>
|
||||||
<style type='text/css'>
|
<style type='text/css'>
|
||||||
/* Disable user selection to avoid strange bug in Chrome on Windows:
|
/* Disable user selection to avoid strange bug in Chrome on Windows:
|
||||||
* Selecting a text outside the canvas, then clicking+draging would
|
* Selecting a text outside the canvas, then clicking+draging would
|
||||||
@ -165,6 +165,8 @@
|
|||||||
return scriptDirectory + path;
|
return scriptDirectory + path;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var is_iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
var is_iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
||||||
var buttonHeight = 0;
|
var buttonHeight = 0;
|
||||||
var prevInnerWidth = -1;
|
var prevInnerWidth = -1;
|
||||||
|
@ -98,67 +98,67 @@ return AwesomeComponent
|
|||||||
<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="#component:get_childrens">component:get_childrens(self)</a></td>
|
<td class="name" nowrap><a href="#get_childrens">get_childrens(self)</a></td>
|
||||||
<td class="summary">Return all children components, recursive</td>
|
<td class="summary">Return all children components, recursive</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#component:get_context">component:get_context(self)</a></td>
|
<td class="name" nowrap><a href="#get_context">get_context(self)</a></td>
|
||||||
<td class="summary">Context used as first arg in all Druid events</td>
|
<td class="summary">Context used as first arg in all Druid events</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#component:get_druid">component:get_druid(self)</a></td>
|
<td class="name" nowrap><a href="#get_druid">get_druid(self)</a></td>
|
||||||
<td class="summary">Get Druid instance for inner component creation.</td>
|
<td class="summary">Get Druid instance for inner component creation.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#component:get_input_priority">component:get_input_priority(self)</a></td>
|
<td class="name" nowrap><a href="#get_input_priority">get_input_priority(self)</a></td>
|
||||||
<td class="summary">Return component input priority</td>
|
<td class="summary">Return component input priority</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#component:get_name">component:get_name(self)</a></td>
|
<td class="name" nowrap><a href="#get_name">get_name(self)</a></td>
|
||||||
<td class="summary">Return component name</td>
|
<td class="summary">Return component name</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#component:get_node">component:get_node(self, node_or_name)</a></td>
|
<td class="name" nowrap><a href="#get_node">get_node(self, node_or_name)</a></td>
|
||||||
<td class="summary">Get component node by name.</td>
|
<td class="summary">Get component node by name.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#component:get_parent_component">component:get_parent_component(self)</a></td>
|
<td class="name" nowrap><a href="#get_parent_component">get_parent_component(self)</a></td>
|
||||||
<td class="summary">Return the parent component if exist</td>
|
<td class="summary">Return the parent component if exist</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#component:get_parent_name">component:get_parent_name(self)</a></td>
|
<td class="name" nowrap><a href="#get_parent_name">get_parent_name(self)</a></td>
|
||||||
<td class="summary">Return parent component name</td>
|
<td class="summary">Return parent component name</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#component:get_template">component:get_template(self)</a></td>
|
<td class="name" nowrap><a href="#get_template">get_template(self)</a></td>
|
||||||
<td class="summary">Get current component template name.</td>
|
<td class="summary">Get current component template name.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#component:get_uid">component:get_uid(self)</a></td>
|
<td class="name" nowrap><a href="#get_uid">get_uid(self)</a></td>
|
||||||
<td class="summary">Return component UID.</td>
|
<td class="summary">Return component UID.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#component:reset_input_priority">component:reset_input_priority(self)</a></td>
|
<td class="name" nowrap><a href="#reset_input_priority">reset_input_priority(self)</a></td>
|
||||||
<td class="summary">Reset component input priority to default value</td>
|
<td class="summary">Reset component input priority to default value</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#component:set_input_enabled">component:set_input_enabled(self, state)</a></td>
|
<td class="name" nowrap><a href="#set_input_enabled">set_input_enabled(self, state)</a></td>
|
||||||
<td class="summary">Set component input state.</td>
|
<td class="summary">Set component input state.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#component:set_input_priority">component:set_input_priority(self, value, is_temporary)</a></td>
|
<td class="name" nowrap><a href="#set_input_priority">set_input_priority(self, value, is_temporary)</a></td>
|
||||||
<td class="summary">Set component input priority</td>
|
<td class="summary">Set component input priority</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#component:set_nodes">component:set_nodes(self, nodes)</a></td>
|
<td class="name" nowrap><a href="#set_nodes">set_nodes(self, nodes)</a></td>
|
||||||
<td class="summary">Set current component nodes.</td>
|
<td class="summary">Set current component nodes.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#component:set_style">component:set_style(self, druid_style)</a></td>
|
<td class="name" nowrap><a href="#set_style">set_style(self, druid_style)</a></td>
|
||||||
<td class="summary">Set current component style table.</td>
|
<td class="summary">Set current component style table.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#component:set_template">component:set_template(self, template)</a></td>
|
<td class="name" nowrap><a href="#set_template">set_template(self, template)</a></td>
|
||||||
<td class="summary">Set component template name.</td>
|
<td class="summary">Set component template name.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -171,8 +171,8 @@ return AwesomeComponent
|
|||||||
|
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:get_childrens"></a>
|
<a name = "get_childrens"></a>
|
||||||
<strong>component:get_childrens(self)</strong>
|
<strong>get_childrens(self)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Return all children components, recursive
|
Return all children components, recursive
|
||||||
@ -198,8 +198,8 @@ return AwesomeComponent
|
|||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:get_context"></a>
|
<a name = "get_context"></a>
|
||||||
<strong>component:get_context(self)</strong>
|
<strong>get_context(self)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Context used as first arg in all Druid events Context is usually self of gui_script.
|
Context used as first arg in all Druid events Context is usually self of gui_script.
|
||||||
@ -225,8 +225,8 @@ return AwesomeComponent
|
|||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:get_druid"></a>
|
<a name = "get_druid"></a>
|
||||||
<strong>component:get_druid(self)</strong>
|
<strong>get_druid(self)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Get Druid instance for inner component creation.
|
Get Druid instance for inner component creation.
|
||||||
@ -243,7 +243,7 @@ return AwesomeComponent
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">Druid</span></span>
|
<span class="types"><span class="type">DruidInstance</span></span>
|
||||||
Druid instance with component context
|
Druid instance with component context
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -252,8 +252,8 @@ return AwesomeComponent
|
|||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:get_input_priority"></a>
|
<a name = "get_input_priority"></a>
|
||||||
<strong>component:get_input_priority(self)</strong>
|
<strong>get_input_priority(self)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Return component input priority
|
Return component input priority
|
||||||
@ -279,8 +279,8 @@ return AwesomeComponent
|
|||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:get_name"></a>
|
<a name = "get_name"></a>
|
||||||
<strong>component:get_name(self)</strong>
|
<strong>get_name(self)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Return component name
|
Return component name
|
||||||
@ -306,8 +306,8 @@ return AwesomeComponent
|
|||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:get_node"></a>
|
<a name = "get_node"></a>
|
||||||
<strong>component:get_node(self, node_or_name)</strong>
|
<strong>get_node(self, node_or_name)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Get component node by name.
|
Get component node by name.
|
||||||
@ -341,8 +341,8 @@ return AwesomeComponent
|
|||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:get_parent_component"></a>
|
<a name = "get_parent_component"></a>
|
||||||
<strong>component:get_parent_component(self)</strong>
|
<strong>get_parent_component(self)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Return the parent component if exist
|
Return the parent component if exist
|
||||||
@ -368,8 +368,8 @@ return AwesomeComponent
|
|||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:get_parent_name"></a>
|
<a name = "get_parent_name"></a>
|
||||||
<strong>component:get_parent_name(self)</strong>
|
<strong>get_parent_name(self)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Return parent component name
|
Return parent component name
|
||||||
@ -395,8 +395,8 @@ return AwesomeComponent
|
|||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:get_template"></a>
|
<a name = "get_template"></a>
|
||||||
<strong>component:get_template(self)</strong>
|
<strong>get_template(self)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Get current component template name.
|
Get current component template name.
|
||||||
@ -422,8 +422,8 @@ return AwesomeComponent
|
|||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:get_uid"></a>
|
<a name = "get_uid"></a>
|
||||||
<strong>component:get_uid(self)</strong>
|
<strong>get_uid(self)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Return component UID.
|
Return component UID.
|
||||||
@ -450,8 +450,8 @@ return AwesomeComponent
|
|||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:reset_input_priority"></a>
|
<a name = "reset_input_priority"></a>
|
||||||
<strong>component:reset_input_priority(self)</strong>
|
<strong>reset_input_priority(self)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Reset component input priority to default value
|
Reset component input priority to default value
|
||||||
@ -477,8 +477,8 @@ return AwesomeComponent
|
|||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:set_input_enabled"></a>
|
<a name = "set_input_enabled"></a>
|
||||||
<strong>component:set_input_enabled(self, state)</strong>
|
<strong>set_input_enabled(self, state)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set component input state. By default it enabled
|
Set component input state. By default it enabled
|
||||||
@ -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">bool</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>
|
||||||
@ -509,8 +509,8 @@ return AwesomeComponent
|
|||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:set_input_priority"></a>
|
<a name = "set_input_priority"></a>
|
||||||
<strong>component:set_input_priority(self, value, is_temporary)</strong>
|
<strong>set_input_priority(self, value, is_temporary)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set component input priority Default value: 10
|
Set component input priority Default value: 10
|
||||||
@ -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>
|
||||||
@ -544,8 +544,8 @@ return AwesomeComponent
|
|||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:set_nodes"></a>
|
<a name = "set_nodes"></a>
|
||||||
<strong>component:set_nodes(self, nodes)</strong>
|
<strong>set_nodes(self, nodes)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set current component nodes.
|
Set current component nodes.
|
||||||
@ -582,8 +582,8 @@ self:set_nodes(nodes)</pre>
|
|||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:set_style"></a>
|
<a name = "set_style"></a>
|
||||||
<strong>component:set_style(self, druid_style)</strong>
|
<strong>set_style(self, druid_style)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set current component style table.
|
Set current component style table.
|
||||||
@ -598,7 +598,7 @@ self:set_nodes(nodes)</pre>
|
|||||||
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
<a href="../modules/BaseComponent.html#">BaseComponent</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">druid_style</span>
|
<li><span class="parameter">druid_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>
|
||||||
Druid style module
|
Druid style module
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -615,8 +615,8 @@ self:set_nodes(nodes)</pre>
|
|||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "component:set_template"></a>
|
<a name = "set_template"></a>
|
||||||
<strong>component:set_template(self, template)</strong>
|
<strong>set_template(self, template)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set component template name.
|
Set component template name.
|
||||||
|
@ -95,7 +95,7 @@ local blocker = self.druid:new_blocker(node)
|
|||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, node)</a></td>
|
<td class="name" nowrap><a href="#init">init(self, node)</a></td>
|
||||||
<td class="summary"><a href="../modules/Blocker.html#">Blocker</a> constructor</td>
|
<td class="summary">The <a href="../modules/Blocker.html#">Blocker</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td>
|
<td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td>
|
||||||
@ -126,7 +126,7 @@ local blocker = self.druid:new_blocker(node)
|
|||||||
<strong>init(self, node)</strong>
|
<strong>init(self, node)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="../modules/Blocker.html#">Blocker</a> constructor
|
The <a href="../modules/Blocker.html#">Blocker</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -165,8 +165,8 @@ local blocker = self.druid:new_blocker(node)
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
True, if blocker is enabled
|
@True, if blocker is enabled
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
@ -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">bool</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>
|
||||||
|
@ -97,7 +97,7 @@
|
|||||||
print("Also the button component is passed in callback params")
|
print("Also the button component is passed in callback params")
|
||||||
end
|
end
|
||||||
|
|
||||||
local custom_args = "Any variable to pass inside callback"
|
local custom_args = "any variable to pass inside callback"
|
||||||
local button = self.druid:new_button("button_name", on_button_click, custom_args)
|
local button = self.druid:new_button("button_name", on_button_click, custom_args)
|
||||||
</pre>
|
</pre>
|
||||||
</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
|
||||||
@ -254,22 +254,20 @@ 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">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/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 <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>, <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>
|
||||||
|
|
||||||
@ -298,8 +296,8 @@ local button = self.druid:new_button("button_name", on_button_click, c
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
True, if button is enabled now, False overwise
|
@True, if button is enabled now, False overwise
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
@ -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>
|
||||||
|
|
||||||
@ -364,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>
|
||||||
@ -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">bool</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>
|
||||||
|
|
||||||
@ -529,23 +524,23 @@ button:set_enabled(<span class="keyword">true</span>)</pre>
|
|||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">on_click</span>
|
<li><span class="parameter">on_click</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span></span>
|
||||||
(self, node)
|
function(self, node)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">on_click_disabled</span>
|
<li><span class="parameter">on_click_disabled</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span></span>
|
||||||
(self, node)
|
function(self, node)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">on_hover</span>
|
<li><span class="parameter">on_hover</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span></span>
|
||||||
(self, node, hover_state)
|
function(self, node, hover_state)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">on_mouse_hover</span>
|
<li><span class="parameter">on_mouse_hover</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span></span>
|
||||||
(self, node, hover_state)
|
function(self, node, hover_state)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">on_set_enabled</span>
|
<li><span class="parameter">on_set_enabled</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span></span>
|
||||||
(self, node, enabled_state)
|
function(self, node, enabled_state)
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -632,7 +627,7 @@ button:set_enabled(<span class="keyword">true</span>)</pre>
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<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="../modules/Button.html#node">node</a></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, node, callback[, click_node=node[, initial_state=false]])</a></td>
|
<td class="name" nowrap><a href="#init">init(self, node, callback[, click_node=node[, initial_state=false]])</a></td>
|
||||||
<td class="summary">Component init function</td>
|
<td class="summary">The <a href="../modules/Checkbox.html#">Checkbox</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#set_state">set_state(self, state, is_silent, is_instant)</a></td>
|
<td class="name" nowrap><a href="#set_state">set_state(self, state, is_silent, is_instant)</a></td>
|
||||||
@ -148,7 +148,7 @@
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
Checkbox state
|
Checkbox state
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -161,7 +161,7 @@
|
|||||||
<strong>init(self, node, callback[, click_node=node[, initial_state=false]])</strong>
|
<strong>init(self, node, callback[, click_node=node[, initial_state=false]])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Component init function
|
The <a href="../modules/Checkbox.html#">Checkbox</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -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">bool</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">bool</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">bool</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>
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, nodes, callback[, click_nodes=node])</a></td>
|
<td class="name" nowrap><a href="#init">init(self, nodes, callback[, click_nodes=node])</a></td>
|
||||||
<td class="summary">Component init function</td>
|
<td class="summary">The <a href="../modules/CheckboxGroup.html#">CheckboxGroup</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#set_state">set_state(self, indexes, is_instant)</a></td>
|
<td class="name" nowrap><a href="#set_state">set_state(self, indexes, is_instant)</a></td>
|
||||||
@ -132,7 +132,7 @@
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">bool[]</span></span>
|
<span class="types"><span class="type">boolean[]</span></span>
|
||||||
Array if checkboxes state
|
Array if checkboxes state
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -145,7 +145,7 @@
|
|||||||
<strong>init(self, nodes, callback[, click_nodes=node])</strong>
|
<strong>init(self, nodes, callback[, click_nodes=node])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Component init function
|
The <a href="../modules/CheckboxGroup.html#">CheckboxGroup</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -189,11 +189,11 @@
|
|||||||
<a href="../modules/CheckboxGroup.html#">CheckboxGroup</a>
|
<a href="../modules/CheckboxGroup.html#">CheckboxGroup</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">indexes</span>
|
<li><span class="parameter">indexes</span>
|
||||||
<span class="types"><span class="type">bool[]</span></span>
|
<span class="types"><span class="type">boolean[]</span></span>
|
||||||
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>
|
||||||
|
@ -117,7 +117,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, scroll, grid, create_function)</a></td>
|
<td class="name" nowrap><a href="#init">init(self, scroll, grid, create_function)</a></td>
|
||||||
<td class="summary">Data list constructor</td>
|
<td class="summary">The <a href="../modules/DataList.html#">DataList</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#on_remove">on_remove(self)</a></td>
|
<td class="name" nowrap><a href="#on_remove">on_remove(self)</a></td>
|
||||||
@ -242,7 +242,7 @@
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">Node[]</span></span>
|
<span class="types"><span class="type">node[]</span></span>
|
||||||
List of created nodes
|
List of created nodes
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -370,7 +370,7 @@
|
|||||||
<strong>init(self, scroll, grid, create_function)</strong>
|
<strong>init(self, scroll, grid, create_function)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Data list constructor
|
The <a href="../modules/DataList.html#">DataList</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, node, on_drag_callback)</a></td>
|
<td class="name" nowrap><a href="#init">init(self, node, on_drag_callback)</a></td>
|
||||||
<td class="summary">Drag component constructor</td>
|
<td class="summary">The <a href="../modules/Drag.html#">Drag</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td>
|
<td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td>
|
||||||
@ -174,7 +174,7 @@
|
|||||||
<strong>init(self, node, on_drag_callback)</strong>
|
<strong>init(self, node, on_drag_callback)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Drag component constructor
|
The <a href="../modules/Drag.html#">Drag</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -217,7 +217,7 @@
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
|
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -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">bool</span></span>
|
<span class="types"><span class="type">boolean</span> or <span class="type">nil</span></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -323,7 +323,7 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">can_x</span>
|
<li><span class="parameter">can_x</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -343,7 +343,7 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">can_y</span>
|
<li><span class="parameter">can_y</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -363,7 +363,7 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">is_drag</span>
|
<li><span class="parameter">is_drag</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -383,7 +383,7 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">is_touch</span>
|
<li><span class="parameter">is_touch</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</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>
|
||||||
|
|
||||||
@ -191,7 +190,7 @@
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
True if event have handlers
|
True if event have handlers
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -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>
|
||||||
|
|
||||||
@ -257,7 +255,7 @@ button.on_long_click:subscribe(on_long_callback, self)</pre>
|
|||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">...</span>
|
<li><span class="parameter">...</span>
|
||||||
<span class="types"><span class="type">Any</span></span>
|
<span class="types"><span class="type">any</span></span>
|
||||||
All event params
|
All event params
|
||||||
</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,11 +154,11 @@ 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>
|
||||||
<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>
|
||||||
@ -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[, params])</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>
|
||||||
@ -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>
|
||||||
@ -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, 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>
|
||||||
@ -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, 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>
|
||||||
@ -302,15 +302,21 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">component</span>
|
<li><span class="parameter">component</span>
|
||||||
<span class="types"><span class="type">Component</span></span>
|
<span class="types"><span class="type">BaseComponent</span></span>
|
||||||
Component module
|
Component module
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">...</span>
|
<li><span class="parameter">...</span>
|
||||||
<span class="types"><span class="type">args</span></span>
|
<span class="types"><span class="type">any</span></span>
|
||||||
Other component params to pass it to component:init function
|
Other component params to pass it to component:init function
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">BaseComponent</span></span>
|
||||||
|
Component instance
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -318,7 +324,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
|
||||||
@ -331,13 +337,12 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">callback</span>
|
<li><span class="parameter">callback</span>
|
||||||
<span class="types"><span class="type">callback</span></span>
|
<span class="types"><span class="type">function</span> or <span class="type">nil</span></span>
|
||||||
On back button
|
@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 +372,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 +390,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 +403,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> 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>
|
||||||
<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>
|
||||||
|
|
||||||
@ -430,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
|
||||||
@ -443,22 +446,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> 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>
|
||||||
|
|
||||||
@ -532,8 +533,8 @@ end
|
|||||||
The Scroll instance for Data List component
|
The Scroll instance for Data List component
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">druid_grid</span>
|
<li><span class="parameter">druid_grid</span>
|
||||||
<span class="types"><span class="type">Grid</span></span>
|
<span class="types"><span class="type">StaticGrid</span> or <span class="type">DynamicGrid</span></span>
|
||||||
The Grid instance for Data List component
|
The <a href="../modules/StaticGrid.html#">StaticGrid</a> or <a href="../modules/DynamicGrid.html#">DynamicGrid</a> instance for Data List component
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">create_function</span>
|
<li><span class="parameter">create_function</span>
|
||||||
<span class="types"><span class="type">function</span></span>
|
<span class="types"><span class="type">function</span></span>
|
||||||
@ -567,11 +568,11 @@ 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> 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>
|
||||||
@ -589,7 +590,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 +602,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 +621,7 @@ end
|
|||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_hotkey"></a>
|
<a name = "new_hotkey"></a>
|
||||||
<strong>new_hotkey(self, keys_array, callback[, params])</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
|
||||||
@ -638,12 +639,11 @@ 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></span>
|
||||||
Button callback
|
The callback function
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">params</span>
|
<li><span class="parameter">callback_argument</span>
|
||||||
<span class="types"><span class="type">value</span></span>
|
<span class="types"><span class="type">any</span> or <span class="type">nil</span></span>
|
||||||
Button callback params
|
The argument to pass into the callback function
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -673,11 +673,11 @@ 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> or <span class="type">nil</span></span>
|
||||||
Hover callback
|
Hover callback
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -695,7 +695,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 +708,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 +734,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 +747,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">bool</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 +787,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>
|
||||||
@ -809,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
|
||||||
@ -830,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>
|
||||||
|
|
||||||
@ -889,7 +887,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 +901,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 +936,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 +958,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 +970,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 +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, 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
|
||||||
@ -1014,18 +1009,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">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">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>
|
||||||
|
|
||||||
@ -1055,11 +1049,11 @@ 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> 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>
|
||||||
@ -1077,7 +1071,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 +1084,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">bool</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 +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
|
||||||
@ -1131,7 +1123,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>
|
||||||
@ -1139,14 +1131,12 @@ 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></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>
|
||||||
|
|
||||||
@ -1189,7 +1179,7 @@ end
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
The boolean value is input was consumed
|
The boolean value is input was consumed
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -1247,7 +1237,7 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">component</span>
|
<li><span class="parameter">component</span>
|
||||||
<span class="types"><span class="type">Component</span></span>
|
<span class="types"><span class="type">BaseComponent</span></span>
|
||||||
Component instance
|
Component instance
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -1274,7 +1264,7 @@ end
|
|||||||
<a href="../modules/DruidInstance.html#">DruidInstance</a>
|
<a href="../modules/DruidInstance.html#">DruidInstance</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">blacklist_components</span>
|
<li><span class="parameter">blacklist_components</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">Component</span></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">BaseComponent</span></span>
|
||||||
The array of component to blacklist
|
The array of component to blacklist
|
||||||
(<em>default</em> nil)
|
(<em>default</em> nil)
|
||||||
</li>
|
</li>
|
||||||
@ -1308,7 +1298,7 @@ end
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">whitelist_components</span>
|
<li><span class="parameter">whitelist_components</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">Component</span></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">BaseComponent</span></span>
|
||||||
The array of component to whitelist
|
The array of component to whitelist
|
||||||
(<em>default</em> nil)
|
(<em>default</em> nil)
|
||||||
</li>
|
</li>
|
||||||
|
@ -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, is_instant)</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>
|
||||||
@ -119,10 +119,10 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, parent)</a></td>
|
<td class="name" nowrap><a href="#init">init(self, parent)</a></td>
|
||||||
<td class="summary">Component init function</td>
|
<td class="summary">The <a href="../modules/DynamicGrid.html#">DynamicGrid</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>
|
||||||
@ -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, is_instant)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Add new node to the grid
|
Add new node to the grid
|
||||||
@ -230,19 +230,16 @@
|
|||||||
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> 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>
|
||||||
|
|
||||||
@ -393,7 +390,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 +411,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>
|
||||||
|
|
||||||
@ -467,7 +463,7 @@
|
|||||||
<strong>init(self, parent)</strong>
|
<strong>init(self, parent)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Component init function
|
The <a href="../modules/DynamicGrid.html#">DynamicGrid</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -489,7 +485,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
|
||||||
@ -506,14 +502,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>
|
||||||
|
|
||||||
|
@ -87,11 +87,11 @@ 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>
|
||||||
<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>
|
||||||
@ -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, item[, 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,11 +159,11 @@ 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>
|
||||||
<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>
|
||||||
@ -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
|
||||||
@ -198,20 +198,19 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">target</span>
|
<li><span class="parameter">target</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"><span class="type">any[]</span></span>
|
||||||
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"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></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>
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">array</span></span>
|
<span class="types"><span class="type">any[]</span></span>
|
||||||
The target array
|
The target array
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -221,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.
|
||||||
@ -232,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
|
||||||
@ -379,7 +377,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 +390,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>
|
||||||
|
|
||||||
@ -471,8 +468,8 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">pivot</span>
|
<li><span class="parameter">pivot</span>
|
||||||
<span class="types"><span class="type">gui.pivot</span></span>
|
<span class="types"><span class="type">number</span></span>
|
||||||
The node pivot
|
The gui.PIVOT_* constant
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -529,7 +526,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">bool</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>
|
||||||
@ -579,7 +576,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<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"><span class="type">node</span></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -606,7 +603,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, item[, 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
|
||||||
@ -618,25 +615,23 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<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></span>
|
||||||
Array
|
Array
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">item</span>
|
<li><span class="parameter">any</span>
|
||||||
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">const.SHIFT</span></span>
|
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
||||||
Shift policy
|
The druid_const.SHIFT.* constant
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">item</span></span>
|
<span class="types"><span class="type">any</span></span>
|
||||||
Inserted item
|
Inserted item
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -656,7 +651,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
Is mobile
|
Is mobile
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -676,7 +671,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
Is web
|
Is web
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -721,7 +716,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,21 +729,19 @@ 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">const.SHIFT</span></span>
|
<span class="types"><span class="type">number</span> or <span class="type">nil</span></span>
|
||||||
Shift policy
|
The druid_const.SHIFT.* constant
|
||||||
(<em>optional</em>)
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">item</span></span>
|
<span class="types"><span class="type">any</span></span>
|
||||||
Removed item
|
Removed item
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -758,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
|
||||||
@ -771,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>
|
||||||
|
|
||||||
|
@ -83,12 +83,12 @@
|
|||||||
<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">Component init function</td>
|
<td class="summary">The <a href="../modules/Hotkey.html#">Hotkey</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<h2><a href="#Tables">Tables</a></h2>
|
<h2><a href="#Tables">Tables</a></h2>
|
||||||
@ -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,12 +144,17 @@
|
|||||||
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">value</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>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">Hotkey</span></span>
|
||||||
|
Current instance
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -157,10 +162,10 @@
|
|||||||
</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>
|
||||||
Component init function
|
The <a href="../modules/Hotkey.html#">Hotkey</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -178,9 +183,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">value</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>
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, node, on_hover_callback)</a></td>
|
<td class="name" nowrap><a href="#init">init(self, node, on_hover_callback)</a></td>
|
||||||
<td class="summary">Component init function</td>
|
<td class="summary">The <a href="../modules/Hover.html#">Hover</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td>
|
<td class="name" nowrap><a href="#is_enabled">is_enabled(self)</a></td>
|
||||||
@ -138,7 +138,7 @@
|
|||||||
<strong>init(self, node, on_hover_callback)</strong>
|
<strong>init(self, node, on_hover_callback)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Component init function
|
The <a href="../modules/Hover.html#">Hover</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -181,7 +181,7 @@
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
The hover enabled state
|
The hover enabled state
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -208,7 +208,7 @@
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
The current hovered state
|
The current hovered state
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -235,7 +235,7 @@
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
The current hovered state
|
The current hovered state
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -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">bool</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">bool</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">bool</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,8 +93,8 @@
|
|||||||
<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">Component init function</td>
|
<td class="summary">The <a href="../modules/Input.html#">Input</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#reset_changes">reset_changes(self)</a></td>
|
<td class="name" nowrap><a href="#reset_changes">reset_changes(self)</a></td>
|
||||||
@ -220,10 +220,10 @@
|
|||||||
</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>
|
||||||
Component init function
|
The <a href="../modules/Input.html#">Input</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -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>
|
||||||
|
|
||||||
@ -422,7 +421,7 @@
|
|||||||
<h3>Fields:</h3>
|
<h3>Fields:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">IS_LONGTAP_ERASE</span>
|
<li><span class="parameter">IS_LONGTAP_ERASE</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
Is long tap will erase current input data
|
Is long tap will erase current input data
|
||||||
(<em>default</em> false)
|
(<em>default</em> false)
|
||||||
</li>
|
</li>
|
||||||
@ -432,12 +431,12 @@
|
|||||||
(<em>default</em> *)
|
(<em>default</em> *)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">IS_UNSELECT_ON_RESELECT</span>
|
<li><span class="parameter">IS_UNSELECT_ON_RESELECT</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
If true, call unselect on select selected input
|
If true, call unselect on select selected input
|
||||||
(<em>default</em> false)
|
(<em>default</em> false)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">NO_CONSUME_INPUT_WHILE_SELECTED</span>
|
<li><span class="parameter">NO_CONSUME_INPUT_WHILE_SELECTED</span>
|
||||||
<span class="types"><span class="type">bool</span></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)
|
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)
|
||||||
(<em>default</em> false)
|
(<em>default</em> false)
|
||||||
</li>
|
</li>
|
||||||
@ -519,7 +518,7 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">is_empty</span>
|
<li><span class="parameter">is_empty</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -539,7 +538,7 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">is_selected</span>
|
<li><span class="parameter">is_selected</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
|
|
||||||
</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,12 +101,16 @@
|
|||||||
<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>
|
||||||
<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>
|
||||||
@ -126,7 +130,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 +143,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 +185,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
|
||||||
@ -201,12 +198,13 @@
|
|||||||
<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>
|
||||||
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 +251,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 +268,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>
|
||||||
|
|
||||||
@ -321,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>
|
||||||
|
@ -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,8 +94,8 @@
|
|||||||
<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">Component init function</td>
|
<td class="summary">The <a href="../modules/Layout.html#">Layout</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#set_max_gui_upscale">set_max_gui_upscale(self, max_gui_upscale)</a></td>
|
<td class="name" nowrap><a href="#set_max_gui_upscale">set_max_gui_upscale(self, max_gui_upscale)</a></td>
|
||||||
@ -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"><span class="type">Node</span></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,10 +232,10 @@
|
|||||||
</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>
|
||||||
Component init function
|
The <a href="../modules/Layout.html#">Layout</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -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>
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, callback, template, nodes)</a></td>
|
<td class="name" nowrap><a href="#init">init(self, callback, template, nodes)</a></td>
|
||||||
<td class="summary">Component init function</td>
|
<td class="summary">The <a href="../modules/PinKnob.html#">PinKnob</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#set_angle">set_angle(self, cur_value, min, max)</a></td>
|
<td class="name" nowrap><a href="#set_angle">set_angle(self, cur_value, min, max)</a></td>
|
||||||
@ -123,7 +123,7 @@
|
|||||||
<strong>init(self, callback, template, nodes)</strong>
|
<strong>init(self, callback, template, nodes)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Component init function
|
The <a href="../modules/PinKnob.html#">PinKnob</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -256,7 +256,7 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">is_drag</span>
|
<li><span class="parameter">is_drag</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -104,7 +104,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, node, key[, init_value=1])</a></td>
|
<td class="name" nowrap><a href="#init">init(self, node, key[, init_value=1])</a></td>
|
||||||
<td class="summary"><a href="../modules/Progress.html#">Progress</a> constructor</td>
|
<td class="summary">The <a href="../modules/Progress.html#">Progress</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#set_max_size">set_max_size(self, max_size)</a></td>
|
<td class="name" nowrap><a href="#set_max_size">set_max_size(self, max_size)</a></td>
|
||||||
@ -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>
|
||||||
@ -237,7 +237,7 @@
|
|||||||
<strong>init(self, node, key[, init_value=1])</strong>
|
<strong>init(self, node, key[, init_value=1])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="../modules/Progress.html#">Progress</a> constructor
|
The <a href="../modules/Progress.html#">Progress</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -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>
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, nodes, callback[, click_nodes=node])</a></td>
|
<td class="name" nowrap><a href="#init">init(self, nodes, callback[, click_nodes=node])</a></td>
|
||||||
<td class="summary">Component init function</td>
|
<td class="summary">The <a href="../modules/RadioGroup.html#">RadioGroup</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#set_state">set_state(self, index, is_instant)</a></td>
|
<td class="name" nowrap><a href="#set_state">set_state(self, index, is_instant)</a></td>
|
||||||
@ -145,7 +145,7 @@
|
|||||||
<strong>init(self, nodes, callback[, click_nodes=node])</strong>
|
<strong>init(self, nodes, callback[, click_nodes=node])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Component init function
|
The <a href="../modules/RadioGroup.html#">RadioGroup</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -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>
|
||||||
|
@ -82,9 +82,17 @@
|
|||||||
|
|
||||||
<h2><a href="#Functions">Functions</a></h2>
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#get_text">get_text(self)</a></td>
|
||||||
|
<td class="summary">GSet input field text</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, template, nodes)</a></td>
|
<td class="name" nowrap><a href="#init">init(self, template, nodes)</a></td>
|
||||||
<td class="summary">Component init function</td>
|
<td class="summary">The <a href="../modules/RichInput.html#">RichInput</a> constructor</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>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#set_placeholder">set_placeholder(self, placeholder_text)</a></td>
|
<td class="name" nowrap><a href="#set_placeholder">set_placeholder(self, placeholder_text)</a></td>
|
||||||
@ -109,6 +117,10 @@
|
|||||||
<td class="name" nowrap><a href="#placeholder">placeholder</a></td>
|
<td class="name" nowrap><a href="#placeholder">placeholder</a></td>
|
||||||
<td class="summary">On input field text change to max length string callback(self, input_text)</td>
|
<td class="summary">On input field text change to max length string callback(self, input_text)</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#root">root</a></td>
|
||||||
|
<td class="summary">Root node</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
@ -118,12 +130,39 @@
|
|||||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||||
|
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "get_text"></a>
|
||||||
|
<strong>get_text(self)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
GSet input field text
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
<span class="types"><span class="type">RichInput</span></span>
|
||||||
|
<a href="../modules/RichInput.html#">RichInput</a>
|
||||||
|
</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>
|
||||||
|
Current input text
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "init"></a>
|
<a name = "init"></a>
|
||||||
<strong>init(self, template, nodes)</strong>
|
<strong>init(self, template, nodes)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Component init function
|
The <a href="../modules/RichInput.html#">RichInput</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -146,6 +185,39 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "set_allowed_characters"></a>
|
||||||
|
<strong>set_allowed_characters(self, characters)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set allowed charaters for input field.
|
||||||
|
See: https://defold.com/ref/stable/string/
|
||||||
|
ex: [%a%d] for alpha and numeric
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
<span class="types"><span class="type">RichInput</span></span>
|
||||||
|
<a href="../modules/RichInput.html#">RichInput</a>
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">characters</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||||
|
Regulax exp. for validate user input
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">RichInput</span></span>
|
||||||
|
Current instance
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "set_placeholder"></a>
|
<a name = "set_placeholder"></a>
|
||||||
@ -162,11 +234,17 @@
|
|||||||
<a href="../modules/RichInput.html#">RichInput</a>
|
<a href="../modules/RichInput.html#">RichInput</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">placeholder_text</span>
|
<li><span class="parameter">placeholder_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>
|
||||||
The placeholder text
|
The placeholder text
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">RichInput</span></span>
|
||||||
|
Current instance
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -255,6 +333,26 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "root"></a>
|
||||||
|
<strong>root</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Root node
|
||||||
|
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">root</span>
|
||||||
|
<span class="types"><span class="type">node</span></span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="#Functions">Functions</a></li>
|
<li><a href="#Functions">Functions</a></li>
|
||||||
<li><a href="#Tables">Tables</a></li>
|
<li><a href="#Tables">Tables</a></li>
|
||||||
|
<li><a href="#Fields">Fields</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
@ -163,7 +164,7 @@ type druid.rich_text.metrics = {
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, template, nodes)</a></td>
|
<td class="name" nowrap><a href="#init">init(self, template, nodes)</a></td>
|
||||||
<td class="summary">Rich Text component constructor</td>
|
<td class="summary">The <a href="../modules/RichText.html#">RichText</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#set_text">set_text(self, text)</a></td>
|
<td class="name" nowrap><a href="#set_text">set_text(self, text)</a></td>
|
||||||
@ -181,6 +182,13 @@ type druid.rich_text.metrics = {
|
|||||||
<td class="summary">Component style params.</td>
|
<td class="summary">Component style params.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<h2><a href="#Fields">Fields</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#druid">druid</a></td>
|
||||||
|
<td class="summary">The component druid instance</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
@ -248,7 +256,7 @@ type druid.rich_text.metrics = {
|
|||||||
<strong>init(self, template, nodes)</strong>
|
<strong>init(self, template, nodes)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Rich Text component constructor
|
The <a href="../modules/RichText.html#">RichText</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -415,6 +423,30 @@ Words <nobr>inside tag</nobr> won't <span class="keyword">break</spa
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "druid"></a>
|
||||||
|
<strong>druid</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
The component druid instance
|
||||||
|
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">druid</span>
|
||||||
|
<span class="types"><span class="type">DruidInstance</span></span>
|
||||||
|
<a href="../modules/DruidInstance.html#">DruidInstance</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, view_node, content_node)</a></td>
|
<td class="name" nowrap><a href="#init">init(self, view_node, content_node)</a></td>
|
||||||
<td class="summary"><a href="../modules/Scroll.html#">Scroll</a> constructor</td>
|
<td class="summary">The <a href="../modules/Scroll.html#">Scroll</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#is_inert">is_inert(self)</a></td>
|
<td class="name" nowrap><a href="#is_inert">is_inert(self)</a></td>
|
||||||
@ -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>
|
||||||
@ -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>
|
||||||
@ -202,10 +202,6 @@
|
|||||||
<td class="summary">Flag, if scroll now animating by gui.animate</td>
|
<td class="summary">Flag, if scroll now animating by gui.animate</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#is_inert">is_inert</a></td>
|
|
||||||
<td class="summary">Flag, if scroll now moving by inertion</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#on_point_scroll">on_point_scroll</a></td>
|
<td class="name" nowrap><a href="#on_point_scroll">on_point_scroll</a></td>
|
||||||
<td class="summary">On scroll_to_index function callback(self, index, point)</td>
|
<td class="summary">On scroll_to_index function callback(self, index, point)</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -334,7 +330,7 @@
|
|||||||
<strong>init(self, view_node, content_node)</strong>
|
<strong>init(self, view_node, content_node)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="../modules/Scroll.html#">Scroll</a> constructor
|
The <a href="../modules/Scroll.html#">Scroll</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -377,8 +373,8 @@
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
If scroll have inertion
|
@If scroll have inertion
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
@ -419,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.
|
||||||
@ -436,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">bool</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>
|
||||||
|
|
||||||
@ -454,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.
|
||||||
@ -471,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">bool</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>
|
||||||
|
|
||||||
@ -484,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
|
||||||
@ -501,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">bool</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>
|
||||||
|
|
||||||
@ -544,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.
|
||||||
@ -558,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>
|
||||||
|
|
||||||
@ -590,7 +582,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">bool</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>
|
||||||
@ -623,7 +615,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">bool</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>
|
||||||
@ -722,7 +714,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">bool</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>
|
||||||
@ -795,22 +787,22 @@
|
|||||||
(<em>default</em> 0)
|
(<em>default</em> 0)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">SMALL_CONTENT_SCROLL</span>
|
<li><span class="parameter">SMALL_CONTENT_SCROLL</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
If true, content node with size less than view node size can be scrolled
|
If true, content node with size less than view node size can be scrolled
|
||||||
(<em>default</em> false)
|
(<em>default</em> false)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">WHEEL_SCROLL_SPEED</span>
|
<li><span class="parameter">WHEEL_SCROLL_SPEED</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
The scroll speed via mouse wheel scroll or touchpad. Set to 0 to disable wheel scrolling
|
The scroll speed via mouse wheel scroll or touchpad. Set to 0 to disable wheel scrolling
|
||||||
(<em>default</em> 0)
|
(<em>default</em> 0)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">WHEEL_SCROLL_INVERTED</span>
|
<li><span class="parameter">WHEEL_SCROLL_INVERTED</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
If true, invert direction for touchpad and mouse wheel scroll
|
If true, invert direction for touchpad and mouse wheel scroll
|
||||||
(<em>default</em> false)
|
(<em>default</em> false)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">WHEEL_SCROLL_BY_INERTION</span>
|
<li><span class="parameter">WHEEL_SCROLL_BY_INERTION</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
If true, wheel will add inertion to scroll. Direct set position otherwise.
|
If true, wheel will add inertion to scroll. Direct set position otherwise.
|
||||||
(<em>default</em> false)
|
(<em>default</em> false)
|
||||||
</li>
|
</li>
|
||||||
@ -935,27 +927,7 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">is_animate</span>
|
<li><span class="parameter">is_animate</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "is_inert"></a>
|
|
||||||
<strong>is_inert</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Flag, if scroll now moving by inertion
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">is_inert</span>
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
|
||||||
|
|
||||||
</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">Component init function</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,10 +147,10 @@
|
|||||||
<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>
|
||||||
Component init function
|
The <a href="../modules/Slider.html#">Slider</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -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">bool</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>
|
||||||
|
|
||||||
@ -227,7 +225,7 @@
|
|||||||
<a href="../modules/Slider.html#">Slider</a>
|
<a href="../modules/Slider.html#">Slider</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">input_node</span>
|
<li><span class="parameter">input_node</span>
|
||||||
<span class="types"><span class="type">Node</span></span>
|
<span class="types"><a class="type" href="../modules/Slider.html#node">node</a></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -333,7 +331,7 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">is_drag</span>
|
<li><span class="parameter">is_drag</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
|
|
||||||
</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,22 +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></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> 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>
|
||||||
|
|
||||||
@ -463,7 +460,7 @@
|
|||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">vector3</span></span>
|
<span class="types"><span class="type">vector3</span></span>
|
||||||
Node position
|
@Node position
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
@ -512,7 +509,7 @@
|
|||||||
<a href="../modules/StaticGrid.html#">StaticGrid</a>
|
<a href="../modules/StaticGrid.html#">StaticGrid</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">parent</span>
|
<li><span class="parameter">parent</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>
|
||||||
The GUI Node container, where grid's items will be placed
|
The GUI Node container, where grid's items will be placed
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">element</span>
|
<li><span class="parameter">element</span>
|
||||||
@ -533,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
|
||||||
@ -550,21 +547,19 @@
|
|||||||
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>
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">Node</span></span>
|
<span class="types"><span class="type">node</span></span>
|
||||||
The deleted gui node from grid
|
The deleted gui node from grid
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -677,12 +672,12 @@
|
|||||||
<h3>Fields:</h3>
|
<h3>Fields:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">IS_DYNAMIC_NODE_POSES</span>
|
<li><span class="parameter">IS_DYNAMIC_NODE_POSES</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
If true, always center grid content as grid pivot sets
|
If true, always center grid content as grid pivot sets
|
||||||
(<em>default</em> false)
|
(<em>default</em> false)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">IS_ALIGN_LAST_ROW</span>
|
<li><span class="parameter">IS_ALIGN_LAST_ROW</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
If true, always align last row of the grid as grid pivot sets
|
If true, always align last row of the grid as grid pivot sets
|
||||||
(<em>default</em> false)
|
(<em>default</em> false)
|
||||||
</li>
|
</li>
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, node, on_swipe_callback)</a></td>
|
<td class="name" nowrap><a href="#init">init(self, node, on_swipe_callback)</a></td>
|
||||||
<td class="summary">Component init function</td>
|
<td class="summary">The <a href="../modules/Swipe.html#">Swipe</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(self, zone)</a></td>
|
<td class="name" nowrap><a href="#set_click_zone">set_click_zone(self, zone)</a></td>
|
||||||
@ -129,7 +129,7 @@
|
|||||||
<strong>init(self, node, on_swipe_callback)</strong>
|
<strong>init(self, node, on_swipe_callback)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Component init function
|
The <a href="../modules/Swipe.html#">Swipe</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -206,7 +206,7 @@
|
|||||||
(<em>default</em> 50)
|
(<em>default</em> 50)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">SWIPE_TRIGGER_ON_MOVE</span>
|
<li><span class="parameter">SWIPE_TRIGGER_ON_MOVE</span>
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
If true, trigger on swipe moving, not only release action
|
If true, trigger on swipe moving, not only release action
|
||||||
(<em>default</em> false)
|
(<em>default</em> false)
|
||||||
</li>
|
</li>
|
||||||
@ -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,12 +105,12 @@
|
|||||||
<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"><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>
|
||||||
<td class="name" nowrap><a href="#is_multiline">is_multiline(self)</a></td>
|
<td class="name" nowrap><a href="#is_multiline">is_multiline(self)</a></td>
|
||||||
@ -137,7 +137,11 @@
|
|||||||
<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_size">set_size(self, size)</a></td>
|
||||||
|
<td class="summary">Set text area size</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<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>
|
||||||
@ -163,6 +167,10 @@
|
|||||||
<td class="summary">Current text color</td>
|
<td class="summary">Current text color</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#last_value">last_value</a></td>
|
||||||
|
<td class="summary">The last text value</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="name" nowrap><a href="#node">node</a></td>
|
<td class="name" nowrap><a href="#node">node</a></td>
|
||||||
<td class="summary">Text node</td>
|
<td class="summary">Text node</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -242,7 +250,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 +263,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,10 +284,10 @@
|
|||||||
</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>
|
||||||
<a href="../modules/Text.html#">Text</a> constructor
|
The <a href="../modules/Text.html#">Text</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -294,9 +301,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>
|
||||||
@ -329,7 +335,7 @@
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
<span class="types"><span class="type">boolean</span></span>
|
||||||
Is text node with line break
|
Is text node with line break
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -445,8 +451,8 @@
|
|||||||
<a href="../modules/Text.html#">Text</a>
|
<a href="../modules/Text.html#">Text</a>
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">pivot</span>
|
<li><span class="parameter">pivot</span>
|
||||||
<span class="types"><span class="type">gui.pivot</span></span>
|
<span class="types"><span class="type">number</span></span>
|
||||||
Gui pivot constant
|
The gui.PIVOT_* constant
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -491,10 +497,41 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "set_size"></a>
|
||||||
|
<strong>set_size(self, size)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set text area size
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
<span class="types"><span class="type">Text</span></span>
|
||||||
|
<a href="../modules/Text.html#">Text</a>
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">size</span>
|
||||||
|
<span class="types"><span class="type">vector3</span></span>
|
||||||
|
The new text area size
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">Text</span></span>
|
||||||
|
Current text instance
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</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 +544,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>
|
||||||
|
|
||||||
@ -636,6 +671,26 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "last_value"></a>
|
||||||
|
<strong>last_value</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
The last text value
|
||||||
|
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">last_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>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "node"></a>
|
<a name = "node"></a>
|
||||||
|
@ -84,8 +84,8 @@
|
|||||||
<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">Component init function</td>
|
<td class="summary">The <a href="../modules/Timer.html#">Timer</a> constructor</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#set_interval">set_interval(self, from, to)</a></td>
|
<td class="name" nowrap><a href="#set_interval">set_interval(self, from, to)</a></td>
|
||||||
@ -141,10 +141,10 @@
|
|||||||
<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>
|
||||||
Component init function
|
The <a href="../modules/Timer.html#">Timer</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -162,14 +162,12 @@
|
|||||||
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></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 +220,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">bool</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
@ -45,8 +45,8 @@ local BackHandler = component.create("back_handler")
|
|||||||
|
|
||||||
--- The @{BackHandler} constructor
|
--- The @{BackHandler} constructor
|
||||||
-- @tparam BackHandler self @{BackHandler}
|
-- @tparam BackHandler self @{BackHandler}
|
||||||
-- @tparam callback callback On back button
|
-- @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
|
||||||
|
@ -30,7 +30,7 @@ local component = require("druid.component")
|
|||||||
local Blocker = component.create("blocker")
|
local Blocker = component.create("blocker")
|
||||||
|
|
||||||
|
|
||||||
--- @{Blocker} constructor
|
--- The @{Blocker} constructor
|
||||||
-- @tparam Blocker self @{Blocker}
|
-- @tparam Blocker self @{Blocker}
|
||||||
-- @tparam node node Gui node
|
-- @tparam node node Gui node
|
||||||
function Blocker.init(self, node)
|
function Blocker.init(self, node)
|
||||||
@ -51,7 +51,7 @@ function Blocker.on_input(self, action_id, action)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
if not self:is_enabled(self.node) then
|
if not self:is_enabled() then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -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 bool 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
|
||||||
@ -79,7 +79,7 @@ end
|
|||||||
|
|
||||||
--- Return blocker enabled state
|
--- Return blocker enabled state
|
||||||
-- @tparam Blocker self @{Blocker}
|
-- @tparam Blocker self @{Blocker}
|
||||||
-- @treturn bool True, if blocker is enabled
|
-- @treturn boolean @True, if blocker is enabled
|
||||||
function Blocker.is_enabled(self)
|
function Blocker.is_enabled(self)
|
||||||
return self._is_enabled
|
return self._is_enabled
|
||||||
end
|
end
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
-- print("Also the button component is passed in callback params")
|
-- print("Also the button component is passed in callback params")
|
||||||
-- end
|
-- end
|
||||||
--
|
--
|
||||||
-- local custom_args = "Any variable to pass inside callback"
|
-- local custom_args = "any variable to pass inside callback"
|
||||||
-- local button = self.druid:new_button("button_name", on_button_click, custom_args)
|
-- local button = self.druid:new_button("button_name", on_button_click, custom_args)
|
||||||
--
|
--
|
||||||
-- @module Button
|
-- @module Button
|
||||||
@ -114,7 +114,7 @@
|
|||||||
-- @tfield DruidEvent on_pressed @{DruidEvent}
|
-- @tfield DruidEvent on_pressed @{DruidEvent}
|
||||||
|
|
||||||
--- Button trigger node
|
--- Button trigger node
|
||||||
-- @tfield Node node
|
-- @tfield node node
|
||||||
|
|
||||||
---The GUI node id from button node
|
---The GUI node id from button node
|
||||||
-- @tfield hash node_id
|
-- @tfield hash node_id
|
||||||
@ -257,15 +257,15 @@ end
|
|||||||
--- Component style params.
|
--- Component style params.
|
||||||
-- You can override this component styles params in Druid styles table
|
-- You can override this component styles params in Druid styles table
|
||||||
-- or create your own style
|
-- or create your own style
|
||||||
-- @table style
|
|
||||||
-- @tfield[opt=0.4] number LONGTAP_TIME Minimum time to trigger on_hold_callback
|
-- @tfield[opt=0.4] number LONGTAP_TIME Minimum time to trigger on_hold_callback
|
||||||
-- @tfield[opt=0.8] number AUTOHOLD_TRIGGER Maximum hold time to trigger button release while holding
|
-- @tfield[opt=0.8] number AUTOHOLD_TRIGGER Maximum hold time to trigger button release while holding
|
||||||
-- @tfield[opt=0.4] number DOUBLETAP_TIME Time between double taps
|
-- @tfield[opt=0.4] number DOUBLETAP_TIME Time between double taps
|
||||||
-- @tfield function on_click (self, node)
|
-- @tfield function on_click function(self, node)
|
||||||
-- @tfield function on_click_disabled (self, node)
|
-- @tfield function on_click_disabled function(self, node)
|
||||||
-- @tfield function on_hover (self, node, hover_state)
|
-- @tfield function on_hover function(self, node, hover_state)
|
||||||
-- @tfield function on_mouse_hover (self, node, hover_state)
|
-- @tfield function on_mouse_hover function(self, node, hover_state)
|
||||||
-- @tfield function on_set_enabled (self, node, enabled_state)
|
-- @tfield function on_set_enabled function(self, node, enabled_state)
|
||||||
|
-- @table style
|
||||||
function Button.on_style_change(self, style)
|
function Button.on_style_change(self, style)
|
||||||
self.style = {}
|
self.style = {}
|
||||||
self.style.LONGTAP_TIME = style.LONGTAP_TIME or 0.4
|
self.style.LONGTAP_TIME = style.LONGTAP_TIME or 0.4
|
||||||
@ -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 bool 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)
|
||||||
@ -465,7 +465,7 @@ end
|
|||||||
--
|
--
|
||||||
-- By default all Buttons is enabled on creating.
|
-- By default all Buttons is enabled on creating.
|
||||||
-- @tparam Button self @{Button}
|
-- @tparam Button self @{Button}
|
||||||
-- @treturn bool True, if button is enabled now, False overwise
|
-- @treturn boolean @True, if button is enabled now, False overwise
|
||||||
-- @usage
|
-- @usage
|
||||||
-- local is_enabled = button:is_enabled()
|
-- local is_enabled = button:is_enabled()
|
||||||
function Button.is_enabled(self)
|
function Button.is_enabled(self)
|
||||||
@ -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")
|
||||||
@ -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)
|
||||||
|
@ -26,16 +26,16 @@
|
|||||||
-- @tfield DruidEvent on_drag_end @{DruidEvent}
|
-- @tfield DruidEvent on_drag_end @{DruidEvent}
|
||||||
|
|
||||||
--- Is component now touching
|
--- Is component now touching
|
||||||
-- @tfield bool is_touch
|
-- @tfield boolean is_touch
|
||||||
|
|
||||||
--- Is component now dragging
|
--- Is component now dragging
|
||||||
-- @tfield bool is_drag
|
-- @tfield boolean is_drag
|
||||||
|
|
||||||
--- Is drag component process vertical dragging. Default - true
|
--- Is drag component process vertical dragging. Default - true
|
||||||
-- @tfield bool can_x
|
-- @tfield boolean can_x
|
||||||
|
|
||||||
--- Is drag component process horizontal. Default - true
|
--- Is drag component process horizontal. Default - true
|
||||||
-- @tfield bool can_y
|
-- @tfield boolean can_y
|
||||||
|
|
||||||
--- Current touch x position
|
--- Current touch x position
|
||||||
-- @tfield number x
|
-- @tfield number x
|
||||||
@ -170,7 +170,7 @@ function Drag.on_style_change(self, style)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Drag component constructor
|
--- The @{Drag} constructor
|
||||||
-- @tparam Drag self @{Drag}
|
-- @tparam Drag self @{Drag}
|
||||||
-- @tparam node node GUI node to detect dragging
|
-- @tparam node node GUI node to detect dragging
|
||||||
-- @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)
|
||||||
@ -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 bool 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
|
||||||
@ -321,7 +321,7 @@ end
|
|||||||
|
|
||||||
--- Check if Drag component is enabled
|
--- Check if Drag component is enabled
|
||||||
-- @tparam Drag self @{Drag}
|
-- @tparam Drag self @{Drag}
|
||||||
-- @treturn bool
|
-- @treturn boolean
|
||||||
function Drag.is_enabled(self)
|
function Drag.is_enabled(self)
|
||||||
return self._is_enabled
|
return self._is_enabled
|
||||||
end
|
end
|
||||||
|
@ -21,7 +21,7 @@ local component = require("druid.component")
|
|||||||
local Hover = component.create("hover")
|
local Hover = component.create("hover")
|
||||||
|
|
||||||
|
|
||||||
--- Component init function
|
--- The @{Hover} constructor
|
||||||
-- @tparam Hover self @{Hover}
|
-- @tparam Hover self @{Hover}
|
||||||
-- @tparam node node Gui node
|
-- @tparam node node Gui node
|
||||||
-- @tparam function on_hover_callback Hover callback
|
-- @tparam function on_hover_callback Hover callback
|
||||||
@ -89,7 +89,7 @@ end
|
|||||||
|
|
||||||
--- Set hover state
|
--- Set hover state
|
||||||
-- @tparam Hover self @{Hover}
|
-- @tparam Hover self @{Hover}
|
||||||
-- @tparam bool 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
|
||||||
@ -100,7 +100,7 @@ end
|
|||||||
|
|
||||||
--- Return current hover state. True if touch action was on the node at current time
|
--- Return current hover state. True if touch action was on the node at current time
|
||||||
-- @tparam Hover self @{Hover}
|
-- @tparam Hover self @{Hover}
|
||||||
-- @treturn bool The current hovered state
|
-- @treturn boolean The current hovered state
|
||||||
function Hover.is_hovered(self)
|
function Hover.is_hovered(self)
|
||||||
return self._is_hovered
|
return self._is_hovered
|
||||||
end
|
end
|
||||||
@ -108,7 +108,7 @@ end
|
|||||||
|
|
||||||
--- Set mouse hover state
|
--- Set mouse hover state
|
||||||
-- @tparam Hover self @{Hover}
|
-- @tparam Hover self @{Hover}
|
||||||
-- @tparam bool 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
|
||||||
@ -119,7 +119,7 @@ end
|
|||||||
|
|
||||||
--- Return current hover state. True if nil action_id (usually desktop mouse) was on the node at current time
|
--- Return current hover state. True if nil action_id (usually desktop mouse) was on the node at current time
|
||||||
-- @tparam Hover self @{Hover}
|
-- @tparam Hover self @{Hover}
|
||||||
-- @treturn bool The current hovered state
|
-- @treturn boolean The current hovered state
|
||||||
function Hover.is_mouse_hovered(self)
|
function Hover.is_mouse_hovered(self)
|
||||||
return self._is_mouse_hovered
|
return self._is_mouse_hovered
|
||||||
end
|
end
|
||||||
@ -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 bool 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
|
||||||
|
|
||||||
@ -155,7 +155,7 @@ end
|
|||||||
|
|
||||||
--- Return current hover enabled state
|
--- Return current hover enabled state
|
||||||
-- @tparam Hover self @{Hover}
|
-- @tparam Hover self @{Hover}
|
||||||
-- @treturn bool The hover enabled state
|
-- @treturn boolean The hover enabled state
|
||||||
function Hover.is_enabled(self)
|
function Hover.is_enabled(self)
|
||||||
return self._is_enabled
|
return self._is_enabled
|
||||||
end
|
end
|
||||||
|
@ -53,9 +53,6 @@
|
|||||||
--- Scroll content node
|
--- Scroll content node
|
||||||
-- @tfield node content_node
|
-- @tfield node content_node
|
||||||
|
|
||||||
--- Flag, if scroll now moving by inertion
|
|
||||||
-- @tfield bool is_inert
|
|
||||||
|
|
||||||
--- Current inert speed
|
--- Current inert speed
|
||||||
-- @tfield vector3 inertion
|
-- @tfield vector3 inertion
|
||||||
|
|
||||||
@ -78,7 +75,7 @@
|
|||||||
-- @tfield[opt] number selected
|
-- @tfield[opt] number selected
|
||||||
|
|
||||||
--- Flag, if scroll now animating by gui.animate
|
--- Flag, if scroll now animating by gui.animate
|
||||||
-- @tfield bool is_animate
|
-- @tfield boolean is_animate
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -131,10 +128,10 @@ end
|
|||||||
-- @tfield[opt=0.35] number BACK_SPEED Scroll back returning lerp speed
|
-- @tfield[opt=0.35] number BACK_SPEED Scroll back returning lerp speed
|
||||||
-- @tfield[opt=0.2] number ANIM_SPEED Scroll gui.animation speed for scroll_to function
|
-- @tfield[opt=0.2] number ANIM_SPEED Scroll gui.animation speed for scroll_to function
|
||||||
-- @tfield[opt=0] number EXTRA_STRETCH_SIZE extra size in pixels outside of scroll (stretch effect)
|
-- @tfield[opt=0] number EXTRA_STRETCH_SIZE extra size in pixels outside of scroll (stretch effect)
|
||||||
-- @tfield[opt=false] bool SMALL_CONTENT_SCROLL If true, content node with size less than view node size can be scrolled
|
-- @tfield[opt=false] boolean SMALL_CONTENT_SCROLL If true, content node with size less than view node size can be scrolled
|
||||||
-- @tfield[opt=0] bool WHEEL_SCROLL_SPEED The scroll speed via mouse wheel scroll or touchpad. Set to 0 to disable wheel scrolling
|
-- @tfield[opt=0] boolean WHEEL_SCROLL_SPEED The scroll speed via mouse wheel scroll or touchpad. Set to 0 to disable wheel scrolling
|
||||||
-- @tfield[opt=false] bool WHEEL_SCROLL_INVERTED If true, invert direction for touchpad and mouse wheel scroll
|
-- @tfield[opt=false] boolean WHEEL_SCROLL_INVERTED If true, invert direction for touchpad and mouse wheel scroll
|
||||||
-- @tfield[opt=false] bool WHEEL_SCROLL_BY_INERTION If true, wheel will add inertion to scroll. Direct set position otherwise.
|
-- @tfield[opt=false] boolean WHEEL_SCROLL_BY_INERTION If true, wheel will add inertion to scroll. Direct set position otherwise.
|
||||||
function Scroll.on_style_change(self, style)
|
function Scroll.on_style_change(self, style)
|
||||||
self.style = {}
|
self.style = {}
|
||||||
self.style.EXTRA_STRETCH_SIZE = style.EXTRA_STRETCH_SIZE or 0
|
self.style.EXTRA_STRETCH_SIZE = style.EXTRA_STRETCH_SIZE or 0
|
||||||
@ -158,7 +155,7 @@ function Scroll.on_style_change(self, style)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- @{Scroll} constructor
|
--- The @{Scroll} constructor
|
||||||
-- @tparam Scroll self @{Scroll}
|
-- @tparam Scroll self @{Scroll}
|
||||||
-- @tparam string|node view_node GUI view scroll node
|
-- @tparam string|node view_node GUI view scroll node
|
||||||
-- @tparam string|node content_node GUI content scroll node
|
-- @tparam string|node content_node GUI content scroll node
|
||||||
@ -237,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] bool 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)
|
||||||
@ -271,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] bool 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
|
||||||
@ -294,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] bool 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
|
||||||
@ -342,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 bool 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
|
||||||
@ -353,7 +350,7 @@ end
|
|||||||
|
|
||||||
--- Return if scroll have inertion.
|
--- Return if scroll have inertion.
|
||||||
-- @tparam Scroll self @{Scroll}
|
-- @tparam Scroll self @{Scroll}
|
||||||
-- @treturn bool If scroll have inertion
|
-- @treturn boolean @If scroll have inertion
|
||||||
function Scroll.is_inert(self)
|
function Scroll.is_inert(self)
|
||||||
return self._is_inert
|
return self._is_inert
|
||||||
end
|
end
|
||||||
@ -362,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
|
||||||
@ -400,7 +397,7 @@ end
|
|||||||
|
|
||||||
--- Lock or unlock horizontal scroll
|
--- Lock or unlock horizontal scroll
|
||||||
-- @tparam Scroll self @{Scroll}
|
-- @tparam Scroll self @{Scroll}
|
||||||
-- @tparam bool 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
|
||||||
@ -411,7 +408,7 @@ end
|
|||||||
|
|
||||||
--- Lock or unlock vertical scroll
|
--- Lock or unlock vertical scroll
|
||||||
-- @tparam Scroll self @{Scroll}
|
-- @tparam Scroll self @{Scroll}
|
||||||
-- @tparam bool 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
|
||||||
@ -624,8 +621,8 @@ function Scroll._check_points(self)
|
|||||||
|
|
||||||
local temp_dist = math.huge
|
local temp_dist = math.huge
|
||||||
local temp_dist_on_inert = math.huge
|
local temp_dist_on_inert = math.huge
|
||||||
local index = false
|
local index = -1
|
||||||
local index_on_inert = false
|
local index_on_inert = -1
|
||||||
local pos = self.position
|
local pos = self.position
|
||||||
|
|
||||||
for i = 1, #self.points do
|
for i = 1, #self.points do
|
||||||
@ -650,7 +647,11 @@ function Scroll._check_points(self)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self:scroll_to_index(index_on_inert or index)
|
if index_on_inert >= 0 then
|
||||||
|
self:scroll_to_index(index_on_inert)
|
||||||
|
else
|
||||||
|
self:scroll_to_index(index)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -102,8 +102,8 @@ end
|
|||||||
-- You can override this component styles params in druid styles table
|
-- You can override this component styles params in druid styles table
|
||||||
-- or create your own style
|
-- or create your own style
|
||||||
-- @table style
|
-- @table style
|
||||||
-- @tfield[opt=false] bool IS_DYNAMIC_NODE_POSES If true, always center grid content as grid pivot sets
|
-- @tfield[opt=false] boolean IS_DYNAMIC_NODE_POSES If true, always center grid content as grid pivot sets
|
||||||
-- @tfield[opt=false] bool IS_ALIGN_LAST_ROW If true, always align last row of the grid as grid pivot sets
|
-- @tfield[opt=false] boolean IS_ALIGN_LAST_ROW If true, always align last row of the grid as grid pivot sets
|
||||||
function StaticGrid.on_style_change(self, style)
|
function StaticGrid.on_style_change(self, style)
|
||||||
self.style = {}
|
self.style = {}
|
||||||
self.style.IS_DYNAMIC_NODE_POSES = style.IS_DYNAMIC_NODE_POSES or false
|
self.style.IS_DYNAMIC_NODE_POSES = style.IS_DYNAMIC_NODE_POSES or false
|
||||||
@ -113,7 +113,7 @@ end
|
|||||||
|
|
||||||
--- The @{StaticGrid} constructor
|
--- The @{StaticGrid} constructor
|
||||||
-- @tparam StaticGrid self @{StaticGrid}
|
-- @tparam StaticGrid self @{StaticGrid}
|
||||||
-- @tparam string|Node parent The GUI Node container, where grid's items will be placed
|
-- @tparam string|node parent The GUI Node container, where grid's items will be placed
|
||||||
-- @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
|
||||||
function StaticGrid.init(self, parent, element, in_row)
|
function StaticGrid.init(self, parent, element, in_row)
|
||||||
@ -151,7 +151,7 @@ local _temp_pos = vmath.vector3(0)
|
|||||||
--- Return pos for grid node index
|
--- Return pos for grid node index
|
||||||
-- @tparam StaticGrid self @{StaticGrid}
|
-- @tparam StaticGrid self @{StaticGrid}
|
||||||
-- @tparam number index The grid element index
|
-- @tparam number index The grid element index
|
||||||
-- @treturn vector3 Node position
|
-- @treturn vector3 @Node position
|
||||||
function StaticGrid.get_pos(self, index)
|
function StaticGrid.get_pos(self, index)
|
||||||
local row = math.ceil(index / self.in_row) - 1
|
local row = math.ceil(index / self.in_row) - 1
|
||||||
local col = (index - row * self.in_row) - 1
|
local col = (index - row * self.in_row) - 1
|
||||||
@ -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[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 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,9 +239,9 @@ 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)
|
||||||
|
|
||||||
@ -379,7 +379,7 @@ end
|
|||||||
|
|
||||||
--- Update grid inner state
|
--- Update grid inner state
|
||||||
-- @tparam StaticGrid self @{StaticGrid}
|
-- @tparam StaticGrid self @{StaticGrid}
|
||||||
-- @tparam bool 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 bool 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()
|
||||||
|
@ -53,6 +53,9 @@
|
|||||||
--- Current text position
|
--- Current text position
|
||||||
-- @tfield vector3 pos
|
-- @tfield vector3 pos
|
||||||
|
|
||||||
|
--- The last text value
|
||||||
|
-- @tfield string last_value
|
||||||
|
|
||||||
--- Initial text node scale
|
--- Initial text node scale
|
||||||
-- @tfield vector3 start_scale
|
-- @tfield vector3 start_scale
|
||||||
|
|
||||||
@ -222,10 +225,10 @@ function Text.on_style_change(self, style)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- @{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 +276,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)
|
||||||
@ -320,6 +323,19 @@ function Text.set_to(self, set_to)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Set text area size
|
||||||
|
-- @tparam Text self @{Text}
|
||||||
|
-- @tparam vector3 size The new text area size
|
||||||
|
-- @treturn Text Current text instance
|
||||||
|
function Text.set_size(self, size)
|
||||||
|
self.start_size = size
|
||||||
|
self.text_area = vmath.vector3(size)
|
||||||
|
self.text_area.x = self.text_area.x * self.start_scale.x
|
||||||
|
self.text_area.y = self.text_area.y * self.start_scale.y
|
||||||
|
update_adjust(self)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Set color
|
--- Set color
|
||||||
-- @tparam Text self @{Text}
|
-- @tparam Text self @{Text}
|
||||||
-- @tparam vector4 color Color for node
|
-- @tparam vector4 color Color for node
|
||||||
@ -358,7 +374,7 @@ end
|
|||||||
|
|
||||||
--- Set text pivot. Text will re-anchor inside text area
|
--- Set text pivot. Text will re-anchor inside text area
|
||||||
-- @tparam Text self @{Text}
|
-- @tparam Text self @{Text}
|
||||||
-- @tparam gui.pivot pivot Gui pivot constant
|
-- @tparam number pivot The gui.PIVOT_* constant
|
||||||
-- @treturn Text Current text instance
|
-- @treturn Text Current text instance
|
||||||
function Text.set_pivot(self, pivot)
|
function Text.set_pivot(self, pivot)
|
||||||
local prev_pivot = gui.get_pivot(self.node)
|
local prev_pivot = gui.get_pivot(self.node)
|
||||||
@ -384,7 +400,7 @@ end
|
|||||||
|
|
||||||
--- Return true, if text with line break
|
--- Return true, if text with line break
|
||||||
-- @tparam Text self @{Text}
|
-- @tparam Text self @{Text}
|
||||||
-- @treturn bool Is text node with line break
|
-- @treturn boolean Is text node with line break
|
||||||
function Text.is_multiline(self)
|
function Text.is_multiline(self)
|
||||||
return gui.get_line_break(self.node)
|
return gui.get_line_break(self.node)
|
||||||
end
|
end
|
||||||
@ -392,8 +408,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
|
||||||
|
@ -74,9 +74,8 @@ end
|
|||||||
--
|
--
|
||||||
-- Invoke `on_style_change` on component, if exist. Component should handle
|
-- Invoke `on_style_change` on component, if exist. Component should handle
|
||||||
-- their style changing and store all style params
|
-- their style changing and store all style params
|
||||||
-- @function component:set_style
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @tparam table druid_style Druid style module
|
-- @tparam table|nil druid_style Druid style module
|
||||||
-- @treturn BaseComponent @{BaseComponent}
|
-- @treturn BaseComponent @{BaseComponent}
|
||||||
function BaseComponent.set_style(self, druid_style)
|
function BaseComponent.set_style(self, druid_style)
|
||||||
self._meta.style = druid_style or {}
|
self._meta.style = druid_style or {}
|
||||||
@ -94,7 +93,6 @@ end
|
|||||||
--
|
--
|
||||||
-- Use on all your custom components with GUI layouts used as templates.
|
-- Use on all your custom components with GUI layouts used as templates.
|
||||||
-- It will check parent template name to build full template name in self:get_node()
|
-- It will check parent template name to build full template name in self:get_node()
|
||||||
-- @function component:set_template
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @tparam string template BaseComponent template name
|
-- @tparam string template BaseComponent template name
|
||||||
-- @treturn BaseComponent @{BaseComponent}
|
-- @treturn BaseComponent @{BaseComponent}
|
||||||
@ -118,7 +116,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Get current component template name.
|
--- Get current component template name.
|
||||||
-- @function component:get_template
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @treturn string Component full template name
|
-- @treturn string Component full template name
|
||||||
function BaseComponent.get_template(self)
|
function BaseComponent.get_template(self)
|
||||||
@ -128,7 +125,6 @@ end
|
|||||||
|
|
||||||
--- Set current component nodes.
|
--- Set current component nodes.
|
||||||
-- Use if your component nodes was cloned with `gui.clone_tree` and you got the node tree.
|
-- Use if your component nodes was cloned with `gui.clone_tree` and you got the node tree.
|
||||||
-- @function component:set_nodes
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @tparam table nodes BaseComponent nodes table
|
-- @tparam table nodes BaseComponent nodes table
|
||||||
-- @treturn BaseComponent @{BaseComponent}
|
-- @treturn BaseComponent @{BaseComponent}
|
||||||
@ -155,7 +151,6 @@ end
|
|||||||
--- Context used as first arg in all Druid events
|
--- Context used as first arg in all Druid events
|
||||||
--
|
--
|
||||||
-- Context is usually self of gui_script.
|
-- Context is usually self of gui_script.
|
||||||
-- @function component:get_context
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @treturn table BaseComponent context
|
-- @treturn table BaseComponent context
|
||||||
function BaseComponent.get_context(self)
|
function BaseComponent.get_context(self)
|
||||||
@ -164,7 +159,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Increase input priority in input stack
|
--- Increase input priority in input stack
|
||||||
-- @function component:increase_input_priority
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @local
|
-- @local
|
||||||
function BaseComponent.increase_input_priority(self)
|
function BaseComponent.increase_input_priority(self)
|
||||||
@ -178,7 +172,6 @@ end
|
|||||||
-- It autopick node by template name or from nodes by gui.clone_tree
|
-- It autopick node by template name or from nodes by gui.clone_tree
|
||||||
-- if they was setup via component:set_nodes, component:set_template.
|
-- if they was setup via component:set_nodes, component:set_template.
|
||||||
-- If node is not found, the exception will fired
|
-- If node is not found, the exception will fired
|
||||||
-- @function component:get_node
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @tparam string|node node_or_name Node name or node itself
|
-- @tparam string|node node_or_name Node name or node itself
|
||||||
-- @treturn node Gui node
|
-- @treturn node Gui node
|
||||||
@ -211,9 +204,8 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Get Druid instance for inner component creation.
|
--- Get Druid instance for inner component creation.
|
||||||
-- @function component:get_druid
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @treturn Druid Druid instance with component context
|
-- @treturn DruidInstance Druid instance with component context
|
||||||
function BaseComponent.get_druid(self)
|
function BaseComponent.get_druid(self)
|
||||||
local context = { _context = self }
|
local context = { _context = self }
|
||||||
return setmetatable(context, { __index = self._meta.druid })
|
return setmetatable(context, { __index = self._meta.druid })
|
||||||
@ -221,7 +213,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Return component name
|
--- Return component name
|
||||||
-- @function component:get_name
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @treturn string The component name
|
-- @treturn string The component name
|
||||||
function BaseComponent.get_name(self)
|
function BaseComponent.get_name(self)
|
||||||
@ -230,7 +221,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Return parent component name
|
--- Return parent component name
|
||||||
-- @function component:get_parent_name
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @treturn string|nil The parent component name if exist or bil
|
-- @treturn string|nil The parent component name if exist or bil
|
||||||
function BaseComponent.get_parent_name(self)
|
function BaseComponent.get_parent_name(self)
|
||||||
@ -240,7 +230,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Return component input priority
|
--- Return component input priority
|
||||||
-- @function component:get_input_priority
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @treturn number The component input priority
|
-- @treturn number The component input priority
|
||||||
function BaseComponent.get_input_priority(self)
|
function BaseComponent.get_input_priority(self)
|
||||||
@ -251,10 +240,9 @@ end
|
|||||||
--- Set component input priority
|
--- Set component input priority
|
||||||
--
|
--
|
||||||
-- Default value: 10
|
-- Default value: 10
|
||||||
-- @function component:set_input_priority
|
|
||||||
-- @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)
|
||||||
@ -280,7 +268,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Reset component input priority to default value
|
--- Reset component input priority to default value
|
||||||
-- @function component:reset_input_priority
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @treturn number The component input priority
|
-- @treturn number The component input priority
|
||||||
function BaseComponent.reset_input_priority(self)
|
function BaseComponent.reset_input_priority(self)
|
||||||
@ -292,7 +279,6 @@ end
|
|||||||
--- Return component UID.
|
--- Return component UID.
|
||||||
--
|
--
|
||||||
-- UID generated in component creation order.
|
-- UID generated in component creation order.
|
||||||
-- @function component:get_uid
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @treturn number The component uid
|
-- @treturn number The component uid
|
||||||
function BaseComponent.get_uid(self)
|
function BaseComponent.get_uid(self)
|
||||||
@ -303,9 +289,8 @@ end
|
|||||||
--- Set component input state. By default it enabled
|
--- Set component input state. By default it enabled
|
||||||
--
|
--
|
||||||
-- If input is disabled, the component will not receive input events
|
-- If input is disabled, the component will not receive input events
|
||||||
-- @function component:set_input_enabled
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @tparam bool 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
|
||||||
@ -319,7 +304,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Return the parent component if exist
|
--- Return the parent component if exist
|
||||||
-- @function component:get_parent_component
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @treturn BaseComponent|nil The druid component instance or nil
|
-- @treturn BaseComponent|nil The druid component instance or nil
|
||||||
function BaseComponent.get_parent_component(self)
|
function BaseComponent.get_parent_component(self)
|
||||||
@ -328,7 +312,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Setup component context and his style table
|
--- Setup component context and his style table
|
||||||
-- @function component:setup_component
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @tparam table druid_instance The parent druid instance
|
-- @tparam table druid_instance The parent druid instance
|
||||||
-- @tparam table context Druid context. Usually it is self of script
|
-- @tparam table context Druid context. Usually it is self of script
|
||||||
@ -362,10 +345,9 @@ end
|
|||||||
|
|
||||||
--- Basic constructor of component. It will call automaticaly
|
--- Basic constructor of component. It will call automaticaly
|
||||||
-- by `BaseComponent.create`
|
-- by `BaseComponent.create`
|
||||||
-- @function component:initialize
|
|
||||||
-- @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 = {
|
||||||
@ -380,7 +362,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Print log information if debug mode is enabled
|
--- Print log information if debug mode is enabled
|
||||||
-- @function component:log_message
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @tparam string message
|
-- @tparam string message
|
||||||
-- @tparam table context
|
-- @tparam table context
|
||||||
@ -394,9 +375,8 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Set debug logs for component enabled or disabled
|
--- Set debug logs for component enabled or disabled
|
||||||
-- @function component:set_debug
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @tparam bool 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
|
||||||
@ -404,7 +384,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Return true, if input priority was changed
|
--- Return true, if input priority was changed
|
||||||
-- @function component:_is_input_priority_changed
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @local
|
-- @local
|
||||||
function BaseComponent._is_input_priority_changed(self)
|
function BaseComponent._is_input_priority_changed(self)
|
||||||
@ -413,7 +392,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Reset is_input_priority_changed field
|
--- Reset is_input_priority_changed field
|
||||||
-- @function component:_reset_input_priority_changed
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @local
|
-- @local
|
||||||
function BaseComponent._reset_input_priority_changed(self)
|
function BaseComponent._reset_input_priority_changed(self)
|
||||||
@ -427,7 +405,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Get current component interests
|
--- Get current component interests
|
||||||
-- @function component:__get_interests
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @treturn table List of component interests
|
-- @treturn table List of component interests
|
||||||
-- @local
|
-- @local
|
||||||
@ -451,7 +428,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Get current component nodes
|
--- Get current component nodes
|
||||||
-- @function component:__get_nodes
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @treturn table BaseComponent nodes table
|
-- @treturn table BaseComponent nodes table
|
||||||
-- @local
|
-- @local
|
||||||
@ -466,7 +442,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Add child to component children list
|
--- Add child to component children list
|
||||||
-- @function component:__add_children
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @tparam component children The druid component instance
|
-- @tparam component children The druid component instance
|
||||||
-- @local
|
-- @local
|
||||||
@ -476,7 +451,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Remove child from component children list
|
--- Remove child from component children list
|
||||||
-- @function component:__remove_children
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @tparam component children The druid component instance
|
-- @tparam component children The druid component instance
|
||||||
-- @local
|
-- @local
|
||||||
@ -490,7 +464,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Return all children components, recursive
|
--- Return all children components, recursive
|
||||||
-- @function component:get_childrens
|
|
||||||
-- @tparam BaseComponent self @{BaseComponent}
|
-- @tparam BaseComponent self @{BaseComponent}
|
||||||
-- @treturn table Array of childrens if the Druid component instance
|
-- @treturn table Array of childrens if the Druid component instance
|
||||||
function BaseComponent.get_childrens(self)
|
function BaseComponent.get_childrens(self)
|
||||||
@ -510,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,20 +7,20 @@
|
|||||||
|
|
||||||
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_string("druid.no_stencil_check") == "1")
|
||||||
|
|
||||||
M.IS_STENCIL_CHECK = not (sys.get_config("druid.no_stencil_check") == "1")
|
|
||||||
|
|
||||||
--- Component Interests
|
|
||||||
M.ON_INPUT = "on_input"
|
M.ON_INPUT = "on_input"
|
||||||
M.ON_UPDATE = "update"
|
M.ON_UPDATE = "update"
|
||||||
M.ON_MESSAGE = "on_message"
|
M.ON_MESSAGE = "on_message"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
-- @tfield DruidInstance druid @{DruidInstance}
|
-- @tfield DruidInstance druid @{DruidInstance}
|
||||||
|
|
||||||
--- Is currently under user control
|
--- Is currently under user control
|
||||||
-- @tfield bool is_drag
|
-- @tfield boolean is_drag
|
||||||
|
|
||||||
--- The pin node
|
--- The pin node
|
||||||
-- @tfield node node
|
-- @tfield node node
|
||||||
@ -52,7 +52,7 @@ local function set_angle(self, value)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Component init function
|
--- The @{PinKnob} constructor
|
||||||
-- @tparam PinKnob self @{PinKnob}
|
-- @tparam PinKnob self @{PinKnob}
|
||||||
-- @tparam function callback Callback(self, value) on value changed
|
-- @tparam function callback Callback(self, value) on value changed
|
||||||
-- @tparam string template The template string name
|
-- @tparam string template The template string name
|
||||||
|
@ -9,6 +9,9 @@
|
|||||||
--- The component druid instance
|
--- The component druid instance
|
||||||
-- @tfield DruidInstance druid @{DruidInstance}
|
-- @tfield DruidInstance druid @{DruidInstance}
|
||||||
|
|
||||||
|
--- Root node
|
||||||
|
-- @tfield node root
|
||||||
|
|
||||||
--- On input field text change callback(self, input_text)
|
--- On input field text change callback(self, input_text)
|
||||||
-- @tfield Input input @{Input}
|
-- @tfield Input input @{Input}
|
||||||
|
|
||||||
@ -61,7 +64,7 @@ local function on_unselect(self)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Component init function
|
--- The @{RichInput} constructor
|
||||||
-- @tparam RichInput self @{RichInput}
|
-- @tparam RichInput self @{RichInput}
|
||||||
-- @tparam string template The template string name
|
-- @tparam string template The template string name
|
||||||
-- @tparam table nodes Nodes table from gui.clone_tree
|
-- @tparam table nodes Nodes table from gui.clone_tree
|
||||||
@ -69,6 +72,8 @@ function RichInput.init(self, template, nodes)
|
|||||||
self:set_template(template)
|
self:set_template(template)
|
||||||
self:set_nodes(nodes)
|
self:set_nodes(nodes)
|
||||||
self.druid = self:get_druid()
|
self.druid = self:get_druid()
|
||||||
|
self.root = self:get_node(SCHEME.ROOT)
|
||||||
|
|
||||||
self.input = self.druid:new_input(self:get_node(SCHEME.BUTTON), self:get_node(SCHEME.INPUT))
|
self.input = self.druid:new_input(self:get_node(SCHEME.BUTTON), self:get_node(SCHEME.INPUT))
|
||||||
self.cursor = self:get_node(SCHEME.CURSOR)
|
self.cursor = self:get_node(SCHEME.CURSOR)
|
||||||
|
|
||||||
@ -85,11 +90,33 @@ end
|
|||||||
|
|
||||||
--- Set placeholder text
|
--- Set placeholder text
|
||||||
-- @tparam RichInput self @{RichInput}
|
-- @tparam RichInput self @{RichInput}
|
||||||
-- @tparam string placeholder_text The placeholder text
|
-- @tparam string|nil placeholder_text The placeholder text
|
||||||
|
-- @treturn RichInput Current instance
|
||||||
function RichInput.set_placeholder(self, placeholder_text)
|
function RichInput.set_placeholder(self, placeholder_text)
|
||||||
self.placeholder:set_to(placeholder_text)
|
self.placeholder:set_to(placeholder_text)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
---GSet input field text
|
||||||
|
-- @tparam RichInput self @{RichInput}
|
||||||
|
-- @treturn string Current input text
|
||||||
|
function RichInput.get_text(self)
|
||||||
|
return self.input:get_text()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Set allowed charaters for input field.
|
||||||
|
-- See: https://defold.com/ref/stable/string/
|
||||||
|
-- ex: [%a%d] for alpha and numeric
|
||||||
|
-- @tparam RichInput self @{RichInput}
|
||||||
|
-- @tparam string characters Regulax exp. for validate user input
|
||||||
|
-- @treturn RichInput Current instance
|
||||||
|
function RichInput.set_allowed_characters(self, characters)
|
||||||
|
self.input:set_allowed_characters(characters)
|
||||||
|
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
return RichInput
|
return RichInput
|
||||||
|
@ -90,6 +90,7 @@
|
|||||||
--- The component druid instance
|
--- The component druid instance
|
||||||
-- @tfield DruidInstance druid @{DruidInstance}
|
-- @tfield DruidInstance druid @{DruidInstance}
|
||||||
|
|
||||||
|
--
|
||||||
|
|
||||||
local component = require("druid.component")
|
local component = require("druid.component")
|
||||||
local rich_text = require("druid.custom.rich_text.module.rt")
|
local rich_text = require("druid.custom.rich_text.module.rt")
|
||||||
@ -103,7 +104,7 @@ local SCHEME = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
--- Rich Text component constructor
|
--- The @{RichText} constructor
|
||||||
-- @tparam RichText self @{RichText}
|
-- @tparam RichText self @{RichText}
|
||||||
-- @tparam string template The Rich Text template name
|
-- @tparam string template The Rich Text template name
|
||||||
-- @tparam table nodes The node table, if prefab was copied by gui.clone_tree()
|
-- @tparam table nodes The node table, if prefab was copied by gui.clone_tree()
|
||||||
|
@ -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!")
|
||||||
@ -80,7 +80,7 @@ end
|
|||||||
|
|
||||||
--- Return true, if event have at lease one handler
|
--- Return true, if event have at lease one handler
|
||||||
-- @tparam DruidEvent self @{DruidEvent}
|
-- @tparam DruidEvent self @{DruidEvent}
|
||||||
-- @treturn bool True if event have handlers
|
-- @treturn boolean True if event have handlers
|
||||||
-- @usage
|
-- @usage
|
||||||
-- local is_long_click_handler_exists = button.on_long_click:is_exist()
|
-- local is_long_click_handler_exists = button.on_long_click:is_exist()
|
||||||
function DruidEvent.is_exist(self)
|
function DruidEvent.is_exist(self)
|
||||||
@ -102,7 +102,7 @@ end
|
|||||||
|
|
||||||
--- Trigger the event and call all subscribed callbacks
|
--- Trigger the event and call all subscribed callbacks
|
||||||
-- @tparam DruidEvent self @{DruidEvent}
|
-- @tparam DruidEvent self @{DruidEvent}
|
||||||
-- @tparam Any ... All event params
|
-- @tparam any ... All event params
|
||||||
-- @usage
|
-- @usage
|
||||||
-- local Event = require("druid.event")
|
-- local Event = require("druid.event")
|
||||||
-- ...
|
-- ...
|
||||||
|
@ -46,7 +46,7 @@ function Checkbox.on_style_change(self, style)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Component init function
|
--- The @{Checkbox} constructor
|
||||||
-- @tparam Checkbox self @{Checkbox}
|
-- @tparam Checkbox self @{Checkbox}
|
||||||
-- @tparam node node Gui node
|
-- @tparam node node Gui node
|
||||||
-- @tparam function callback Checkbox callback
|
-- @tparam function callback Checkbox callback
|
||||||
@ -71,9 +71,9 @@ end
|
|||||||
|
|
||||||
--- Set checkbox state
|
--- Set checkbox state
|
||||||
-- @tparam Checkbox self @{Checkbox}
|
-- @tparam Checkbox self @{Checkbox}
|
||||||
-- @tparam bool state Checkbox state
|
-- @tparam boolean|nil state Checkbox state
|
||||||
-- @tparam bool is_silent Don't trigger on_change_state if true
|
-- @tparam boolean|nil is_silent Don't trigger on_change_state if true
|
||||||
-- @tparam bool 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)
|
||||||
@ -88,7 +88,7 @@ end
|
|||||||
|
|
||||||
--- Return checkbox state
|
--- Return checkbox state
|
||||||
-- @tparam Checkbox self @{Checkbox}
|
-- @tparam Checkbox self @{Checkbox}
|
||||||
-- @treturn bool Checkbox state
|
-- @treturn boolean Checkbox state
|
||||||
function Checkbox.get_state(self)
|
function Checkbox.get_state(self)
|
||||||
return self.state
|
return self.state
|
||||||
end
|
end
|
||||||
|
@ -21,7 +21,7 @@ local component = require("druid.component")
|
|||||||
local CheckboxGroup = component.create("checkbox_group")
|
local CheckboxGroup = component.create("checkbox_group")
|
||||||
|
|
||||||
|
|
||||||
--- Component init function
|
--- The @{CheckboxGroup} constructor
|
||||||
-- @tparam CheckboxGroup self @{CheckboxGroup}
|
-- @tparam CheckboxGroup self @{CheckboxGroup}
|
||||||
-- @tparam node[] nodes Array of gui node
|
-- @tparam node[] nodes Array of gui node
|
||||||
-- @tparam function callback Checkbox callback
|
-- @tparam function callback Checkbox callback
|
||||||
@ -45,8 +45,8 @@ end
|
|||||||
|
|
||||||
--- Set checkbox group state
|
--- Set checkbox group state
|
||||||
-- @tparam CheckboxGroup self @{CheckboxGroup}
|
-- @tparam CheckboxGroup self @{CheckboxGroup}
|
||||||
-- @tparam bool[] 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
|
||||||
@ -58,7 +58,7 @@ end
|
|||||||
|
|
||||||
--- Return checkbox group state
|
--- Return checkbox group state
|
||||||
-- @tparam CheckboxGroup self @{CheckboxGroup}
|
-- @tparam CheckboxGroup self @{CheckboxGroup}
|
||||||
-- @treturn bool[] Array if checkboxes state
|
-- @treturn boolean[] Array if checkboxes state
|
||||||
function CheckboxGroup.get_state(self)
|
function CheckboxGroup.get_state(self)
|
||||||
local result = {}
|
local result = {}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ local Event = require("druid.event")
|
|||||||
local DataList = component.create("data_list")
|
local DataList = component.create("data_list")
|
||||||
|
|
||||||
|
|
||||||
--- Data list constructor
|
--- The @{DataList} constructor
|
||||||
-- @tparam DataList self @{DataList}
|
-- @tparam DataList self @{DataList}
|
||||||
-- @tparam Scroll scroll The @{Scroll} instance for Data List component
|
-- @tparam Scroll scroll The @{Scroll} instance for Data List component
|
||||||
-- @tparam StaticGrid|DynamicGrid grid The @{StaticGrid} or @{DynamicGrid} instance for Data List component
|
-- @tparam StaticGrid|DynamicGrid grid The @{StaticGrid} or @{DynamicGrid} instance for Data List component
|
||||||
@ -197,7 +197,7 @@ end
|
|||||||
|
|
||||||
--- Return all currenly created nodes in DataList
|
--- Return all currenly created nodes in DataList
|
||||||
-- @tparam DataList self @{DataList}
|
-- @tparam DataList self @{DataList}
|
||||||
-- @treturn Node[] List of created nodes
|
-- @treturn node[] List of created nodes
|
||||||
function DataList.get_created_nodes(self)
|
function DataList.get_created_nodes(self)
|
||||||
local nodes = {}
|
local nodes = {}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ local AVAILABLE_PIVOTS = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
--- Component init function
|
--- The @{DynamicGrid} constructor
|
||||||
-- @tparam DynamicGrid self @{DynamicGrid}
|
-- @tparam DynamicGrid self @{DynamicGrid}
|
||||||
-- @tparam node parent The gui node parent, where items will be placed
|
-- @tparam node parent The gui node parent, where items will be placed
|
||||||
function DynamicGrid.init(self, parent)
|
function DynamicGrid.init(self, parent)
|
||||||
@ -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,9 +140,9 @@ 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 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 DynamicGrid.add(self, node, index, shift_policy, is_instant)
|
function DynamicGrid.add(self, node, index, shift_policy, is_instant)
|
||||||
shift_policy = shift_policy or const.SHIFT.RIGHT
|
shift_policy = shift_policy or const.SHIFT.RIGHT
|
||||||
local delta = shift_policy -- -1 or 1 or 0
|
local delta = shift_policy -- -1 or 1 or 0
|
||||||
@ -183,8 +183,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 DynamicGrid self @{DynamicGrid}
|
-- @tparam DynamicGrid self @{DynamicGrid}
|
||||||
-- @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 DynamicGrid.remove(self, index, shift_policy, is_instant)
|
function DynamicGrid.remove(self, index, shift_policy, is_instant)
|
||||||
shift_policy = shift_policy or const.SHIFT.RIGHT
|
shift_policy = shift_policy or const.SHIFT.RIGHT
|
||||||
@ -322,7 +322,7 @@ end
|
|||||||
|
|
||||||
--- Update grid inner state
|
--- Update grid inner state
|
||||||
-- @tparam DynamicGrid self @{DynamicGrid}
|
-- @tparam DynamicGrid self @{DynamicGrid}
|
||||||
-- @tparam bool 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 bool 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
|
||||||
|
@ -27,11 +27,11 @@ local component = require("druid.component")
|
|||||||
local Hotkey = component.create("hotkey")
|
local Hotkey = component.create("hotkey")
|
||||||
|
|
||||||
|
|
||||||
--- Component init function
|
--- The @{Hotkey} constructor
|
||||||
-- @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] value 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,8 @@ 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] value 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 Current instance
|
||||||
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
|
||||||
|
@ -34,10 +34,10 @@
|
|||||||
-- @tfield Button button @{Button}
|
-- @tfield Button button @{Button}
|
||||||
|
|
||||||
--- Is current input selected now
|
--- Is current input selected now
|
||||||
-- @tfield bool is_selected
|
-- @tfield boolean is_selected
|
||||||
|
|
||||||
--- Is current input is empty now
|
--- Is current input is empty now
|
||||||
-- @tfield bool is_empty
|
-- @tfield boolean is_empty
|
||||||
|
|
||||||
--- Max length for input text
|
--- Max length for input text
|
||||||
-- @tfield[opt] number max_length
|
-- @tfield[opt] number max_length
|
||||||
@ -87,10 +87,10 @@ end
|
|||||||
-- You can override this component styles params in druid styles table
|
-- You can override this component styles params in druid styles table
|
||||||
-- or create your own style
|
-- or create your own style
|
||||||
-- @table style
|
-- @table style
|
||||||
-- @tfield[opt=false] bool IS_LONGTAP_ERASE Is long tap will erase current input data
|
-- @tfield[opt=false] boolean IS_LONGTAP_ERASE Is long tap will erase current input data
|
||||||
-- @tfield[opt=*] string MASK_DEFAULT_CHAR Default character mask for password input
|
-- @tfield[opt=*] string MASK_DEFAULT_CHAR Default character mask for password input
|
||||||
-- @tfield[opt=false] bool IS_UNSELECT_ON_RESELECT If true, call unselect on select selected input
|
-- @tfield[opt=false] boolean IS_UNSELECT_ON_RESELECT If true, call unselect on select selected input
|
||||||
-- @tfield[opt=false] bool NO_CONSUME_INPUT_WHILE_SELECTED 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)
|
-- @tfield[opt=false] boolean NO_CONSUME_INPUT_WHILE_SELECTED 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)
|
||||||
-- @tfield function on_select (self, button_node) Callback on input field selecting
|
-- @tfield function on_select (self, button_node) Callback on input field selecting
|
||||||
-- @tfield function on_unselect (self, button_node) Callback on input field unselecting
|
-- @tfield function on_unselect (self, button_node) Callback on input field unselecting
|
||||||
-- @tfield function on_input_wrong (self, button_node) Callback on wrong user input
|
-- @tfield function on_input_wrong (self, button_node) Callback on wrong user input
|
||||||
@ -115,11 +115,11 @@ function Input.on_style_change(self, style)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Component init function
|
--- The @{Input} constructor
|
||||||
-- @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)
|
||||||
|
|
||||||
@ -302,7 +302,7 @@ function Input.select(self)
|
|||||||
self.style.on_select(self, self.button.node)
|
self.style.on_select(self, self.button.node)
|
||||||
else
|
else
|
||||||
if self.style.IS_UNSELECT_ON_RESELECT then
|
if self.style.IS_UNSELECT_ON_RESELECT then
|
||||||
self:unselect(self)
|
self:unselect()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -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")
|
||||||
@ -34,8 +37,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 +78,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 +97,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 }
|
||||||
|
@ -28,11 +28,11 @@ local Event = require("druid.event")
|
|||||||
local Layout = component.create("layout")
|
local Layout = component.create("layout")
|
||||||
|
|
||||||
|
|
||||||
--- Component init function
|
--- The @{Layout} constructor
|
||||||
-- @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
|
||||||
|
@ -110,7 +110,7 @@ function Progress.on_style_change(self, style)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- @{Progress} constructor
|
--- The @{Progress} constructor
|
||||||
-- @tparam Progress self @{Progress}
|
-- @tparam Progress self @{Progress}
|
||||||
-- @tparam string|node node Node name or GUI Node itself.
|
-- @tparam string|node node Node name or GUI Node itself.
|
||||||
-- @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
|
||||||
@ -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
|
||||||
|
@ -30,7 +30,7 @@ local function on_checkbox_click(self, index, is_instant)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Component init function
|
--- The @{RadioGroup} constructor
|
||||||
-- @tparam RadioGroup self @{RadioGroup}
|
-- @tparam RadioGroup self @{RadioGroup}
|
||||||
-- @tparam node[] nodes Array of gui node
|
-- @tparam node[] nodes Array of gui node
|
||||||
-- @tparam function callback Radio callback
|
-- @tparam function callback Radio callback
|
||||||
@ -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
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
-- @tfield number dist
|
-- @tfield number dist
|
||||||
|
|
||||||
--- Current drag state
|
--- Current drag state
|
||||||
-- @tfield bool is_drag
|
-- @tfield boolean is_drag
|
||||||
|
|
||||||
--- Current slider value
|
--- Current slider value
|
||||||
-- @tfield number value
|
-- @tfield number value
|
||||||
@ -56,11 +56,11 @@ local function set_position(self, value)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Component init function
|
--- The @{Slider} constructor
|
||||||
-- @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] bool 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)
|
||||||
@ -202,7 +202,7 @@ end
|
|||||||
-- move at this position and node drag will start.
|
-- move at this position and node drag will start.
|
||||||
-- This function require the Defold version 1.3.0+
|
-- This function require the Defold version 1.3.0+
|
||||||
-- @tparam Slider self @{Slider}
|
-- @tparam Slider self @{Slider}
|
||||||
-- @tparam Node input_node
|
-- @tparam node input_node
|
||||||
-- @treturn Slider @{Slider}
|
-- @treturn Slider @{Slider}
|
||||||
function Slider.set_input_node(self, input_node)
|
function Slider.set_input_node(self, input_node)
|
||||||
self._input_node = self:get_node(input_node)
|
self._input_node = self:get_node(input_node)
|
||||||
|
@ -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}
|
||||||
@ -76,7 +76,7 @@ end
|
|||||||
-- @table style
|
-- @table style
|
||||||
-- @tfield[opt=0.4] number SWIPE_TIME Maximum time for swipe trigger
|
-- @tfield[opt=0.4] number SWIPE_TIME Maximum time for swipe trigger
|
||||||
-- @tfield[opt=50] number SWIPE_THRESHOLD Minimum distance for swipe trigger
|
-- @tfield[opt=50] number SWIPE_THRESHOLD Minimum distance for swipe trigger
|
||||||
-- @tfield[opt=false] bool SWIPE_TRIGGER_ON_MOVE If true, trigger on swipe moving, not only release action
|
-- @tfield[opt=false] boolean SWIPE_TRIGGER_ON_MOVE If true, trigger on swipe moving, not only release action
|
||||||
function Swipe.on_style_change(self, style)
|
function Swipe.on_style_change(self, style)
|
||||||
self.style = {}
|
self.style = {}
|
||||||
self.style.SWIPE_TIME = style.SWIPE_TIME or 0.4
|
self.style.SWIPE_TIME = style.SWIPE_TIME or 0.4
|
||||||
@ -85,7 +85,7 @@ function Swipe.on_style_change(self, style)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Component init function
|
--- The @{Swipe} constructor
|
||||||
-- @tparam Swipe self @{Swipe}
|
-- @tparam Swipe self @{Swipe}
|
||||||
-- @tparam node node Gui node
|
-- @tparam node node Gui 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
|
||||||
|
@ -44,12 +44,12 @@ local function second_string_min(sec)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Component init function
|
--- The @{Timer} constructor
|
||||||
-- @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[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 bool 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,9 +61,9 @@ 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 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)
|
||||||
@ -255,9 +255,9 @@ 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 table target Array to put elements from source
|
-- @tparam any[] target Array to put elements from source
|
||||||
-- @tparam[opt] table source The source array to get elements from
|
-- @tparam any[]|nil source The source array to get elements from
|
||||||
-- @treturn array The target array
|
-- @treturn any[] The target array
|
||||||
function M.add_array(target, source)
|
function M.add_array(target, source)
|
||||||
assert(target)
|
assert(target)
|
||||||
|
|
||||||
@ -275,10 +275,10 @@ end
|
|||||||
|
|
||||||
--- Make a check with gui.pick_node, but with additional node_click_area check.
|
--- Make a check with gui.pick_node, but with additional node_click_area check.
|
||||||
-- @function helper.pick_node
|
-- @function helper.pick_node
|
||||||
-- @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 bool 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)
|
||||||
@ -345,7 +345,7 @@ end
|
|||||||
--
|
--
|
||||||
-- Offset shown in [-0.5 .. 0.5] range, where -0.5 is left or bottom, 0.5 is right or top.
|
-- Offset shown in [-0.5 .. 0.5] range, where -0.5 is left or bottom, 0.5 is right or top.
|
||||||
-- @function helper.get_pivot_offset
|
-- @function helper.get_pivot_offset
|
||||||
-- @tparam gui.pivot pivot The node pivot
|
-- @tparam number pivot The gui.PIVOT_* constant
|
||||||
-- @treturn vector3 Vector offset with [-0.5..0.5] values
|
-- @treturn vector3 Vector offset with [-0.5..0.5] values
|
||||||
function M.get_pivot_offset(pivot)
|
function M.get_pivot_offset(pivot)
|
||||||
return const.PIVOTS[pivot]
|
return const.PIVOTS[pivot]
|
||||||
@ -354,7 +354,7 @@ end
|
|||||||
|
|
||||||
--- Check if device is native mobile (Android or iOS)
|
--- Check if device is native mobile (Android or iOS)
|
||||||
-- @function helper.is_mobile
|
-- @function helper.is_mobile
|
||||||
-- @treturn bool Is mobile
|
-- @treturn boolean Is mobile
|
||||||
function M.is_mobile()
|
function M.is_mobile()
|
||||||
return const.CURRENT_SYSTEM_NAME == const.OS.IOS or
|
return const.CURRENT_SYSTEM_NAME == const.OS.IOS or
|
||||||
const.CURRENT_SYSTEM_NAME == const.OS.ANDROID
|
const.CURRENT_SYSTEM_NAME == const.OS.ANDROID
|
||||||
@ -363,7 +363,7 @@ end
|
|||||||
|
|
||||||
--- Check if device is HTML5
|
--- Check if device is HTML5
|
||||||
-- @function helper.is_web
|
-- @function helper.is_web
|
||||||
-- @treturn bool Is web
|
-- @treturn boolean Is web
|
||||||
function M.is_web()
|
function M.is_web()
|
||||||
return const.CURRENT_SYSTEM_NAME == const.OS.BROWSER
|
return const.CURRENT_SYSTEM_NAME == const.OS.BROWSER
|
||||||
end
|
end
|
||||||
@ -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)
|
||||||
@ -420,7 +420,7 @@ end
|
|||||||
|
|
||||||
--- Get text metric from GUI node.
|
--- Get text metric from GUI node.
|
||||||
-- @function helper.get_text_metrics_from_node
|
-- @function helper.get_text_metrics_from_node
|
||||||
-- @tparam Node text_node
|
-- @tparam node text_node
|
||||||
-- @treturn GUITextMetrics
|
-- @treturn GUITextMetrics
|
||||||
-- @usage
|
-- @usage
|
||||||
-- type GUITextMetrics = {
|
-- type GUITextMetrics = {
|
||||||
@ -451,10 +451,10 @@ end
|
|||||||
-- Shift policy can be: left, right, no_shift
|
-- Shift policy can be: left, right, no_shift
|
||||||
-- @function helper.insert_with_shift
|
-- @function helper.insert_with_shift
|
||||||
-- @tparam table array Array
|
-- @tparam table array Array
|
||||||
-- @param item 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] const.SHIFT shift_policy Shift policy
|
-- @tparam number|nil shift_policy The druid_const.SHIFT.* constant
|
||||||
-- @treturn item 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,9 +483,9 @@ 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] const.SHIFT shift_policy Shift policy
|
-- @tparam number|nil shift_policy The druid_const.SHIFT.* constant
|
||||||
-- @treturn item 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
|
||||||
|
|
||||||
|
@ -259,8 +259,9 @@ end
|
|||||||
|
|
||||||
--- Create new component.
|
--- Create new component.
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam Component component Component module
|
-- @tparam BaseComponent component Component module
|
||||||
-- @tparam args ... 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)
|
||||||
|
|
||||||
@ -296,7 +297,7 @@ end
|
|||||||
--
|
--
|
||||||
-- Component `on_remove` function will be invoked, if exist.
|
-- Component `on_remove` function will be invoked, if exist.
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam Component component Component instance
|
-- @tparam BaseComponent component Component instance
|
||||||
function DruidInstance.remove(self, component)
|
function DruidInstance.remove(self, component)
|
||||||
if self._is_late_remove_enabled then
|
if self._is_late_remove_enabled then
|
||||||
table.insert(self._late_remove, component)
|
table.insert(self._late_remove, component)
|
||||||
@ -380,7 +381,7 @@ end
|
|||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam hash action_id Action_id from on_input
|
-- @tparam hash action_id Action_id from on_input
|
||||||
-- @tparam table action Action from on_input
|
-- @tparam table action Action from on_input
|
||||||
-- @treturn bool The boolean value is input was consumed
|
-- @treturn boolean The boolean value is input was consumed
|
||||||
function DruidInstance.on_input(self, action_id, action)
|
function DruidInstance.on_input(self, action_id, action)
|
||||||
self._is_late_remove_enabled = true
|
self._is_late_remove_enabled = true
|
||||||
|
|
||||||
@ -477,7 +478,7 @@ end
|
|||||||
-- If whitelist is not empty and component not contains in this list,
|
-- If whitelist is not empty and component not contains in this list,
|
||||||
-- component will be not processed on input step
|
-- component will be not processed on input step
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam[opt=nil] table|Component whitelist_components The array of component to whitelist
|
-- @tparam[opt=nil] table|BaseComponent whitelist_components The array of component to whitelist
|
||||||
-- @treturn self @{DruidInstance}
|
-- @treturn self @{DruidInstance}
|
||||||
function DruidInstance.set_whitelist(self, whitelist_components)
|
function DruidInstance.set_whitelist(self, whitelist_components)
|
||||||
if whitelist_components and whitelist_components.isInstanceOf then
|
if whitelist_components and whitelist_components.isInstanceOf then
|
||||||
@ -499,7 +500,7 @@ end
|
|||||||
-- If blacklist is not empty and component contains in this list,
|
-- If blacklist is not empty and component contains in this list,
|
||||||
-- component will be not processed on input step
|
-- component will be not processed on input step
|
||||||
-- @tparam DruidInstance self @{DruidInstance}
|
-- @tparam DruidInstance self @{DruidInstance}
|
||||||
-- @tparam[opt=nil] table|Component blacklist_components The array of component to blacklist
|
-- @tparam[opt=nil] table|BaseComponent blacklist_components The array of component to blacklist
|
||||||
-- @treturn self @{DruidInstance}
|
-- @treturn self @{DruidInstance}
|
||||||
function DruidInstance.set_blacklist(self, blacklist_components)
|
function DruidInstance.set_blacklist(self, blacklist_components)
|
||||||
if blacklist_components and blacklist_components.isInstanceOf then
|
if blacklist_components and blacklist_components.isInstanceOf then
|
||||||
@ -518,7 +519,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 bool 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 +531,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 +559,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|nil 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 +571,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)
|
||||||
@ -579,8 +580,8 @@ end
|
|||||||
|
|
||||||
--- Create @{BackHandler} component
|
--- Create @{BackHandler} component
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam callback callback On back button
|
-- @tparam function|nil 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,8 +590,8 @@ 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|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)
|
||||||
@ -599,9 +600,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] bool 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 +612,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 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, 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, 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 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 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, element, in_row)
|
function DruidInstance.new_static_grid(self, parent_node, item, in_row)
|
||||||
return DruidInstance.new(self, static_grid, parent, element, in_row)
|
return DruidInstance.new(self, static_grid, parent_node, item, 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,8 +646,8 @@ 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|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)
|
||||||
@ -655,8 +656,8 @@ 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|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")
|
||||||
@ -665,41 +666,41 @@ 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 bool 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|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")
|
||||||
@ -708,9 +709,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")
|
||||||
@ -731,7 +732,7 @@ end
|
|||||||
--- Create @{DataList} component
|
--- Create @{DataList} component
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam Scroll druid_scroll The Scroll instance for Data List component
|
-- @tparam Scroll druid_scroll The Scroll instance for Data List component
|
||||||
-- @tparam Grid druid_grid The Grid instance for Data List component
|
-- @tparam StaticGrid|DynamicGrid druid_grid The @{StaticGrid} or @{DynamicGrid} instance for Data List component
|
||||||
-- @tparam function create_function The create function callback(self, data, index, data_list). Function should return (node, [component])
|
-- @tparam function create_function The create function callback(self, data, index, data_list). Function should return (node, [component])
|
||||||
-- @treturn DataList @{DataList} component
|
-- @treturn DataList @{DataList} component
|
||||||
function DruidInstance.new_data_list(self, druid_scroll, druid_grid, create_function)
|
function DruidInstance.new_data_list(self, druid_scroll, druid_grid, create_function)
|
||||||
@ -752,10 +753,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 number|nil 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")
|
||||||
@ -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")
|
||||||
@ -775,7 +776,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)
|
||||||
@ -786,10 +787,10 @@ end
|
|||||||
--- Create @{Hotkey} component
|
--- Create @{Hotkey} component
|
||||||
-- @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 Button callback
|
-- @tparam function callback The callback function
|
||||||
-- @tparam[opt] value params Button callback params
|
-- @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, params)
|
function DruidInstance.new_hotkey(self, keys_array, callback, callback_argument)
|
||||||
return helper.require_component_message("hotkey")
|
return helper.require_component_message("hotkey")
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -797,8 +798,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")
|
||||||
|
@ -9,7 +9,7 @@ local M = {}
|
|||||||
M.default_style = nil
|
M.default_style = nil
|
||||||
|
|
||||||
|
|
||||||
function M.get_text(name, a, b, c, d, e, f)
|
function M.get_text(name, a, b, c, d, e, f, g)
|
||||||
return "[Druid]: locales not inited"
|
return "[Druid]: locales not inited"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ local function init_lobby(self)
|
|||||||
self.lobby_grid:add(get_title(self, "Texts"))
|
self.lobby_grid:add(get_title(self, "Texts"))
|
||||||
self.lobby_grid:add(get_button(self, "Texts", "texts_general", "/texts/texts_general/texts_general.gui_script"))
|
self.lobby_grid:add(get_button(self, "Texts", "texts_general", "/texts/texts_general/texts_general.gui_script"))
|
||||||
self.lobby_grid:add(get_button(self, "Adjust types", "texts_adjust", "/texts/texts_adjust/texts_adjust.gui_script"))
|
self.lobby_grid:add(get_button(self, "Adjust types", "texts_adjust", "/texts/texts_adjust/texts_adjust.gui_script"))
|
||||||
self.lobby_grid:add(get_button(self, "Lang Text", "texts_lang_text", "/texts/texts_adjust/texts_lang_text.gui_script"))
|
self.lobby_grid:add(get_button(self, "Lang Text", "texts_lang_text", "/texts/lang_text/lang_text.gui_script"))
|
||||||
|
|
||||||
self.lobby_grid:add(get_title(self, "Scrolls"))
|
self.lobby_grid:add(get_title(self, "Scrolls"))
|
||||||
self.lobby_grid:add(get_button_disabled(self, "Nested scrolls", "scroll_scene"))
|
self.lobby_grid:add(get_button_disabled(self, "Nested scrolls", "scroll_scene"))
|
||||||
|
@ -60,12 +60,16 @@ nodes {
|
|||||||
z: 0.0
|
z: 0.0
|
||||||
w: 0.0
|
w: 0.0
|
||||||
}
|
}
|
||||||
clipping_mode: CLIPPING_MODE_NONE
|
clipping_mode: CLIPPING_MODE_STENCIL
|
||||||
clipping_visible: true
|
clipping_visible: true
|
||||||
clipping_inverted: false
|
clipping_inverted: false
|
||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -115,12 +119,16 @@ nodes {
|
|||||||
z: 0.0
|
z: 0.0
|
||||||
w: 0.0
|
w: 0.0
|
||||||
}
|
}
|
||||||
clipping_mode: CLIPPING_MODE_STENCIL
|
clipping_mode: CLIPPING_MODE_NONE
|
||||||
clipping_visible: true
|
clipping_visible: true
|
||||||
clipping_inverted: false
|
clipping_inverted: false
|
||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -176,6 +184,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -231,6 +243,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -294,6 +310,10 @@ nodes {
|
|||||||
template_node_child: false
|
template_node_child: false
|
||||||
text_leading: 1.0
|
text_leading: 1.0
|
||||||
text_tracking: 0.0
|
text_tracking: 0.0
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -357,6 +377,10 @@ nodes {
|
|||||||
template_node_child: false
|
template_node_child: false
|
||||||
text_leading: 1.0
|
text_leading: 1.0
|
||||||
text_tracking: 0.0
|
text_tracking: 0.0
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -420,6 +444,10 @@ nodes {
|
|||||||
template_node_child: false
|
template_node_child: false
|
||||||
text_leading: 1.0
|
text_leading: 1.0
|
||||||
text_tracking: 0.0
|
text_tracking: 0.0
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -483,6 +511,10 @@ nodes {
|
|||||||
template_node_child: false
|
template_node_child: false
|
||||||
text_leading: 1.0
|
text_leading: 1.0
|
||||||
text_tracking: 0.0
|
text_tracking: 0.0
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -532,12 +564,16 @@ nodes {
|
|||||||
z: 0.0
|
z: 0.0
|
||||||
w: 0.0
|
w: 0.0
|
||||||
}
|
}
|
||||||
clipping_mode: CLIPPING_MODE_STENCIL
|
clipping_mode: CLIPPING_MODE_NONE
|
||||||
clipping_visible: true
|
clipping_visible: true
|
||||||
clipping_inverted: false
|
clipping_inverted: false
|
||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -593,6 +629,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -648,6 +688,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -669,8 +713,8 @@ nodes {
|
|||||||
w: 1.0
|
w: 1.0
|
||||||
}
|
}
|
||||||
size {
|
size {
|
||||||
x: 36.0
|
x: 200.0
|
||||||
y: 36.0
|
y: 100.0
|
||||||
z: 0.0
|
z: 0.0
|
||||||
w: 1.0
|
w: 1.0
|
||||||
}
|
}
|
||||||
@ -703,6 +747,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_AUTO
|
size_mode: SIZE_MODE_AUTO
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -758,6 +806,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -813,6 +865,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -876,6 +932,10 @@ nodes {
|
|||||||
template_node_child: false
|
template_node_child: false
|
||||||
text_leading: 1.0
|
text_leading: 1.0
|
||||||
text_tracking: 0.0
|
text_tracking: 0.0
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -931,6 +991,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -986,6 +1050,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1041,6 +1109,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1096,6 +1168,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1162,6 +1238,10 @@ nodes {
|
|||||||
template_node_child: false
|
template_node_child: false
|
||||||
text_leading: 1.0
|
text_leading: 1.0
|
||||||
text_tracking: 0.0
|
text_tracking: 0.0
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1217,6 +1297,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1272,6 +1356,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1338,6 +1426,10 @@ nodes {
|
|||||||
template_node_child: false
|
template_node_child: false
|
||||||
text_leading: 1.0
|
text_leading: 1.0
|
||||||
text_tracking: 0.0
|
text_tracking: 0.0
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1393,6 +1485,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1448,6 +1544,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1514,6 +1614,10 @@ nodes {
|
|||||||
template_node_child: false
|
template_node_child: false
|
||||||
text_leading: 1.0
|
text_leading: 1.0
|
||||||
text_tracking: 0.0
|
text_tracking: 0.0
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1569,6 +1673,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1624,6 +1732,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1679,6 +1791,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1734,6 +1850,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1789,6 +1909,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1844,6 +1968,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1899,6 +2027,10 @@ nodes {
|
|||||||
alpha: 1.0
|
alpha: 1.0
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -1962,6 +2094,10 @@ nodes {
|
|||||||
template_node_child: false
|
template_node_child: false
|
||||||
text_leading: 1.0
|
text_leading: 1.0
|
||||||
text_tracking: 0.0
|
text_tracking: 0.0
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -2017,6 +2153,10 @@ nodes {
|
|||||||
alpha: 0.5
|
alpha: 0.5
|
||||||
template_node_child: false
|
template_node_child: false
|
||||||
size_mode: SIZE_MODE_MANUAL
|
size_mode: SIZE_MODE_MANUAL
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
nodes {
|
nodes {
|
||||||
position {
|
position {
|
||||||
@ -2080,6 +2220,10 @@ nodes {
|
|||||||
template_node_child: false
|
template_node_child: false
|
||||||
text_leading: 1.0
|
text_leading: 1.0
|
||||||
text_tracking: 0.0
|
text_tracking: 0.0
|
||||||
|
custom_type: 0
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
material: ""
|
||||||
}
|
}
|
||||||
layers {
|
layers {
|
||||||
name: "image"
|
name: "image"
|
||||||
|
@ -17,7 +17,6 @@ local function init_scroll_with_grid(self)
|
|||||||
local position = gui.get_position(clone_prefab["grid_prefab"])
|
local position = gui.get_position(clone_prefab["grid_prefab"])
|
||||||
grid_scroll:scroll_to(position)
|
grid_scroll:scroll_to(position)
|
||||||
end)
|
end)
|
||||||
button:set_click_zone(gui.get_node("scroll_with_grid_size"))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
gui.set_enabled(prefab, false)
|
gui.set_enabled(prefab, false)
|
||||||
@ -37,7 +36,7 @@ end
|
|||||||
function init(self)
|
function init(self)
|
||||||
self.druid = druid.new(self)
|
self.druid = druid.new(self)
|
||||||
|
|
||||||
-- Usual scroll for whole page
|
-- Usual scroll for whole page
|
||||||
self.druid:new_scroll("root", "scroll_page_content")
|
self.druid:new_scroll("root", "scroll_page_content")
|
||||||
|
|
||||||
-- Simple scroll with no adjust
|
-- Simple scroll with no adjust
|
||||||
|
@ -8,7 +8,7 @@ use_latest_bob=false
|
|||||||
enable_incremental_version=true
|
enable_incremental_version=true
|
||||||
|
|
||||||
# You can point bob version for project in format "filename:sha"
|
# You can point bob version for project in format "filename:sha"
|
||||||
bob_sha="1.4.7:7a608d3ce6ed895d484956c1e76110ed8b78422a"
|
bob_sha="1.6.0:d9e9c49ab946c058f29a8b688c862d70f30e9c43"
|
||||||
|
|
||||||
# Select Defold channel. Values: stable, beta, alpha
|
# Select Defold channel. Values: stable, beta, alpha
|
||||||
bob_channel="stable"
|
bob_channel="stable"
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
-- Manual Annotations --
|
-- Manual Annotations --
|
||||||
|
|
||||||
---@class druid.rich_text.style
|
|
||||||
---@field COLORS table
|
|
||||||
---@field ADJUST_STEPS number
|
|
||||||
---@field ADJUST_SCALE_DELTA number
|
|
||||||
|
|
||||||
---@class druid.rich_text.metrics
|
---@class druid.rich_text.metrics
|
||||||
---@field width number
|
---@field width number
|
||||||
---@field height number
|
---@field height number
|
||||||
@ -18,7 +13,7 @@
|
|||||||
---@field lines table<number, druid.rich_text.metrics>
|
---@field lines table<number, druid.rich_text.metrics>
|
||||||
|
|
||||||
---@class druid.rich_text.word
|
---@class druid.rich_text.word
|
||||||
---@field node Node
|
---@field node node
|
||||||
---@field relative_scale number
|
---@field relative_scale number
|
||||||
---@field color vector4
|
---@field color vector4
|
||||||
---@field position vector3
|
---@field position vector3
|
||||||
@ -26,7 +21,7 @@
|
|||||||
---@field scale vector3
|
---@field scale vector3
|
||||||
---@field size vector3
|
---@field size vector3
|
||||||
---@field metrics druid.rich_text.metrics
|
---@field metrics druid.rich_text.metrics
|
||||||
---@field pivot Pivot
|
---@field pivot number @ The gui.PIVOT_* constant
|
||||||
---@field text string
|
---@field text string
|
||||||
---@field shadow vector4
|
---@field shadow vector4
|
||||||
---@field outline vector4
|
---@field outline vector4
|
||||||
@ -37,14 +32,14 @@
|
|||||||
---@field br boolean
|
---@field br boolean
|
||||||
---@field nobr boolean
|
---@field nobr boolean
|
||||||
|
|
||||||
---@class druid.rich_text.word.image
|
---@class druid.rich_text.image
|
||||||
---@field texture string
|
---@field texture string
|
||||||
---@field anim string
|
---@field anim string
|
||||||
---@field width number
|
---@field width number
|
||||||
---@field height number
|
---@field height number
|
||||||
|
|
||||||
---@class druid.rich_text.settings
|
---@class druid.rich_text.settings
|
||||||
---@field parent Node
|
---@field parent node
|
||||||
---@field size number
|
---@field size number
|
||||||
---@field fonts table<string, string>
|
---@field fonts table<string, string>
|
||||||
---@field color vector4
|
---@field color vector4
|
||||||
@ -54,8 +49,8 @@
|
|||||||
---@field image_pixel_grid_snap boolean
|
---@field image_pixel_grid_snap boolean
|
||||||
---@field combine_words boolean
|
---@field combine_words boolean
|
||||||
---@field default_animation string
|
---@field default_animation string
|
||||||
---@field node_prefab Node
|
---@field node_prefab node
|
||||||
---@field text_prefab Node
|
---@field text_prefab node
|
||||||
|
|
||||||
---@class GUITextMetrics
|
---@class GUITextMetrics
|
||||||
---@field width number
|
---@field width number
|
||||||
|
Loading…
x
Reference in New Issue
Block a user