mirror of
https://github.com/Insality/druid
synced 2025-06-27 10:27:48 +02:00
Update docs
This commit is contained in:
parent
37fff52aa5
commit
d7dd4a86b8
@ -13,3 +13,5 @@ date,sha,version,build_size,build_time,platform,mode,is_cache_using,commits_coun
|
|||||||
2023-07-13T18:37:07Z,1cbe57376397a8352bbafcc67de0b6f95ae37b35,0.10.682,2496,53,js-web,release,true,682
|
2023-07-13T18:37:07Z,1cbe57376397a8352bbafcc67de0b6f95ae37b35,0.10.682,2496,53,js-web,release,true,682
|
||||||
2023-07-13T19:31:47Z,ea185622702e6691275187741b1e2ee0c7f079ec,0.11.686,2452,51,js-web,release,true,686
|
2023-07-13T19:31:47Z,ea185622702e6691275187741b1e2ee0c7f079ec,0.11.686,2452,51,js-web,release,true,686
|
||||||
2023-07-15T12:56:18Z,556e1a9bae620e2df290b10287fa8d0f64d47293,0.11.690,2468,51,js-web,release,true,690
|
2023-07-15T12:56:18Z,556e1a9bae620e2df290b10287fa8d0f64d47293,0.11.690,2468,51,js-web,release,true,690
|
||||||
|
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
|
||||||
|
|
@ -1 +1 @@
|
|||||||
{"content":[{"name":"game.projectc","size":4133,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":23248,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":608800,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":24461,"pieces":[{"name":"game.dmanifest0","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game.public.der0","offset":0}]}]}
|
{"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":607580,"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}]}]}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,18 +1,18 @@
|
|||||||
[project]
|
[project]
|
||||||
title = druid
|
title = druid
|
||||||
version = 0.10.682
|
version = 0.11.693
|
||||||
write_log = 0
|
write_log = 0
|
||||||
compress_archive = 1
|
compress_archive = 1
|
||||||
publisher = Insality
|
publisher = Insality
|
||||||
developer = Insality
|
developer = Insality
|
||||||
commit_sha = 1cbe57376397a8352bbafcc67de0b6f95ae37b35
|
commit_sha = 37fff52aa59feb20f761ef4d340d9f677743d54b
|
||||||
build_date = 2023-07-13T18:37:07Z
|
build_date = 2023-08-05T16:31:19Z
|
||||||
title_as_file_name = druid
|
title_as_file_name = druid
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
width = 600
|
width = 600
|
||||||
height = 900
|
height = 900
|
||||||
high_dpi = 0
|
high_dpi = 1
|
||||||
samples = 0
|
samples = 0
|
||||||
fullscreen = 0
|
fullscreen = 0
|
||||||
update_frequency = 0
|
update_frequency = 0
|
||||||
@ -57,11 +57,11 @@ render = /builtins/render/default.renderc
|
|||||||
[graphics]
|
[graphics]
|
||||||
default_texture_min_filter = linear
|
default_texture_min_filter = linear
|
||||||
default_texture_mag_filter = linear
|
default_texture_mag_filter = linear
|
||||||
max_draw_calls = 1024
|
max_draw_calls = 128
|
||||||
max_characters = 8192
|
max_characters = 8192
|
||||||
max_debug_vertices = 10000
|
max_debug_vertices = 10000
|
||||||
texture_profiles = /example/custom.texture_profiles
|
texture_profiles = /example/custom.texture_profiles
|
||||||
verify_graphics_calls = 1
|
verify_graphics_calls = 0
|
||||||
memory_size = 512
|
memory_size = 512
|
||||||
|
|
||||||
[shader]
|
[shader]
|
||||||
@ -88,15 +88,15 @@ game_binding = /input/game.input_bindingc
|
|||||||
use_accelerometer = 0
|
use_accelerometer = 0
|
||||||
|
|
||||||
[sprite]
|
[sprite]
|
||||||
max_count = 128
|
max_count = 16
|
||||||
subpixels = 1
|
subpixels = 1
|
||||||
|
|
||||||
[model]
|
[model]
|
||||||
max_count = 128
|
max_count = 0
|
||||||
split_meshes = 0
|
split_meshes = 0
|
||||||
|
|
||||||
[mesh]
|
[mesh]
|
||||||
max_count = 128
|
max_count = 0
|
||||||
|
|
||||||
[gui]
|
[gui]
|
||||||
max_count = 64
|
max_count = 64
|
||||||
@ -104,17 +104,17 @@ max_particlefx_count = 64
|
|||||||
max_particle_count = 1024
|
max_particle_count = 1024
|
||||||
|
|
||||||
[collection]
|
[collection]
|
||||||
max_instances = 1024
|
max_instances = 128
|
||||||
max_input_stack_entries = 16
|
max_input_stack_entries = 16
|
||||||
|
|
||||||
[collection_proxy]
|
[collection_proxy]
|
||||||
max_count = 8
|
max_count = 8
|
||||||
|
|
||||||
[collectionfactory]
|
[collectionfactory]
|
||||||
max_count = 128
|
max_count = 64
|
||||||
|
|
||||||
[factory]
|
[factory]
|
||||||
max_count = 128
|
max_count = 16
|
||||||
|
|
||||||
[ios]
|
[ios]
|
||||||
launch_screen = /builtins/manifests/ios/LaunchScreen.storyboardc
|
launch_screen = /builtins/manifests/ios/LaunchScreen.storyboardc
|
||||||
@ -126,7 +126,7 @@ default_language = en
|
|||||||
localizations = en
|
localizations = en
|
||||||
|
|
||||||
[android]
|
[android]
|
||||||
version_code = 682
|
version_code = 693
|
||||||
minimum_sdk_version = 19
|
minimum_sdk_version = 19
|
||||||
target_sdk_version = 33
|
target_sdk_version = 33
|
||||||
package = com.insality.druid
|
package = com.insality.druid
|
||||||
@ -167,9 +167,9 @@ show_console_banner = 1
|
|||||||
scale_mode = fit
|
scale_mode = fit
|
||||||
|
|
||||||
[particle_fx]
|
[particle_fx]
|
||||||
max_count = 64
|
max_count = 0
|
||||||
max_emitter_count = 64
|
max_emitter_count = 0
|
||||||
max_particle_count = 1024
|
max_particle_count = 0
|
||||||
|
|
||||||
[iap]
|
[iap]
|
||||||
auto_finish_transactions = 1
|
auto_finish_transactions = 1
|
||||||
@ -187,7 +187,7 @@ include_dirs = druid
|
|||||||
shared_state = 1
|
shared_state = 1
|
||||||
|
|
||||||
[label]
|
[label]
|
||||||
max_count = 64
|
max_count = 0
|
||||||
subpixels = 1
|
subpixels = 1
|
||||||
|
|
||||||
[profiler]
|
[profiler]
|
||||||
@ -199,8 +199,8 @@ settings = /liveupdate.settings
|
|||||||
enabled = 1
|
enabled = 1
|
||||||
|
|
||||||
[tilemap]
|
[tilemap]
|
||||||
max_count = 16
|
max_count = 0
|
||||||
max_tile_count = 2048
|
max_tile_count = 0
|
||||||
|
|
||||||
[engine]
|
[engine]
|
||||||
run_while_iconified = 0
|
run_while_iconified = 0
|
||||||
|
@ -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.10.682</title>
|
<title>druid 0.11.693</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
|
||||||
|
@ -96,7 +96,7 @@ local back_handler = self.druid:new_back_handler(callback, [params])
|
|||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#on_back">on_back</a></td>
|
<td class="name" nowrap><a href="#on_back">on_back</a></td>
|
||||||
<td class="summary"><a href="../modules/DruidEvent.html#">DruidEvent</a> Event on back handler action.</td>
|
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a> Event on back handler action.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#params">params</a></td>
|
<td class="name" nowrap><a href="#params">params</a></td>
|
||||||
@ -116,7 +116,7 @@ local back_handler = self.druid:new_back_handler(callback, [params])
|
|||||||
<strong>on_back</strong>
|
<strong>on_back</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a> Event on back handler action.
|
The <a href="../modules/DruidEvent.html#">DruidEvent</a> Event on back handler action.
|
||||||
<p> Trigger on input action ACTION_BACK or ACTION_BACKSPACE
|
<p> Trigger on input action ACTION_BACK or ACTION_BACKSPACE
|
||||||
|
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ return AwesomeComponent
|
|||||||
</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="#component:set_nodes">component: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="#component:set_style">component:set_style(self, druid_style)</a></td>
|
||||||
@ -548,7 +548,8 @@ return AwesomeComponent
|
|||||||
<strong>component:set_nodes(self, nodes)</strong>
|
<strong>component:set_nodes(self, nodes)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Set current component nodes Use if your component nodes was cloned with `gui.clone_tree` and you got the node tree.
|
Set current component nodes.
|
||||||
|
Use if your component nodes was cloned with `gui.clone_tree` and you got the node tree.
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
|
@ -111,7 +111,7 @@ local button = self.druid:new_button("button_name", on_button_click, c
|
|||||||
</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"><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>
|
||||||
<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>
|
||||||
@ -157,7 +157,7 @@ local button = self.druid:new_button("button_name", on_button_click, c
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#hover">hover</a></td>
|
<td class="name" nowrap><a href="#hover">hover</a></td>
|
||||||
<td class="summary"><a href="../modules/Hover.html#">Hover</a>: Button Hover component</td>
|
<td class="summary">The <a href="../modules/Hover.html#">Hover</a>: Button Hover component</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#node">node</a></td>
|
<td class="name" nowrap><a href="#node">node</a></td>
|
||||||
@ -169,31 +169,31 @@ local button = self.druid:new_button("button_name", on_button_click, c
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#on_click">on_click</a></td>
|
<td class="name" nowrap><a href="#on_click">on_click</a></td>
|
||||||
<td class="summary"><a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on successful release action over button.</td>
|
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on successful release action over button.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#on_click_outside">on_click_outside</a></td>
|
<td class="name" nowrap><a href="#on_click_outside">on_click_outside</a></td>
|
||||||
<td class="summary"><a href="../modules/DruidEvent.html#">DruidEvent</a>: Event calls if click event was outside of button.</td>
|
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event calls if click event was outside of button.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#on_double_click">on_double_click</a></td>
|
<td class="name" nowrap><a href="#on_double_click">on_double_click</a></td>
|
||||||
<td class="summary"><a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on double tap action over button.</td>
|
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on double tap action over button.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#on_hold_callback">on_hold_callback</a></td>
|
<td class="name" nowrap><a href="#on_hold_callback">on_hold_callback</a></td>
|
||||||
<td class="summary"><a href="../modules/DruidEvent.html#">DruidEvent</a>: Event calls every frame before on_long_click event.</td>
|
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event calls every frame before on_long_click event.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#on_long_click">on_long_click</a></td>
|
<td class="name" nowrap><a href="#on_long_click">on_long_click</a></td>
|
||||||
<td class="summary"><a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on long tap action over button.</td>
|
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on long tap action over button.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#on_pressed">on_pressed</a></td>
|
<td class="name" nowrap><a href="#on_pressed">on_pressed</a></td>
|
||||||
<td class="summary"><a href="../modules/DruidEvent.html#">DruidEvent</a>: Event triggered if button was pressed by user.</td>
|
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event triggered if button was pressed by user.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#on_repeated_click">on_repeated_click</a></td>
|
<td class="name" nowrap><a href="#on_repeated_click">on_repeated_click</a></td>
|
||||||
<td class="summary"><a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on repeated action over button.</td>
|
<td class="summary">The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on repeated action over button.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#params">params</a></td>
|
<td class="name" nowrap><a href="#params">params</a></td>
|
||||||
@ -244,7 +244,7 @@ local button = self.druid:new_button("button_name", on_button_click, c
|
|||||||
<strong>init(self, node, callback[, custom_args[, anim_node]])</strong>
|
<strong>init(self, node, callback[, custom_args[, anim_node]])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="../modules/Button.html#">Button</a> constructor
|
The <a href="../modules/Button.html#">Button</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -607,7 +607,7 @@ button:set_enabled(<span class="keyword">true</span>)</pre>
|
|||||||
<strong>hover</strong>
|
<strong>hover</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="../modules/Hover.html#">Hover</a>: Button Hover component
|
The <a href="../modules/Hover.html#">Hover</a>: Button Hover component
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@ -667,7 +667,7 @@ button:set_enabled(<span class="keyword">true</span>)</pre>
|
|||||||
<strong>on_click</strong>
|
<strong>on_click</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on successful release action over button.
|
The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on successful release action over button.
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@ -694,7 +694,7 @@ button:set_enabled(<span class="keyword">true</span>)</pre>
|
|||||||
<strong>on_click_outside</strong>
|
<strong>on_click_outside</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>: Event calls if click event was outside of button.
|
The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event calls if click event was outside of button.
|
||||||
<p> This event will be triggered for each button what was not clicked on user click action
|
<p> This event will be triggered for each button what was not clicked on user click action
|
||||||
<p> Usecase: Hide the popup when click outside
|
<p> Usecase: Hide the popup when click outside
|
||||||
|
|
||||||
@ -723,7 +723,7 @@ button:set_enabled(<span class="keyword">true</span>)</pre>
|
|||||||
<strong>on_double_click</strong>
|
<strong>on_double_click</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on double tap action over button.
|
The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on double tap action over button.
|
||||||
<p> If secondary click was too fast after previous one, the double
|
<p> If secondary click was too fast after previous one, the double
|
||||||
click will be called instead usual click (if on_double_click subscriber exists)
|
click will be called instead usual click (if on_double_click subscriber exists)
|
||||||
|
|
||||||
@ -752,7 +752,7 @@ button:set_enabled(<span class="keyword">true</span>)</pre>
|
|||||||
<strong>on_hold_callback</strong>
|
<strong>on_hold_callback</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>: Event calls every frame before on_long_click event.
|
The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event calls every frame before on_long_click event.
|
||||||
<p> If long_click subscriber exists, the on_hold_callback will be called before long_click trigger.
|
<p> If long_click subscriber exists, the on_hold_callback will be called before long_click trigger.
|
||||||
<p> Usecase: Animate button progress of long tap
|
<p> Usecase: Animate button progress of long tap
|
||||||
|
|
||||||
@ -781,7 +781,7 @@ button:set_enabled(<span class="keyword">true</span>)</pre>
|
|||||||
<strong>on_long_click</strong>
|
<strong>on_long_click</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on long tap action over button.
|
The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on long tap action over button.
|
||||||
<p> This callback will be triggered if user pressed the button and hold the some amount of time.
|
<p> This callback will be triggered if user pressed the button and hold the some amount of time.
|
||||||
The amount of time picked from button style param: LONGTAP_TIME
|
The amount of time picked from button style param: LONGTAP_TIME
|
||||||
|
|
||||||
@ -810,7 +810,7 @@ button:set_enabled(<span class="keyword">true</span>)</pre>
|
|||||||
<strong>on_pressed</strong>
|
<strong>on_pressed</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>: Event triggered if button was pressed by user.
|
The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event triggered if button was pressed by user.
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@ -837,7 +837,7 @@ button:set_enabled(<span class="keyword">true</span>)</pre>
|
|||||||
<strong>on_repeated_click</strong>
|
<strong>on_repeated_click</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on repeated action over button.
|
The <a href="../modules/DruidEvent.html#">DruidEvent</a>: Event on repeated action over button.
|
||||||
<p> This callback will be triggered if user hold the button. The repeat rate pick from `input.repeat_interval` in game.project
|
<p> This callback will be triggered if user hold the button. The repeat rate pick from `input.repeat_interval` in game.project
|
||||||
|
|
||||||
|
|
||||||
|
@ -206,6 +206,10 @@ 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="summary">Create <a href="../modules/RichText.html#">RichText</a> component.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="name" nowrap><a href="#new_scroll">new_scroll(self, view_node, content_node)</a></td>
|
<td class="name" nowrap><a href="#new_scroll">new_scroll(self, view_node, content_node)</a></td>
|
||||||
<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>
|
||||||
@ -882,6 +886,44 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "new_rich_text"></a>
|
||||||
|
<strong>new_rich_text(self[, template[, nodes]])</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Create <a href="../modules/RichText.html#">RichText</a> component.
|
||||||
|
As a template please check rich_text.gui layout.
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
<span class="types"><span class="type">DruidInstance</span></span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<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>
|
||||||
|
Template name if used
|
||||||
|
(<em>optional</em>)
|
||||||
|
</li>
|
||||||
|
<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>
|
||||||
|
Nodes table from gui.clone_tree
|
||||||
|
(<em>optional</em>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">RichText</span></span>
|
||||||
|
<a href="../modules/RichText.html#">RichText</a> component
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "new_scroll"></a>
|
<a name = "new_scroll"></a>
|
||||||
@ -1238,6 +1280,12 @@ end
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">self</span></span>
|
||||||
|
<a href="../modules/DruidInstance.html#">DruidInstance</a>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1266,6 +1314,12 @@ end
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">self</span></span>
|
||||||
|
<a href="../modules/DruidInstance.html#">DruidInstance</a>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,6 +86,10 @@ 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>
|
||||||
|
<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>
|
||||||
|
</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=0], ...)</a></td>
|
||||||
<td class="summary">Centerate nodes by x position with margin.</td>
|
<td class="summary">Centerate nodes by x position with margin.</td>
|
||||||
@ -143,10 +147,6 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<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>
|
||||||
<td class="name" nowrap><a href="#helper.is_enabled">helper.is_enabled(node)</a></td>
|
|
||||||
<td class="summary">Check if node is enabled in GUI hierarchy.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap><a href="#helper.is_mobile">helper.is_mobile()</a></td>
|
<td class="name" nowrap><a href="#helper.is_mobile">helper.is_mobile()</a></td>
|
||||||
<td class="summary">Check if device is native mobile (Android or iOS)</td>
|
<td class="summary">Check if device is native mobile (Android or iOS)</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -187,6 +187,38 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<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 = "helper.add_array"></a>
|
||||||
|
<strong>helper.add_array(target[, source])</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Add all elements from source array to the target array
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<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>
|
||||||
|
Array to put elements from source
|
||||||
|
</li>
|
||||||
|
<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>
|
||||||
|
The source array to get elements from
|
||||||
|
(<em>optional</em>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">array</span></span>
|
||||||
|
The target array
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</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=0], ...)</strong>
|
||||||
@ -555,7 +587,7 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<span class="types"><span class="type">pepepe</span></span>
|
<span class="types"><span class="type">GUITextMetrics</span></span>
|
||||||
|
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@ -611,34 +643,6 @@ helper.centrate_nodes(0, node_1, node_2)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
<a name = "helper.is_enabled"></a>
|
|
||||||
<strong>helper.is_enabled(node)</strong>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
Check if node is enabled in GUI hierarchy.
|
|
||||||
<p> Return false, if node or any his parent is disabled
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><span class="parameter">node</span>
|
|
||||||
<span class="types"><span class="type">node</span></span>
|
|
||||||
GUI node
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Returns:</h3>
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<span class="types"><span class="type">bool</span></span>
|
|
||||||
Is enabled in hierarchy
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "helper.is_mobile"></a>
|
<a name = "helper.is_mobile"></a>
|
||||||
|
@ -94,7 +94,7 @@
|
|||||||
</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[, adjust_type=downscale])</a></td>
|
||||||
<td class="summary"><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>
|
||||||
<td class="name" nowrap><a href="#set_to">set_to(self, text)</a></td>
|
<td class="name" nowrap><a href="#set_to">set_to(self, text)</a></td>
|
||||||
@ -191,7 +191,7 @@
|
|||||||
<strong>init(self, node, locale_id[, adjust_type=downscale])</strong>
|
<strong>init(self, node, locale_id[, adjust_type=downscale])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="../modules/LangText.html#">LangText</a> constructor
|
The <a href="../modules/LangText.html#">LangText</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
<h2>Contents</h2>
|
<h2>Contents</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#Functions">Functions</a></li>
|
<li><a href="#Functions">Functions</a></li>
|
||||||
|
<li><a href="#Tables">Tables</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
@ -118,7 +119,6 @@ self.rich_text:set_text("Hello, Druid Rich Text!")
|
|||||||
font: string,
|
font: string,
|
||||||
image: druid.rich_text.image,
|
image: druid.rich_text.image,
|
||||||
default_animation: string,
|
default_animation: string,
|
||||||
anchor: number,
|
|
||||||
br: boolean,
|
br: boolean,
|
||||||
nobr: boolean,
|
nobr: boolean,
|
||||||
}
|
}
|
||||||
@ -150,10 +150,14 @@ type druid.rich_text.metrics = {
|
|||||||
<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="#clean">clean()</a></td>
|
<td class="name" nowrap><a href="#clear">clear()</a></td>
|
||||||
<td class="summary">Clear all created words.</td>
|
<td class="summary">Clear all created words.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#get_line_metric">get_line_metric()</a></td>
|
||||||
|
<td class="summary">Get current line metrics</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="name" nowrap><a href="#get_words">get_words()</a></td>
|
<td class="name" nowrap><a href="#get_words">get_words()</a></td>
|
||||||
<td class="summary">Get all current words.</td>
|
<td class="summary">Get all current words.</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -167,7 +171,14 @@ type druid.rich_text.metrics = {
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#tagged">tagged(tag)</a></td>
|
<td class="name" nowrap><a href="#tagged">tagged(tag)</a></td>
|
||||||
<td class="summary">Get all words, which has a passed tag</td>
|
<td class="summary">Get all words, which has a passed tag.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h2><a href="#Tables">Tables</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#style">style</a></td>
|
||||||
|
<td class="summary">Component style params.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -179,8 +190,8 @@ type druid.rich_text.metrics = {
|
|||||||
|
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "clean"></a>
|
<a name = "clear"></a>
|
||||||
<strong>clean()</strong>
|
<strong>clear()</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Clear all created words.
|
Clear all created words.
|
||||||
@ -191,6 +202,26 @@ type druid.rich_text.metrics = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "get_line_metric"></a>
|
||||||
|
<strong>get_line_metric()</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Get current line metrics
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">druid.rich_text.lines_metrics</span></span>
|
||||||
|
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "get_words"></a>
|
<a name = "get_words"></a>
|
||||||
@ -205,7 +236,7 @@ type druid.rich_text.metrics = {
|
|||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<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>
|
||||||
Words
|
druid.rich_text.word[]
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
@ -325,7 +356,7 @@ Words <nobr>inside tag</nobr> won't <span class="keyword">break</spa
|
|||||||
<strong>tagged(tag)</strong>
|
<strong>tagged(tag)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Get all words, which has a passed tag
|
Get all words, which has a passed tag.
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -339,13 +370,51 @@ Words <nobr>inside tag</nobr> won't <span class="keyword">break</spa
|
|||||||
<h3>Returns:</h3>
|
<h3>Returns:</h3>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<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">druid.rich_text.word[]</span></span>
|
||||||
Words
|
words
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "style"></a>
|
||||||
|
<strong>style</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Component style params.
|
||||||
|
You can override this component styles params in Druid styles table
|
||||||
|
or create your own style
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Fields:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">COLORS</span>
|
||||||
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||||
|
Rich Text color aliases
|
||||||
|
(<em>default</em> {})
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">ADJUST_STEPS</span>
|
||||||
|
<span class="types"><span class="type">number</span></span>
|
||||||
|
Amount steps of attemps text adjust by height
|
||||||
|
(<em>default</em> 20)
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">ADJUST_SCALE_DELTA</span>
|
||||||
|
<span class="types"><span class="type">number</span></span>
|
||||||
|
Scale step on each height adjust step
|
||||||
|
(<em>default</em> 0.02)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
@ -78,13 +78,14 @@
|
|||||||
<h1>Module <code>StaticGrid</code></h1>
|
<h1>Module <code>StaticGrid</code></h1>
|
||||||
<p>Component to handle component's position by row and columns.</p>
|
<p>Component to handle component's position by row and columns.</p>
|
||||||
<p>
|
<p>
|
||||||
## Overview ##
|
<b># Overview #</b>
|
||||||
<p> The Static Grid component allows for positioning components in rows and columns.
|
<p> The Static Grid component allows for positioning components in rows and columns.
|
||||||
It provides a static grid layout with constant node sizes, allowing for pre-calculated
|
It provides a static grid layout with constant node sizes, allowing for pre-calculated
|
||||||
node positions and the option to include gaps between nodes.
|
node positions and the option to include gaps between nodes.
|
||||||
<p> ## Notes ##
|
<p> <b># Notes #</b>
|
||||||
<p> • In a static grid, the node size remains constant, enabling the calculation of node
|
<p> • In a static grid, the node size remains constant, enabling the calculation of node
|
||||||
positions before placement. Nodes can be placed with gaps between them.
|
positions before placement. If you want add gaps between nodes, increase the root prefab size,
|
||||||
|
including the padding and margin.
|
||||||
<p> • The static grid can automatically shift elements when nodes are added or removed.
|
<p> • The static grid can automatically shift elements when nodes are added or removed.
|
||||||
<p> • When a node is added, the grid will set the node's parent to the specified parent_node.
|
<p> • When a node is added, the grid will set the node's parent to the specified parent_node.
|
||||||
<p> • You can obtain an array of positions for each element, which can be used to set
|
<p> • You can obtain an array of positions for each element, which can be used to set
|
||||||
@ -138,7 +139,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#init">init(self, parent, element[, in_row=1])</a></td>
|
<td class="name" nowrap><a href="#init">init(self, parent, element[, in_row=1])</a></td>
|
||||||
<td class="summary"><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=SHIFT.RIGHT[, is_instant=false]])</a></td>
|
||||||
@ -501,7 +502,7 @@
|
|||||||
<strong>init(self, parent, element[, in_row=1])</strong>
|
<strong>init(self, parent, element[, in_row=1])</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="../modules/StaticGrid.html#">StaticGrid</a> constructor
|
The <a href="../modules/StaticGrid.html#">StaticGrid</a> constructor
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
|
@ -42,7 +42,7 @@ function druid.set_text_function(callback) end
|
|||||||
|
|
||||||
|
|
||||||
---@class druid.back_handler : druid.base_component
|
---@class druid.back_handler : druid.base_component
|
||||||
---@field on_back druid.event @{DruidEvent} Event on back handler action.
|
---@field on_back druid.event The @{DruidEvent} Event on back handler action.
|
||||||
---@field params any Custom args to pass in the callback
|
---@field params any Custom args to pass in the callback
|
||||||
local druid__back_handler = {}
|
local druid__back_handler = {}
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ function druid__base_component.component:set_input_enabled(self, state) end
|
|||||||
---@return number The component input priority
|
---@return number The component input priority
|
||||||
function druid__base_component.component:set_input_priority(self, value, is_temporary) end
|
function druid__base_component.component:set_input_priority(self, value, is_temporary) 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.
|
||||||
---@param self druid.base_component @{BaseComponent}
|
---@param self druid.base_component @{BaseComponent}
|
||||||
---@param nodes table BaseComponent nodes table
|
---@param nodes table BaseComponent nodes table
|
||||||
@ -170,16 +170,16 @@ function druid__blocker.set_enabled(self, state) end
|
|||||||
---@class druid.button : druid.base_component
|
---@class druid.button : druid.base_component
|
||||||
---@field anim_node node Button animation node.
|
---@field anim_node node Button animation node.
|
||||||
---@field click_zone node Additional button click area, defined by another GUI Node
|
---@field click_zone node Additional button click area, defined by another GUI Node
|
||||||
---@field hover druid.hover @{Hover}: Button Hover component
|
---@field hover druid.hover The @{Hover}: Button Hover component
|
||||||
---@field node Node Button trigger node
|
---@field node Node Button trigger node
|
||||||
---@field node_id hash The GUI node id from button node
|
---@field node_id hash The GUI node id from button node
|
||||||
---@field on_click druid.event @{DruidEvent}: Event on successful release action over button.
|
---@field on_click druid.event The @{DruidEvent}: Event on successful release action over button.
|
||||||
---@field on_click_outside druid.event @{DruidEvent}: Event calls if click event was outside of button.
|
---@field on_click_outside druid.event The @{DruidEvent}: Event calls if click event was outside of button.
|
||||||
---@field on_double_click druid.event @{DruidEvent}: Event on double tap action over button.
|
---@field on_double_click druid.event The @{DruidEvent}: Event on double tap action over button.
|
||||||
---@field on_hold_callback druid.event @{DruidEvent}: Event calls every frame before on_long_click event.
|
---@field on_hold_callback druid.event The @{DruidEvent}: Event calls every frame before on_long_click event.
|
||||||
---@field on_long_click druid.event @{DruidEvent}: Event on long tap action over button.
|
---@field on_long_click druid.event The @{DruidEvent}: Event on long tap action over button.
|
||||||
---@field on_pressed druid.event @{DruidEvent}: Event triggered if button was pressed by user.
|
---@field on_pressed druid.event The @{DruidEvent}: Event triggered if button was pressed by user.
|
||||||
---@field on_repeated_click druid.event @{DruidEvent}: Event on repeated action over button.
|
---@field on_repeated_click druid.event The @{DruidEvent}: Event on repeated action over button.
|
||||||
---@field params any Custom args for any Button event.
|
---@field params any Custom args for any Button event.
|
||||||
---@field style druid.button.style Component style params.
|
---@field style druid.button.style Component style params.
|
||||||
local druid__button = {}
|
local druid__button = {}
|
||||||
@ -720,7 +720,7 @@ local druid__lang_text = {}
|
|||||||
---@return druid.lang_text Current instance
|
---@return druid.lang_text Current instance
|
||||||
function druid__lang_text.format(self, a, b, c, d, e, f, g) end
|
function druid__lang_text.format(self, a, b, c, d, e, f, g) end
|
||||||
|
|
||||||
--- @{LangText} constructor
|
--- The @{LangText} constructor
|
||||||
---@param self druid.lang_text @{LangText}
|
---@param self druid.lang_text @{LangText}
|
||||||
---@param node string|node Node name or GUI Text Node itself
|
---@param node string|node Node name or GUI Text Node itself
|
||||||
---@param locale_id string Default locale id or text from node as default
|
---@param locale_id string Default locale id or text from node as default
|
||||||
@ -945,13 +945,18 @@ function druid__rich_input.set_placeholder(self, placeholder_text) end
|
|||||||
|
|
||||||
---@class druid.rich_text : druid.base_component
|
---@class druid.rich_text : druid.base_component
|
||||||
---@field component field The component druid instance
|
---@field component field The component druid instance
|
||||||
|
---@field style druid.rich_text.style Component style params.
|
||||||
local druid__rich_text = {}
|
local druid__rich_text = {}
|
||||||
|
|
||||||
--- Clear all created words.
|
--- Clear all created words.
|
||||||
function druid__rich_text.clean() end
|
function druid__rich_text.clear() end
|
||||||
|
|
||||||
|
--- Get current line metrics
|
||||||
|
---@return druid.rich_text.lines_metrics
|
||||||
|
function druid__rich_text.get_line_metric() end
|
||||||
|
|
||||||
--- Get all current words.
|
--- Get all current words.
|
||||||
---@return table Words
|
---@return table druid.rich_text.word[]
|
||||||
function druid__rich_text.get_words() end
|
function druid__rich_text.get_words() end
|
||||||
|
|
||||||
--- Rich Text component constructor
|
--- Rich Text component constructor
|
||||||
@ -967,12 +972,19 @@ function druid__rich_text.init(self, template, nodes) end
|
|||||||
---@return druid.rich_text.lines_metrics line_metrics
|
---@return druid.rich_text.lines_metrics line_metrics
|
||||||
function druid__rich_text.set_text(self, text) end
|
function druid__rich_text.set_text(self, text) end
|
||||||
|
|
||||||
--- Get all words, which has a passed tag
|
--- Get all words, which has a passed tag.
|
||||||
---@param tag string
|
---@param tag string
|
||||||
---@return table Words
|
---@return druid.rich_text.word[] words
|
||||||
function druid__rich_text.tagged(tag) end
|
function druid__rich_text.tagged(tag) end
|
||||||
|
|
||||||
|
|
||||||
|
---@class druid.rich_text.style
|
||||||
|
---@field ADJUST_SCALE_DELTA field Scale step on each height adjust step
|
||||||
|
---@field ADJUST_STEPS field Amount steps of attemps text adjust by height
|
||||||
|
---@field COLORS field Rich Text color aliases
|
||||||
|
local druid__rich_text__style = {}
|
||||||
|
|
||||||
|
|
||||||
---@class druid.scroll : druid.base_component
|
---@class druid.scroll : druid.base_component
|
||||||
---@field available_pos vector4 Available position for content node: (min_x, max_y, max_x, min_y)
|
---@field available_pos vector4 Available position for content node: (min_x, max_y, max_x, min_y)
|
||||||
---@field available_size vector3 Size of available positions: (width, height, 0)
|
---@field available_size vector3 Size of available positions: (width, height, 0)
|
||||||
@ -1217,7 +1229,7 @@ function druid__static_grid.get_pos(self, index) end
|
|||||||
---@return vector3 The grid content size
|
---@return vector3 The grid content size
|
||||||
function druid__static_grid.get_size(self) end
|
function druid__static_grid.get_size(self) end
|
||||||
|
|
||||||
--- @{StaticGrid} constructor
|
--- The @{StaticGrid} constructor
|
||||||
---@param self druid.static_grid @{StaticGrid}
|
---@param self druid.static_grid @{StaticGrid}
|
||||||
---@param parent string|Node The GUI Node container, where grid's items will be placed
|
---@param parent string|Node The GUI Node container, where grid's items will be placed
|
||||||
---@param element node Element prefab. Need to get it size
|
---@param element node Element prefab. Need to get it size
|
||||||
@ -1545,6 +1557,14 @@ function druid_instance.new_progress(self, node, key, init_value) end
|
|||||||
---@return druid.radio_group @{RadioGroup} component
|
---@return druid.radio_group @{RadioGroup} component
|
||||||
function druid_instance.new_radio_group(self, nodes, callback, click_nodes) end
|
function druid_instance.new_radio_group(self, nodes, callback, click_nodes) end
|
||||||
|
|
||||||
|
--- Create @{RichText} component.
|
||||||
|
--- As a template please check rich_text.gui layout.
|
||||||
|
---@param self druid_instance
|
||||||
|
---@param template string Template name if used
|
||||||
|
---@param nodes table Nodes table from gui.clone_tree
|
||||||
|
---@return druid.rich_text @{RichText} component
|
||||||
|
function druid_instance.new_rich_text(self, template, nodes) end
|
||||||
|
|
||||||
--- Create @{Scroll} component
|
--- Create @{Scroll} component
|
||||||
---@param self druid_instance
|
---@param self druid_instance
|
||||||
---@param view_node node GUI view scroll node
|
---@param view_node node GUI view scroll node
|
||||||
@ -1618,12 +1638,14 @@ function druid_instance.remove(self, component) end
|
|||||||
--- If blacklist is not empty and component contains in this list, component will be not processed on input step
|
--- If blacklist is not empty and component contains in this list, component will be not processed on input step
|
||||||
---@param self druid_instance @{DruidInstance}
|
---@param self druid_instance @{DruidInstance}
|
||||||
---@param blacklist_components table|Component The array of component to blacklist
|
---@param blacklist_components table|Component The array of component to blacklist
|
||||||
|
---@return self @{DruidInstance}
|
||||||
function druid_instance.set_blacklist(self, blacklist_components) end
|
function druid_instance.set_blacklist(self, blacklist_components) end
|
||||||
|
|
||||||
--- Set whitelist components for input processing.
|
--- Set whitelist components for input processing.
|
||||||
--- If whitelist is not empty and component not contains in this list, component will be not processed on input step
|
--- If whitelist is not empty and component not contains in this list, component will be not processed on input step
|
||||||
---@param self druid_instance
|
---@param self druid_instance
|
||||||
---@param whitelist_components table|Component The array of component to whitelist
|
---@param whitelist_components table|Component The array of component to whitelist
|
||||||
|
---@return self @{DruidInstance}
|
||||||
function druid_instance.set_whitelist(self, whitelist_components) end
|
function druid_instance.set_whitelist(self, whitelist_components) end
|
||||||
|
|
||||||
--- Call this in gui_script update function.
|
--- Call this in gui_script update function.
|
||||||
@ -1633,30 +1655,15 @@ function druid_instance.set_whitelist(self, whitelist_components) end
|
|||||||
function druid_instance.update(self, dt) end
|
function druid_instance.update(self, dt) end
|
||||||
|
|
||||||
|
|
||||||
---@class formats
|
|
||||||
local formats = {}
|
|
||||||
|
|
||||||
--- Return number with zero number prefix
|
|
||||||
---@param num number Number for conversion
|
|
||||||
---@param count number Count of numerals
|
|
||||||
---@return string with need count of zero (1,3) -> 001
|
|
||||||
function formats.add_prefix_zeros(num, count) end
|
|
||||||
|
|
||||||
--- Convert seconds to string minutes:seconds
|
|
||||||
---@param sec number Seconds
|
|
||||||
---@return string minutes:seconds
|
|
||||||
function formats.second_string_min(sec) end
|
|
||||||
|
|
||||||
--- Interpolate string with named Parameters in Table
|
|
||||||
---@param s string Target string
|
|
||||||
---@param tab table Table with parameters
|
|
||||||
---@return string with replaced parameters
|
|
||||||
function formats.second_string_min(s, tab) end
|
|
||||||
|
|
||||||
|
|
||||||
---@class helper
|
---@class helper
|
||||||
local helper = {}
|
local helper = {}
|
||||||
|
|
||||||
|
--- Add all elements from source array to the target array
|
||||||
|
---@param target table Array to put elements from source
|
||||||
|
---@param source table The source array to get elements from
|
||||||
|
---@return array The target array
|
||||||
|
function helper.add_array(target, source) end
|
||||||
|
|
||||||
--- Centerate nodes by x position with margin.
|
--- Centerate nodes by x position with margin.
|
||||||
--- This functions calculate total width of nodes and set position for each node. The centrate will be around 0 x position.
|
--- This functions calculate total width of nodes and set position for each node. The centrate will be around 0 x position.
|
||||||
---@param margin number Offset between nodes
|
---@param margin number Offset between nodes
|
||||||
@ -1729,7 +1736,7 @@ function helper.get_screen_aspect_koef() end
|
|||||||
|
|
||||||
--- Get text metric from GUI node.
|
--- Get text metric from GUI node.
|
||||||
---@param text_node Node
|
---@param text_node Node
|
||||||
---@return pepepe
|
---@return GUITextMetrics
|
||||||
function helper.get_text_metrics_from_node(text_node) end
|
function helper.get_text_metrics_from_node(text_node) end
|
||||||
|
|
||||||
--- Add value to array with shift policy
|
--- Add value to array with shift policy
|
||||||
@ -1741,12 +1748,6 @@ function helper.get_text_metrics_from_node(text_node) end
|
|||||||
---@return item Inserted item
|
---@return item Inserted item
|
||||||
function helper.insert_with_shift(array, item, index, shift_policy) end
|
function helper.insert_with_shift(array, item, index, shift_policy) end
|
||||||
|
|
||||||
--- Check if node is enabled in GUI hierarchy.
|
|
||||||
--- Return false, if node or any his parent is disabled
|
|
||||||
---@param node node GUI node
|
|
||||||
---@return bool Is enabled in hierarchy
|
|
||||||
function helper.is_enabled(node) end
|
|
||||||
|
|
||||||
--- Check if device is native mobile (Android or iOS)
|
--- Check if device is native mobile (Android or iOS)
|
||||||
---@return bool Is mobile
|
---@return bool Is mobile
|
||||||
function helper.is_mobile() end
|
function helper.is_mobile() end
|
||||||
@ -1796,6 +1797,11 @@ function helper.table_to_string(t) end
|
|||||||
|
|
||||||
-- 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user