Prepare for release 0.8.0

This commit is contained in:
Insality 2022-02-12 17:02:27 +02:00
parent a75dd5a6f9
commit 4e0fd264b1
39 changed files with 280 additions and 175 deletions

View File

@ -71,7 +71,7 @@ function druid__back_handler.on_input(self, action_id, action) end
---@class druid.base_component
---@field ALL field Component Interests
---@field ON_INPUT field Component Interests
local druid__base_component = {}
--- Return all children components, recursive
@ -268,13 +268,15 @@ function druid__checkbox.get_state(self) end
---@param node node Gui node
---@param callback function Checkbox callback
---@param click_node node Trigger node, by default equals to node
function druid__checkbox.init(self, node, callback, click_node) end
---@param initial_state boolean The initial state of checkbox, default - false
function druid__checkbox.init(self, node, callback, click_node, initial_state) end
--- Set checkbox state
---@param self druid.checkbox
---@param state bool Checkbox state
---@param is_silent bool Don't trigger on_change_state if true
function druid__checkbox.set_state(self, state, is_silent) end
---@param is_instant bool If instant checkbox change
function druid__checkbox.set_state(self, state, is_silent, is_instant) end
---@class druid.checkbox.style
@ -527,7 +529,7 @@ function druid__hover.set_mouse_hover(self, state) end
---@field on_input_full druid_event On input field text change to max length string callback(self, input_text)
---@field on_input_select druid_event On input field select callback(self, button_node)
---@field on_input_text druid_event On input field text change callback(self, input_text)
---@field on_input_unselect druid_event On input field unselect callback(self, button_node)
---@field on_input_unselect druid_event On input field unselect callback(self, input_text)
---@field on_input_wrong druid_event On trying user input with not allowed character callback(self, params, button_instance)
---@field style druid.input.style Component style params.
---@field text druid.text Text component
@ -584,22 +586,31 @@ local druid__input__style = {}
---@field text Text The text component
local druid__lang_text = {}
--- Format string with new text params on localized text
---@param self druid.lang_text
---@param ... string Locale arguments to pass in text function
---@return druid.lang_text Current instance
function druid__lang_text.format(self, ...) end
--- Component init function
---@param self druid.lang_text
---@param node node The text node
---@param locale_id string Default locale id, optional
---@param locale_id string Default locale id or text from node as default
---@param no_adjust bool If true, will not correct text size
function druid__lang_text.init(self, node, locale_id, no_adjust) end
--- Setup raw text to lang_text component
---@param self druid.lang_text
---@param text string Text for text node
---@return druid.lang_text Current instance
function druid__lang_text.set_to(self, text) end
--- Translate the text by locale_id
---@param self druid.lang_text
---@param locale_id string Locale id
function druid__lang_text.translate(self, locale_id) end
---@param ... string Locale arguments to pass in text function
---@return druid.lang_text Current instance
function druid__lang_text.translate(self, locale_id, ...) end
---@class druid.progress : druid.base_component
@ -937,6 +948,7 @@ function druid__static_grid.set_position_function(self, callback) end
---@class druid.static_grid.style
---@field IS_ALIGN_LAST_ROW field If true, always align last row of the grid as grid pivot sets
---@field IS_DYNAMIC_NODE_POSES field If true, always center grid content as grid pivot sets
local druid__static_grid__style = {}
@ -1092,7 +1104,7 @@ function druid__timer.set_to(self, set_to) end
---@class druid_const
---@field ALL field Component Interests
---@field ON_INPUT field Component Interests
local druid_const = {}
@ -1184,8 +1196,9 @@ function druid_instance.new_button(self, node, callback, params, anim_node) end
---@param node node Gui node
---@param callback function Checkbox callback
---@param click_node node Trigger node, by default equals to node
---@param initial_state boolean The initial state of checkbox, default - false
---@return druid.checkbox checkbox component
function druid_instance.new_checkbox(self, node, callback, click_node) end
function druid_instance.new_checkbox(self, node, callback, click_node, initial_state) end
--- Create checkbox_group component
---@param self druid_instance

View File

@ -1 +1 @@
{"content":[{"name":"game.projectc","size":3748,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":13488,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":948341,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":13875,"pieces":[{"name":"game.dmanifest0","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game.public.der0","offset":0}]}]}
{"content":[{"name":"game.projectc","size":3748,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":13488,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":948337,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":13875,"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.

View File

@ -1,12 +1,12 @@
[project]
title = druid
version = 0.7.499
version = 0.8.518
write_log = 0
compress_archive = 1
publisher = Insality
developer = Insality
commit_sha = 1ae77e727fd29b01a514e73820b3e02213aeb7db
build_time = 2021-10-23T14:38:03Z
commit_sha = a75dd5a6f9b00345cb370451b473df678a3fee7d
build_time = 2022-02-12T15:00:03Z
[display]
width = 600
@ -121,7 +121,7 @@ default_language = en
localizations = en
[android]
version_code = 499
version_code = 518
minimum_sdk_version = 16
target_sdk_version = 30
package = com.insality.druid

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
<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 -->
<title>druid 0.7.499</title>
<title>druid 0.8.518</title>
<style type='text/css'>
/* Disable user selection to avoid strange bug in Chrome on Windows:
* Selecting a text outside the canvas, then clicking+draging would

View File

@ -169,7 +169,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -149,11 +149,11 @@
</li>
<li><span class="parameter">action_id</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
on_input action id
</li>
<li><span class="parameter">action</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
on_input action
</li>
</ul>
@ -214,7 +214,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -141,7 +141,7 @@
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#ALL">ALL</a></td>
<td class="name" nowrap><a href="#ON_INPUT">ON_INPUT</a></td>
<td class="summary">Component Interests</td>
</tr>
</table>
@ -170,7 +170,7 @@
</li>
<li><span class="parameter">druid_style</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Druid style module
</li>
</ul>
@ -195,7 +195,7 @@
</li>
<li><span class="parameter">template</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
BaseComponent template name
</li>
</ul>
@ -220,7 +220,7 @@
</li>
<li><span class="parameter">nodes</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
BaseComponent nodes table
</li>
</ul>
@ -249,7 +249,7 @@
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
BaseComponent context
</ol>
@ -275,7 +275,7 @@
</li>
<li><span class="parameter">node_or_name</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
Node name or node itself
</li>
</ul>
@ -338,7 +338,7 @@
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
The component name
</ol>
@ -532,15 +532,15 @@
</li>
<li><span class="parameter">druid_instance</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
The parent druid instance
</li>
<li><span class="parameter">context</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Druid context. Usually it is self of script
</li>
<li><span class="parameter">style</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Druid style module
</li>
</ul>
@ -575,7 +575,7 @@
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">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 of childrens if the Druid component instance
</ol>
@ -588,8 +588,8 @@
<dl class="function">
<dt>
<a name = "ALL"></a>
<strong>ALL</strong>
<a name = "ON_INPUT"></a>
<strong>ON_INPUT</strong>
</dt>
<dd>
Component Interests
@ -608,7 +608,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -212,7 +212,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -207,7 +207,7 @@
Button callback
</li>
<li><span class="parameter">params</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Button callback params
(<em>optional</em>)
</li>
@ -775,7 +775,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -78,11 +78,11 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#init">init(self, node, callback[, click_node=node])</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>
</tr>
<tr>
<td class="name" nowrap><a href="#set_state">set_state(self, state, is_silent)</a></td>
<td class="name" nowrap><a href="#set_state">set_state(self, state, is_silent, is_instant)</a></td>
<td class="summary">Set checkbox state</td>
</tr>
<tr>
@ -126,7 +126,7 @@
<dl class="function">
<dt>
<a name = "init"></a>
<strong>init(self, node, callback[, click_node=node])</strong>
<strong>init(self, node, callback[, click_node=node[, initial_state=false]])</strong>
</dt>
<dd>
Component init function
@ -151,6 +151,11 @@
Trigger node, by default equals to node
(<em>default</em> node)
</li>
<li><span class="parameter">initial_state</span>
<span class="types"><span class="type">boolean</span></span>
The initial state of checkbox, default - false
(<em>default</em> false)
</li>
</ul>
@ -160,7 +165,7 @@
</dd>
<dt>
<a name = "set_state"></a>
<strong>set_state(self, state, is_silent)</strong>
<strong>set_state(self, state, is_silent, is_instant)</strong>
</dt>
<dd>
Set checkbox state
@ -180,6 +185,10 @@
<span class="types"><span class="type">bool</span></span>
Don't trigger on_change_state if true
</li>
<li><span class="parameter">is_instant</span>
<span class="types"><span class="type">bool</span></span>
If instant checkbox change
</li>
</ul>
@ -333,7 +342,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -228,7 +228,7 @@
<ul>
<li><span class="parameter">checkboxes</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
</li>
</ul>
@ -245,7 +245,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -218,7 +218,7 @@
</li>
<li><span class="parameter">data</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
The new data array
</li>
</ul>
@ -333,7 +333,7 @@
</li>
<li><span class="parameter">data</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
</li>
</ul>
@ -499,7 +499,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -489,7 +489,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -152,7 +152,7 @@
Callback itself
</li>
<li><span class="parameter">context</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Additional context as first param to callback call
</li>
</ul>
@ -181,7 +181,7 @@
Callback itself
</li>
<li><span class="parameter">context</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Additional context as first param to callback call
</li>
</ul>
@ -271,7 +271,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -209,7 +209,7 @@
<td class="summary">Create slider component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#new_checkbox">new_checkbox(self, node, callback[, click_node=node])</a></td>
<td class="name" nowrap><a href="#new_checkbox">new_checkbox(self, node, callback[, click_node=node[, initial_state=false]])</a></td>
<td class="summary">Create checkbox component</td>
</tr>
<tr>
@ -260,11 +260,11 @@
</li>
<li><span class="parameter">context</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Druid context. Usually it is self of script
</li>
<li><span class="parameter">style</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Druid style module
</li>
</ul>
@ -395,7 +395,7 @@
Action_id from on_input
</li>
<li><span class="parameter">action</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Action from on_input
</li>
</ul>
@ -430,7 +430,7 @@
Message_id from on_message
</li>
<li><span class="parameter">message</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Message from on_message
</li>
<li><span class="parameter">sender</span>
@ -550,7 +550,7 @@
</li>
<li><span class="parameter">whitelist_components</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">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">Component</span></span>
The array of component to whitelist
(<em>default</em> nil)
</li>
@ -578,7 +578,7 @@
</li>
<li><span class="parameter">blacklist_components</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">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">Component</span></span>
The array of component to blacklist
(<em>default</em> nil)
</li>
@ -612,7 +612,7 @@
Button callback
</li>
<li><span class="parameter">params</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Button callback params
(<em>optional</em>)
</li>
@ -755,7 +755,7 @@
Gui text node
</li>
<li><span class="parameter">value</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
Initial text. Default value is node text from GUI scene.
(<em>optional</em>)
</li>
@ -1013,7 +1013,7 @@
The text node
</li>
<li><span class="parameter">locale_id</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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
</li>
<li><span class="parameter">no_adjust</span>
@ -1075,7 +1075,7 @@
</dd>
<dt>
<a name = "new_checkbox"></a>
<strong>new_checkbox(self, node, callback[, click_node=node])</strong>
<strong>new_checkbox(self, node, callback[, click_node=node[, initial_state=false]])</strong>
</dt>
<dd>
Create checkbox component
@ -1100,6 +1100,11 @@
Trigger node, by default equals to node
(<em>default</em> node)
</li>
<li><span class="parameter">initial_state</span>
<span class="types"><span class="type">boolean</span></span>
The initial state of checkbox, default - false
(<em>default</em> false)
</li>
</ul>
<h3>Returns:</h3>
@ -1328,11 +1333,11 @@
</li>
<li><span class="parameter">node</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
Progress bar fill node or node name
</li>
<li><span class="parameter">key</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
Progress bar direction: const.SIDE.X or const.SIDE.Y
</li>
<li><span class="parameter">init_value</span>
@ -1360,7 +1365,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -786,7 +786,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -330,7 +330,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -126,7 +126,7 @@
</tr>
<tr>
<td class="name" nowrap><a href="#on_input_unselect">on_input_unselect</a></td>
<td class="summary">On input field unselect callback(self, button_node)</td>
<td class="summary">On input field unselect callback(self, input_text)</td>
</tr>
<tr>
<td class="name" nowrap><a href="#on_input_text">on_input_text</a></td>
@ -196,7 +196,7 @@
</li>
<li><span class="parameter">input_text</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
The string to apply for input field
</li>
</ul>
@ -267,7 +267,7 @@
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
The current input field text
</ol>
@ -324,7 +324,7 @@
</li>
<li><span class="parameter">characters</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
Regulax exp. for validate user input
</li>
</ul>
@ -383,7 +383,7 @@
(<em>default</em> false)
</li>
<li><span class="parameter">MASK_DEFAULT_CHAR</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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 character mask for password input
(<em>default</em> *)
</li>
@ -405,7 +405,7 @@
(self, button_node) Callback on wrong user input
</li>
<li><span class="parameter">button_style</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Custom button style for input node
</li>
</ul>
@ -444,7 +444,7 @@
<strong>on_input_unselect</strong>
</dt>
<dd>
On input field unselect callback(self, button_node)
On input field unselect callback(self, input_text)
<ul>
@ -650,7 +650,7 @@
<ul>
<li><span class="parameter">allowerd_characters</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
(<em>optional</em>)
</li>
@ -688,7 +688,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -86,9 +86,13 @@
<td class="summary">Setup raw text to lang_text component</td>
</tr>
<tr>
<td class="name" nowrap><a href="#translate">translate(self, locale_id)</a></td>
<td class="name" nowrap><a href="#translate">translate(self, locale_id, ...)</a></td>
<td class="summary">Translate the text by locale_id</td>
</tr>
<tr>
<td class="name" nowrap><a href="#format">format(self, ...)</a></td>
<td class="summary">Format string with new text params on localized text</td>
</tr>
</table>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
@ -128,8 +132,8 @@
The text node
</li>
<li><span class="parameter">locale_id</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
Default locale id, optional
<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
</li>
<li><span class="parameter">no_adjust</span>
<span class="types"><span class="type">bool</span></span>
@ -157,11 +161,17 @@
</li>
<li><span class="parameter">text</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
Text for text node
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">LangText</span></span>
Current instance
</ol>
@ -169,7 +179,7 @@
</dd>
<dt>
<a name = "translate"></a>
<strong>translate(self, locale_id)</strong>
<strong>translate(self, locale_id, ...)</strong>
</dt>
<dd>
Translate the text by locale_id
@ -182,11 +192,52 @@
</li>
<li><span class="parameter">locale_id</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
Locale id
</li>
<li><span class="parameter">...</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
Locale arguments to pass in text function
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">LangText</span></span>
Current instance
</ol>
</dd>
<dt>
<a name = "format"></a>
<strong>format(self, ...)</strong>
</dt>
<dd>
Format string with new text params on localized text
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><span class="type">LangText</span></span>
</li>
<li><span class="parameter">...</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
Locale arguments to pass in text function
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">LangText</span></span>
Current instance
</ol>
@ -243,7 +294,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -168,11 +168,11 @@
</li>
<li><span class="parameter">node</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a> or <a class="type" href="../modules/Progress.html#node">node</a></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/Progress.html#node">node</a></span>
Progress bar fill node or node name
</li>
<li><span class="parameter">key</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
Progress bar direction: const.SIDE.X or const.SIDE.Y
</li>
<li><span class="parameter">init_value</span>
@ -425,7 +425,7 @@
<ul>
<li><span class="parameter">key</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
</li>
</ul>
@ -522,7 +522,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -245,7 +245,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -555,7 +555,7 @@
</li>
<li><span class="parameter">points</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">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 of vector3 points
</li>
</ul>
@ -1118,7 +1118,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -421,7 +421,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -619,6 +619,11 @@
If true, always center grid content as grid pivot sets
(<em>default</em> false)
</li>
<li><span class="parameter">IS_ALIGN_LAST_ROW</span>
<span class="types"><span class="type">bool</span></span>
If true, always align last row of the grid as grid pivot sets
(<em>default</em> false)
</li>
</ul>
@ -877,7 +882,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -283,7 +283,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -209,7 +209,7 @@
Gui text node
</li>
<li><span class="parameter">value</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
Initial text. Default value is node text from GUI scene.
(<em>optional</em>)
</li>
@ -240,7 +240,7 @@
</li>
<li><span class="parameter">text</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
(<em>optional</em>)
</li>
@ -266,7 +266,7 @@
</li>
<li><span class="parameter">set_to</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
Text for node
</li>
</ul>
@ -547,12 +547,12 @@
<h3>Fields:</h3>
<ul>
<li><span class="parameter">TRIM_POSTFIX</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
The postfix for TRIM adjust type
(<em>default</em> ...)
</li>
<li><span class="parameter">DEFAULT_ADJUST</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
The default adjust type for any text component
(<em>default</em> DOWNSCALE)
</li>
@ -814,7 +814,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -403,7 +403,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -370,7 +370,7 @@
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">message</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
The deprecated message
</li>
</ul>
@ -387,7 +387,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -142,11 +142,11 @@
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">name</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
module name
</li>
<li><span class="parameter">module</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
lua table with component
</li>
</ul>
@ -167,11 +167,11 @@
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">context</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Druid context. Usually it is self of script
</li>
<li><span class="parameter">style</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Druid style module
(<em>optional</em>)
</li>
@ -199,7 +199,7 @@
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">style</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Druid style module
</li>
</ul>
@ -268,7 +268,7 @@
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">event</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
Event param from window listener
</li>
</ul>
@ -314,7 +314,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
<i style="float:right;">Last updated 2022-02-12 16:59:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -19,52 +19,53 @@ local M = component.create("my_component")
function M.init(self, ...)
end
-- Call only if exist interest: component.ON_UPDATE
-- [OPTIONAL] If declared, will call this on script.update function
function M.update(self, dt)
end
-- Call only if exist interest: component.ON_INPUT
-- [OPTIONAL] If declared, will call this on script.on_input function
function M.on_input(self, action_id, action)
end
-- Call on component creation and on component:set_style() function
-- [OPTIONAL] If declared, will call on component creation and on component:set_style() function
function M.on_style_change(self, style)
end
-- Call only if exist interest: component.ON_MESSAGE
-- [OPTIONAL] If declared, will call this on script.on_message function
function M.on_message(self, message_id, message, sender)
end
-- Call only if component with ON_LANGUAGE_CHANGE interest
-- [OPTIONAL] If declared, will call this on druid.on_language_change call
function M.on_language_change(self)
end
-- Call only if component with ON_MESSAGE_INPUT interest
-- [OPTIONAL] If declared, will call this on const.ON_MESSAGE_INPUT message to Druid script instance
function M.on_message_input(self, node_id, message)
end
-- Call only if component with ON_LAYOUT_CHANGE interest
-- [OPTIONAL] If declared, will call this on layout changing
function M.on_layout_change(self)
end
-- Call, if input was capturing before this component
-- [OPTIONAL] If declared, will call this on layout changing, if input was capturing before this component
-- Example: scroll is start scrolling, so you need unhover button
function M.on_input_interrupt(self)
end
-- Call, if game lost focus. Need ON_FOCUS_LOST intereset
-- [OPTIONAL] If declared, will call this if game lost focus
function M.on_focus_lost(self)
end
-- Call, if game gained focus. Need ON_FOCUS_GAINED intereset
-- [OPTIONAL] If declared, will call this if game gained focus
function M.on_focus_gained(self)
end
-- Call only if exist interest: component.ON_LATE_INIT
-- [OPTIONAL] If declared, will call this if late init step (first frame on update)
function M.on_late_init(self)
end
-- Call on component remove or on druid:final
-- [OPTIONAL] If declared, will call this on component remove from Druid instance
function M.on_remove(self)
end
@ -100,29 +101,6 @@ function init(self)
end
```
### Interest
Interest - is a way to indicate what events your component will respond to.
There is next interests in druid:
- **ON_MESSAGE** - component will receive messages from on_message
- **ON_UPDATE** - component will be updated from update
- **ON_INPUT_HIGH** - component will receive input from on_input, before other components with ON_INPUT
- **ON_INPUT** - component will receive input from on_input, after other components with ON_INPUT_HIGH
- **ON_LANGUAGE_CHANGE** - will call _on_language_change_ function on language change trigger
- **ON_MESSAGE_INPUT** - will call _on_message_input_ function on Druid _const.ON_MESSAGE_INPUT_ message
- **ON_LAYOUT_CHANGE** will call _on_layout_change_ function on layout change trigger
- **ON_FOCUS_LOST** will call _on_focust_lost_ function in on focus lost event. You need to pass window_callback to global `druid:on_window_callback`
- **ON_FOCUS_GAINED** will call _on_focust_gained_ function in on focus gained event. You need to pass window_callback to global `druid:on_window_callback`
- **ON_LATE_INIT** will call _on_late_init_ function once after component init on update step.
## Best practice on custom components
On each component recommended describe component scheme in next way:
@ -160,4 +138,4 @@ end
## Power of using templates
You can use one component, but creating and customizing templates for them. Templates only requires to match the component scheme.
You can use one component, but creating and customizing templates for them. Templates only requires to match the component scheme.

View File

@ -184,7 +184,7 @@ Have a good day.
- Lang text now can be initialized without default locale id
- Input component: rename field _selected_ to _is_selected_ (according to the docs)
- **#92** Setup repo for CI and unit tests. (Yea, successful build and tests badges!)
- **#86** Fix a lot of event triggers on scroll inertia moving
- **#86** Fix a lot of event triggers on scroll inertia moving
- **#101** Fix scroll to other node instead of swipe direction with scroll's points of interest (without inert settings)
- **#103** Add `helper.centate_nodes` function. It can horizontal align several Box and Text nodes
- **#105** Add `Input:select` and `Input:unselect` function.
@ -269,4 +269,48 @@ Good luck!
- **#144** [Scroll] Fix some glitches with scroll Points of Interest. Remove false detection of scroll stopped.
- **#142** [Scroll] Add Scroll style param `WHEEL_SCROLL_BY_INERTION` (default - false). If true - mouse wheel will add inertion to scroll, if false - set position directly per mouse wheel event.
- This fix caused because Mac trackpad seems have additional mouse wheel events for simulate inertion. If you uncomfortable with this, you can disable `WHEEL_SCROLL_BY_INERTION` for more controllable scroll by mouse wheel.
- **#132** Add example with grid add/remove with animations
- **#132** Add example with grid add/remove with animations
### Druid 0.8.0
Hello!
In this Druid update no any huge special features. Mostly the bug fixes and reworking the component's interest points. If you used interests in your custom components, you should remove it from `component.create` and all should works as before.
Also added last row allignment in Static Grid component with "dynamic content poses" style enabled. You can look how it is work here: https://insality.github.io/druid/druid/?example=grid_static_grid_dynamic_pos
You can say thanks to me via stars on GitHub 3! :wink:
Wanna something more? [Add an issues!](https://github.com/Insality/druid/issues)
Have a nice day!
**Changelog 0.8.0**
---
- **#160** __[BREAKING]__ Remove component interests list
- The component interests now setup via function declaration inside your components. The functions are still the same.
- Now `component.create` function have next signature: _create(component_name, input_priority)_
- Your should remove interests list from your custom components if exists
- From `component.create("custom", { component.ON_INPUT, component.ON_LATE_INIT }, const.PRIORITY_INPUT_HIGH)` to
`component.create("custom", const.PRIORITY_INPUT_HIGH)`
- **#166** [Input] Fix issue with Cyrillic symbols in range "[А-я]"
- **#162** [Static Grid] Add last row alignment with dynamic content poses enabled
- Add style param: _static_grid.IS_ALIGN_LAST_ROW_, true by default. Works only if _static_grid.IS_DYNAMIC_NODE_POSES_ enabled. See the "Static grid with dynamic poses" example.
- **#163** [Lang Text] Set default locale_id value from text node
- **#147** [Lang Text] Remove `...` from lang_text to fixed arguments, add _format_ function to change only string format arguments
- There are some issues with `...`. Now Lang Text will support up to 7 _string.format_ arguments
- [Lang Text] Add more self chaining to Lang text component (_set_to_, _translate_ and _format_ functions)
- **#151** [Text] Fix text adjust by height
- It still have not perfect fitting, but it's good enough!
- **#164 #150** [Scroll] Fix `scroll:scroll_to_percent` by Y position
- **#148** [Scroll] Remove scroll inertion after scroll `animate` or `set_to` functions
- [Input] Add current text argument to _on_input_unselect_ event
- **#152** [Checkbox] Add _is_instant_ argument to `set_state` function
- Add _initial_state_ argument to Checkbox component constructor
- **#149** [Button] Call button style functions after actual callback
- **#153** System: Mode Druid acquire input to late_init step
- Required to solve issues, when go input acquire can be later, when gui input acquire (on init step)
- **#154** System: Change text adjust const to strings
- **#155** Fix: Add margin to total width calculation in `helper.centrate_nodes`

View File

@ -13,54 +13,54 @@ function Component:init(...)
end
-- Call every update step
-- [OPTIONAL] Call every update step
function Component:update(dt)
end
-- Call default on_input from gui script
-- [OPTIONAL] Call default on_input from gui script
function Component:on_input(action_id, action)
return false
end
-- Call on component creation and on component:set_style() function
-- [OPTIONAL] Call on component creation and on component:set_style() function
function Component:on_style_change(style)
end
-- Call default on_message from gui script
-- [OPTIONAL] Call default on_message from gui script
function Component:on_message(message_id, message, sender)
end
-- Call if druid has triggered on_language_change
-- [OPTIONAL] Call if druid has triggered on_language_change
function Component:on_language_change()
end
-- Call if game layout has changed and need to restore values in component
-- [OPTIONAL] Call if game layout has changed and need to restore values in component
function Component:on_layout_change()
end
-- Call, if input was capturing before this component
-- [OPTIONAL] Call, if input was capturing before this component
-- Example: scroll is start scrolling, so you need unhover button
function Component:on_input_interrupt()
end
-- Call, if game lost focus
-- [OPTIONAL] Call, if game lost focus
function Component:on_focus_lost()
end
-- Call, if game gained focus
-- [OPTIONAL] Call, if game gained focus
function Component:on_focus_gained()
end
-- Call on component remove or on druid:final
-- [OPTIONAL] Call on component remove or on druid:final
function Component:on_remove()
end

View File

@ -10,7 +10,7 @@ height = 900
[project]
title = druid
version = 0.7.0
version = 0.8.0
publisher = Insality
developer = Insality
dependencies#0 = https://github.com/insalitygames/deftest/archive/master.zip