mirror of
https://github.com/Insality/druid
synced 2025-06-27 10:27:48 +02:00
Update docs, html example
This commit is contained in:
parent
072507cc9e
commit
cb5df2b5bc
@ -7,3 +7,5 @@ date,sha,version,build_size,build_time,platform,mode,is_cache_using,commits_coun
|
|||||||
2022-03-12T10:01:30Z,d0f3d6641a08b0d6b719b13017aa85907d1667e5,0.8.564,2200,44,js-web,release,true,564
|
2022-03-12T10:01:30Z,d0f3d6641a08b0d6b719b13017aa85907d1667e5,0.8.564,2200,44,js-web,release,true,564
|
||||||
2022-08-29T18:27:58Z,b2643ebd268b15884363efd17724e689279946f1,0.9.589,2316,45,js-web,release,true,589
|
2022-08-29T18:27:58Z,b2643ebd268b15884363efd17724e689279946f1,0.9.589,2316,45,js-web,release,true,589
|
||||||
2022-08-29T18:46:47Z,13003e472169cbd261e703eca7b133adf64a24f7,0.9.592,2316,40,js-web,release,true,592
|
2022-08-29T18:46:47Z,13003e472169cbd261e703eca7b133adf64a24f7,0.9.592,2316,40,js-web,release,true,592
|
||||||
|
2022-09-09T17:55:42Z,072507cc9e715541bdee7636d2e5eeeb3c22a57d,0.10.603,2340,43,js-web,release,true,603
|
||||||
|
2022-09-09T18:00:07Z,072507cc9e715541bdee7636d2e5eeeb3c22a57d,0.10.603,2340,5,js-web,release,true,603
|
||||||
|
|
@ -1 +1 @@
|
|||||||
{"content":[{"name":"game.projectc","size":3808,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":17728,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":421233,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":18513,"pieces":[{"name":"game.dmanifest0","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game.public.der0","offset":0}]}]}
|
{"content":[{"name":"game.projectc","size":3797,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":19808,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":449757,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":20704,"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.9.592
|
version = 0.10.603
|
||||||
write_log = 0
|
write_log = 0
|
||||||
compress_archive = 1
|
compress_archive = 1
|
||||||
publisher = Insality
|
publisher = Insality
|
||||||
developer = Insality
|
developer = Insality
|
||||||
commit_sha = 13003e472169cbd261e703eca7b133adf64a24f7
|
commit_sha = 072507cc9e715541bdee7636d2e5eeeb3c22a57d
|
||||||
build_date = 2022-08-29T18:46:47Z
|
build_date = 2022-09-09T18:00:07Z
|
||||||
title_as_file_name = druid
|
title_as_file_name = druid
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
@ -120,7 +120,7 @@ default_language = en
|
|||||||
localizations = en
|
localizations = en
|
||||||
|
|
||||||
[android]
|
[android]
|
||||||
version_code = 592
|
version_code = 603
|
||||||
minimum_sdk_version = 16
|
minimum_sdk_version = 16
|
||||||
target_sdk_version = 30
|
target_sdk_version = 30
|
||||||
package = com.insality.druid
|
package = com.insality.druid
|
||||||
@ -144,7 +144,7 @@ localizations = en
|
|||||||
custom_heap_size = 0
|
custom_heap_size = 0
|
||||||
heap_size = 64
|
heap_size = 64
|
||||||
htmlfile = /builtins/manifests/web/engine_template.html
|
htmlfile = /builtins/manifests/web/engine_template.html
|
||||||
cssfile = /builtins/manifests/web/light_theme.css
|
cssfile = /example/light_theme.css
|
||||||
archive_location_prefix = archive
|
archive_location_prefix = archive
|
||||||
show_fullscreen_button = 0
|
show_fullscreen_button = 0
|
||||||
show_made_with_defold = 0
|
show_made_with_defold = 0
|
||||||
@ -192,7 +192,7 @@ run_while_iconified = 0
|
|||||||
|
|
||||||
[druid]
|
[druid]
|
||||||
no_auto_input = 0
|
no_auto_input = 0
|
||||||
stencil_check = 0
|
no_stencil_check = 0
|
||||||
no_auto_template = 0
|
no_auto_template = 0
|
||||||
input_text = text
|
input_text = text
|
||||||
input_touch = touch
|
input_touch = touch
|
||||||
|
@ -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.9.592</title>
|
<title>druid 0.10.603</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
|
||||||
@ -115,8 +115,10 @@
|
|||||||
.canvas-app-canvas {
|
.canvas-app-canvas {
|
||||||
background-repeat:no-repeat;
|
background-repeat:no-repeat;
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
|
background-size: contain;
|
||||||
background-image: url("druid_logo.png");
|
background-image: url("druid_logo.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -114,6 +114,10 @@
|
|||||||
<td class="summary">Call on final function on gui_script.</td>
|
<td class="summary">Call on final function on gui_script.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#late_init">late_init(self)</a></td>
|
||||||
|
<td class="summary">Druid late update function call after init and before udpate step</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="name" nowrap><a href="#log_message">log_message(self, message[, context])</a></td>
|
<td class="name" nowrap><a href="#log_message">log_message(self, message[, context])</a></td>
|
||||||
<td class="summary">Log message, if is_debug mode is enabled</td>
|
<td class="summary">Log message, if is_debug mode is enabled</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -268,6 +272,27 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "late_init"></a>
|
||||||
|
<strong>late_init(self)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Druid late update function call after init and before udpate step
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
<span class="types"><span class="type">DruidInstance</span></span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "log_message"></a>
|
<a name = "log_message"></a>
|
||||||
|
@ -30,6 +30,11 @@
|
|||||||
<li><a href="../index.html">Index</a></li>
|
<li><a href="../index.html">Index</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h2>Contents</h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#Functions">Functions</a></li>
|
||||||
|
<li><a href="#Fields">Fields</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<h2>Modules</h2>
|
<h2>Modules</h2>
|
||||||
@ -73,11 +78,377 @@
|
|||||||
<p></p>
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="#Functions">Functions</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<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>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#fit_into_size">fit_into_size(self, target_size)</a></td>
|
||||||
|
<td class="summary">Set size for layout node to fit inside it</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#fit_into_window">fit_into_window(self)</a></td>
|
||||||
|
<td class="summary">Set current size for layout node to fit inside it</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#init">init(self, node, mode[, on_size_changed_callback])</a></td>
|
||||||
|
<td class="summary">Component init function</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_max_size">set_max_size(self, max_size)</a></td>
|
||||||
|
<td class="summary">Set maximum size of layout node</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_min_size">set_min_size(self, min_size)</a></td>
|
||||||
|
<td class="summary">Set minimal size of layout node</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_origin_position">set_origin_position(self, new_origin_position)</a></td>
|
||||||
|
<td class="summary">Set new origin position of layout node.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#set_origin_size">set_origin_size(self, new_origin_size)</a></td>
|
||||||
|
<td class="summary">Set new origin size of layout node.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h2><a href="#Fields">Fields</a></h2>
|
||||||
|
<table class="function_list">
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#mode">mode</a></td>
|
||||||
|
<td class="summary">Current layout mode</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#node">node</a></td>
|
||||||
|
<td class="summary">Layout node</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="name" nowrap><a href="#on_size_changed">on_size_changed</a></td>
|
||||||
|
<td class="summary">On window resize callback(self, new_size)</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "fit_into_node"></a>
|
||||||
|
<strong>fit_into_node(self[, node])</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set node for layout node to fit inside it. Pass nil to reset
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
<span class="types"><span class="type">Layout</span></span>
|
||||||
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">node</span>
|
||||||
|
<span class="types"><span class="type">Node</span></span>
|
||||||
|
|
||||||
|
(<em>optional</em>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">Layout</span></span>
|
||||||
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "fit_into_size"></a>
|
||||||
|
<strong>fit_into_size(self, target_size)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set size for layout node to fit inside it
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
<span class="types"><span class="type">Layout</span></span>
|
||||||
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">target_size</span>
|
||||||
|
<span class="types"><span class="type">vector3</span></span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">Layout</span></span>
|
||||||
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "fit_into_window"></a>
|
||||||
|
<strong>fit_into_window(self)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set current size for layout node to fit inside it
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
<span class="types"><span class="type">Layout</span></span>
|
||||||
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">Layout</span></span>
|
||||||
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "init"></a>
|
||||||
|
<strong>init(self, node, mode[, on_size_changed_callback])</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Component init function
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
<span class="types"><span class="type">Layout</span></span>
|
||||||
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">node</span>
|
||||||
|
<span class="types"><a class="type" href="../modules/Layout.html#node">node</a></span>
|
||||||
|
Gui node
|
||||||
|
</li>
|
||||||
|
<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>
|
||||||
|
The layout mode (from const.LAYOUT_MODE)
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">on_size_changed_callback</span>
|
||||||
|
<span class="types"><span class="type">function</span></span>
|
||||||
|
The callback on window resize
|
||||||
|
(<em>optional</em>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "set_max_size"></a>
|
||||||
|
<strong>set_max_size(self, max_size)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set maximum size of layout node
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
<span class="types"><span class="type">Layout</span></span>
|
||||||
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">max_size</span>
|
||||||
|
<span class="types"><span class="type">vector3</span></span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">Layout</span></span>
|
||||||
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "set_min_size"></a>
|
||||||
|
<strong>set_min_size(self, min_size)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set minimal size of layout node
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
<span class="types"><span class="type">Layout</span></span>
|
||||||
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">min_size</span>
|
||||||
|
<span class="types"><span class="type">vector3</span></span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">Layout</span></span>
|
||||||
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "set_origin_position"></a>
|
||||||
|
<strong>set_origin_position(self, new_origin_position)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set new origin position of layout node. You should apply this on node movement
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
<span class="types"><span class="type">Layout</span></span>
|
||||||
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">new_origin_position</span>
|
||||||
|
<span class="types"><span class="type">vector3</span></span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">Layout</span></span>
|
||||||
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "set_origin_size"></a>
|
||||||
|
<strong>set_origin_size(self, new_origin_size)</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Set new origin size of layout node. You should apply this on node manual size change
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Parameters:</h3>
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">self</span>
|
||||||
|
<span class="types"><span class="type">Layout</span></span>
|
||||||
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
|
</li>
|
||||||
|
<li><span class="parameter">new_origin_size</span>
|
||||||
|
<span class="types"><span class="type">vector3</span></span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Returns:</h3>
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
<span class="types"><span class="type">Layout</span></span>
|
||||||
|
<a href="../modules/Layout.html#">Layout</a>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt>
|
||||||
|
<a name = "mode"></a>
|
||||||
|
<strong>mode</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Current layout mode
|
||||||
|
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "node"></a>
|
||||||
|
<strong>node</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Layout node
|
||||||
|
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">node</span>
|
||||||
|
<span class="types"><a class="type" href="../modules/Layout.html#node">node</a></span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
<a name = "on_size_changed"></a>
|
||||||
|
<strong>on_size_changed</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
On window resize callback(self, new_size)
|
||||||
|
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><span class="parameter">on_size_changed</span>
|
||||||
|
<span class="types"><span class="type">DruidEvent</span></span>
|
||||||
|
<a href="../modules/DruidEvent.html#">DruidEvent</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
</div> <!-- id="content" -->
|
</div> <!-- id="content" -->
|
||||||
|
@ -395,7 +395,7 @@ Take care of yourself
|
|||||||
|
|
||||||
### Druid 0.10.0
|
### Druid 0.10.0
|
||||||
|
|
||||||
Hello! Here is new Druid small update. It's brings to you two new components: Layout and Hotkey. Both components are "extended", so to use it, you should register it first (when you try to use it, in console will be prompt with code you should use)
|
Hello! Here is new Druid update. It's brings to you two new components: Layout and Hotkey. Both components are "extended", so to use it, you should register it first (when you try to use it, in console will be prompt with code you should use)
|
||||||
|
|
||||||
In general:
|
In general:
|
||||||
```
|
```
|
||||||
@ -403,9 +403,13 @@ local layout = require("druid.extended.layout")
|
|||||||
druid.register("layout", layout)
|
druid.register("layout", layout)
|
||||||
```
|
```
|
||||||
|
|
||||||
The drag component now knows about window scaling, so now it have more accuracy dx/dy values depends on the screen size. The scroll and other components should work better :)
|
The Drag component now knows about window scaling, so now it have more accuracy dx/dy values depends on the screen size. The scroll and other components should work better :)
|
||||||
|
|
||||||
Also now you can change the input priority of components temporary. For example while you interact with them (input fields, drag on select etc).
|
Now you can change the input priority of components temporary. For example while you interact with them (input fields, drag on select etc).
|
||||||
|
|
||||||
|
Also the update brings several bug fixes and now **Druid** have stencil_check mode enabled by default. It should be more easy to use input components with stencil nodes without manual `set_click_zone` functions.
|
||||||
|
|
||||||
|
And yeah, the new **Druid** logo is here!
|
||||||
|
|
||||||
**Changelog 0.10.0**
|
**Changelog 0.10.0**
|
||||||
|
|
||||||
@ -414,7 +418,7 @@ Also now you can change the input priority of components temporary. For example
|
|||||||
- **#133** [Hotkey] Add new extended component: Hotkey
|
- **#133** [Hotkey] Add new extended component: Hotkey
|
||||||
- It's allow you set hotkeys to call callbacks
|
- It's allow you set hotkeys to call callbacks
|
||||||
- You should pass one action key and several modificator keys (left shift, right ctrl etc)
|
- You should pass one action key and several modificator keys (left shift, right ctrl etc)
|
||||||
- List of modificator keys setup via component style (you can change it)
|
- List of modificator keys ids setup via component style (you can change it)
|
||||||
- You can add several hotkeys on one callback via `hotkey:add_hotkey` with additional params
|
- You can add several hotkeys on one callback via `hotkey:add_hotkey` with additional params
|
||||||
- **#98** [Layout] Add new extended component: Layout
|
- **#98** [Layout] Add new extended component: Layout
|
||||||
- It's allow you to extend standart Defold node adjust modes
|
- It's allow you to extend standart Defold node adjust modes
|
||||||
@ -436,8 +440,9 @@ Also now you can change the input priority of components temporary. For example
|
|||||||
- **#190** [Progress] Add `progress:set_max_size` function to change max size of progress bar
|
- **#190** [Progress] Add `progress:set_max_size` function to change max size of progress bar
|
||||||
- **#188** [Drag] Add two values passed to on_drag callback. Now it is `on_drag(self, dx, dy, total_x, total_y)` to check the overral drag distance
|
- **#188** [Drag] Add two values passed to on_drag callback. Now it is `on_drag(self, dx, dy, total_x, total_y)` to check the overral drag distance
|
||||||
- **#195** [Drag] Add `drag:is_enabled` and `drag:set_enabled` to enable/disable drag input component
|
- **#195** [Drag] Add `drag:is_enabled` and `drag:set_enabled` to enable/disable drag input component
|
||||||
- **#186** [Grid] Fix: Method set_in_row works incorrectly with IS_DYNAMIC_NODE_POSES style option
|
- **#186** [Grid] Fix: Method `set_in_row` works incorrectly with IS_DYNAMIC_NODE_POSES style option
|
||||||
- **#185** [System] Add `on_window_resized` component interest. It will called on game window size changes
|
- **#185** [System] Add `on_window_resized` component interest. It will called on game window size changes
|
||||||
- **#189** [System] Add optional flag to `component:set_input_priority` to mark it as temporary. It will reset to default input priority after the `component:reset_input_priority`
|
- **#189** [System] Add optional flag to `component:set_input_priority` to mark it as temporary. It will reset to default input priority after the `component:reset_input_priority`
|
||||||
- **#204** [System] Fix: wrong code example link, if open example from direct URL
|
- **#204** [System] Fix: wrong code example link, if open example from direct URL
|
||||||
- **#202** [System] Enabled stencil check to true by default. To disable this, use druid.no_stencil_check in game.project settings
|
- **#202** [System] Enabled stencil check to true by default. To disable this, use `druid.no_stencil_check` in game.project settings
|
||||||
|
- [Examples] Add layout, layout fit, progres bar, data list + component examples
|
||||||
|
@ -763,6 +763,64 @@ function druid__lang_text.set_to(self, text) end
|
|||||||
function druid__lang_text.translate(self, locale_id, a, b, c, d, e, f, g) end
|
function druid__lang_text.translate(self, locale_id, a, b, c, d, e, f, g) end
|
||||||
|
|
||||||
|
|
||||||
|
---@class druid.layout : druid.base_component
|
||||||
|
---@field mode string Current layout mode
|
||||||
|
---@field node node Layout node
|
||||||
|
---@field on_size_changed druid.event On window resize callback(self, new_size)
|
||||||
|
local druid__layout = {}
|
||||||
|
|
||||||
|
--- Set node for layout node to fit inside it.
|
||||||
|
--- Pass nil to reset
|
||||||
|
---@param self druid.layout @{Layout}
|
||||||
|
---@param node Node
|
||||||
|
---@return druid.layout @{Layout}
|
||||||
|
function druid__layout.fit_into_node(self, node) end
|
||||||
|
|
||||||
|
--- Set size for layout node to fit inside it
|
||||||
|
---@param self druid.layout @{Layout}
|
||||||
|
---@param target_size vector3
|
||||||
|
---@return druid.layout @{Layout}
|
||||||
|
function druid__layout.fit_into_size(self, target_size) end
|
||||||
|
|
||||||
|
--- Set current size for layout node to fit inside it
|
||||||
|
---@param self druid.layout @{Layout}
|
||||||
|
---@return druid.layout @{Layout}
|
||||||
|
function druid__layout.fit_into_window(self) end
|
||||||
|
|
||||||
|
--- Component init function
|
||||||
|
---@param self druid.layout @{Layout}
|
||||||
|
---@param node node Gui node
|
||||||
|
---@param mode string The layout mode (from const.LAYOUT_MODE)
|
||||||
|
---@param on_size_changed_callback function The callback on window resize
|
||||||
|
function druid__layout.init(self, node, mode, on_size_changed_callback) end
|
||||||
|
|
||||||
|
--- Set maximum size of layout node
|
||||||
|
---@param self druid.layout @{Layout}
|
||||||
|
---@param max_size vector3
|
||||||
|
---@return druid.layout @{Layout}
|
||||||
|
function druid__layout.set_max_size(self, max_size) end
|
||||||
|
|
||||||
|
--- Set minimal size of layout node
|
||||||
|
---@param self druid.layout @{Layout}
|
||||||
|
---@param min_size vector3
|
||||||
|
---@return druid.layout @{Layout}
|
||||||
|
function druid__layout.set_min_size(self, min_size) end
|
||||||
|
|
||||||
|
--- Set new origin position of layout node.
|
||||||
|
--- You should apply this on node movement
|
||||||
|
---@param self druid.layout @{Layout}
|
||||||
|
---@param new_origin_position vector3
|
||||||
|
---@return druid.layout @{Layout}
|
||||||
|
function druid__layout.set_origin_position(self, new_origin_position) end
|
||||||
|
|
||||||
|
--- Set new origin size of layout node.
|
||||||
|
--- You should apply this on node manual size change
|
||||||
|
---@param self druid.layout @{Layout}
|
||||||
|
---@param new_origin_size vector3
|
||||||
|
---@return druid.layout @{Layout}
|
||||||
|
function druid__layout.set_origin_size(self, new_origin_size) end
|
||||||
|
|
||||||
|
|
||||||
---@class druid.pin_knob : druid.base_component
|
---@class druid.pin_knob : druid.base_component
|
||||||
---@field druid druid_instance The component druid instance
|
---@field druid druid_instance The component druid instance
|
||||||
---@field is_drag bool Is currently under user control
|
---@field is_drag bool Is currently under user control
|
||||||
@ -1347,6 +1405,10 @@ local druid_instance = {}
|
|||||||
---@param self druid_instance
|
---@param self druid_instance
|
||||||
function druid_instance.final(self) end
|
function druid_instance.final(self) end
|
||||||
|
|
||||||
|
--- Druid late update function call after init and before udpate step
|
||||||
|
---@param self druid_instance
|
||||||
|
function druid_instance.late_init(self) end
|
||||||
|
|
||||||
--- Log message, if is_debug mode is enabled
|
--- Log message, if is_debug mode is enabled
|
||||||
---@param self druid_instance @{DruidInstance}
|
---@param self druid_instance @{DruidInstance}
|
||||||
---@param message string
|
---@param message string
|
||||||
|
@ -29,7 +29,7 @@ local Layout = component.create("layout")
|
|||||||
--- Component init function
|
--- Component init function
|
||||||
-- @tparam Layout self @{Layout}
|
-- @tparam Layout self @{Layout}
|
||||||
-- @tparam node node Gui node
|
-- @tparam node node Gui node
|
||||||
-- @tparam string node 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[opt] function 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)
|
||||||
@ -122,7 +122,7 @@ end
|
|||||||
|
|
||||||
--- Set maximum size of layout node
|
--- Set maximum size of layout node
|
||||||
-- @tparam Layout self @{Layout}
|
-- @tparam Layout self @{Layout}
|
||||||
-- @tparam vector3 min_size
|
-- @tparam vector3 max_size
|
||||||
-- @treturn Layout @{Layout}
|
-- @treturn Layout @{Layout}
|
||||||
function Layout.set_max_size(self, max_size)
|
function Layout.set_max_size(self, max_size)
|
||||||
self._max_size = max_size
|
self._max_size = max_size
|
||||||
|
@ -12,7 +12,7 @@ dynamic_orientation = 1
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
title = druid
|
title = druid
|
||||||
version = 0.9.0
|
version = 0.10.0
|
||||||
publisher = Insality
|
publisher = Insality
|
||||||
developer = Insality
|
developer = Insality
|
||||||
dependencies#0 = https://github.com/insalitygames/deftest/archive/master.zip
|
dependencies#0 = https://github.com/insalitygames/deftest/archive/master.zip
|
||||||
|
Loading…
x
Reference in New Issue
Block a user