Merge branch 'master' into develop

This commit is contained in:
Insality 2022-02-12 16:20:48 +02:00
commit a75dd5a6f9
39 changed files with 691 additions and 116 deletions

View File

@ -11,7 +11,8 @@ local druid = {}
function druid.new(context, style) end
--- Druid on language change.
function druid.on_language_change() end
---@param self druid_instance
function druid.on_language_change(self) end
--- Callback on global language change event.
function druid.on_language_change() end
@ -28,6 +29,11 @@ function druid.on_window_callback(event) end
---@param module table lua table with component
function druid.register(name, module) end
--- Set blacklist components for input processing.
---@param self druid_instance
---@param blacklist_components table|Component The array of component to blacklist
function druid.set_blacklist(self, blacklist_components) end
--- Set new default style.
---@param style table Druid style module
function druid.set_default_style(style) end
@ -40,6 +46,11 @@ function druid.set_sound_function(callback) end
---@param callback function Get localized text function
function druid.set_text_function(callback) end
--- Set whitelist components for input processing.
---@param self druid_instance
---@param whitelist_components table|Component The array of component to whitelist
function druid.set_whitelist(self, whitelist_components) end
---@class druid.back_handler : druid.base_component
---@field on_back druid_event On back handler callback(self, params)
@ -63,6 +74,11 @@ function druid__back_handler.on_input(self, action_id, action) end
---@field ALL field Component Interests
local druid__base_component = {}
--- Return all children components, recursive
---@param self druid.base_component
---@return table Array of childrens if the Druid component instance
function druid__base_component.get_childrens(self) end
--- Get current component context
---@param self druid.base_component
---@return table BaseComponent context
@ -163,6 +179,7 @@ function druid__blocker.set_enabled(self, state) end
---@class druid.button : druid.base_component
---@field anim_node node Animation node
---@field click_zone node Restriction zone
---@field hash node_id The hash of trigger node
---@field hover druid.hover Druid hover logic component
---@field node node Trigger node
---@field on_click druid_event On release button callback(self, params, button_instance)
@ -196,6 +213,12 @@ function druid__button.init(self, node, callback, params, anim_node) end
---@return bool True, if button is enabled
function druid__button.is_enabled(self) end
--- Set function for additional check for button click availability
---@param check_function function Should return true or false. If true - button can be pressed.
---@param failure_callback function Function what will be called on button click, if check function return false
---@return druid.button Current button instance
function druid__button.set_check_function(check_function, failure_callback) end
--- Strict button click area.
---@param self druid.button
---@param zone node Gui node
@ -393,7 +416,8 @@ function druid__dynamic_grid._get_side_vector(self, side, is_forward) end
---@param node node Gui node
---@param index number The node position. By default add as last node
---@param shift_policy number How shift nodes, if required. See const.SHIFT
function druid__dynamic_grid.add(self, node, index, shift_policy) end
---@param is_instance boolean If true, update node positions instantly
function druid__dynamic_grid.add(self, node, index, shift_policy, is_instance) end
--- Clear grid nodes array.
---@param self druid.dynamic_grid
@ -444,8 +468,9 @@ function druid__dynamic_grid.init(self, parent) end
---@param self druid.dynamic_grid
---@param index number The grid node index to remove
---@param shift_policy number How shift nodes, if required. See const.SHIFT
---@param is_instance boolean If true, update node positions instantly
---@return Node The deleted gui node from grid
function druid__dynamic_grid.remove(self, index, shift_policy) end
function druid__dynamic_grid.remove(self, index, shift_policy, is_instance) end
--- Change set position function for grid nodes.
---@param self druid.dynamic_grid
@ -780,6 +805,7 @@ function druid__scroll.set_vertical_scroll(self, state) end
---@field INERT_THRESHOLD field Scroll speed to stop inertion
---@field POINTS_DEADZONE field Speed to check points of interests in no_inertion mode
---@field SMALL_CONTENT_SCROLL field If true, content node with size less than view node size can be scrolled
---@field WHEEL_SCROLL_BY_INERTION field If true, wheel will add inertion to scroll. Direct set position otherwise.
---@field WHEEL_SCROLL_INVERTED field If true, invert direction for touchpad and mouse wheel scroll
---@field WHEEL_SCROLL_SPEED field The scroll speed via mouse wheel scroll or touchpad. Set to 0 to disable wheel scrolling
local druid__scroll__style = {}
@ -829,6 +855,7 @@ function druid__slider.set_steps(self, steps) end
---@field on_remove_item druid_event On item remove callback(self, index)
---@field on_update_positions druid_event On update item positions callback(self)
---@field parent node Parent gui node
---@field style druid.static_grid.style Component style params.
local druid__static_grid = {}
--- Add new item to the grid
@ -836,7 +863,8 @@ local druid__static_grid = {}
---@param item node Gui node
---@param index number The item position. By default add as last item
---@param shift_policy number How shift nodes, if required. See const.SHIFT
function druid__static_grid.add(self, item, index, shift_policy) end
---@param is_instance boolean If true, update node positions instantly
function druid__static_grid.add(self, item, index, shift_policy, is_instance) end
--- Clear grid nodes array.
---@param self druid.static_grid
@ -892,8 +920,9 @@ function druid__static_grid.init(self, parent, element, in_row) end
---@param self druid.static_grid
---@param index number The grid node index to remove
---@param shift_policy number How shift nodes, if required. See const.SHIFT
---@param is_instance boolean If true, update node positions instantly
---@return Node The deleted gui node from grid
function druid__static_grid.remove(self, index, shift_policy) end
function druid__static_grid.remove(self, index, shift_policy, is_instance) end
--- Set grid anchor.
---@param self druid.static_grid
@ -907,6 +936,11 @@ function druid__static_grid.set_anchor(self, anchor) end
function druid__static_grid.set_position_function(self, callback) end
---@class druid.static_grid.style
---@field IS_DYNAMIC_NODE_POSES field If true, always center grid content as grid pivot sets
local druid__static_grid__style = {}
---@class druid.swipe : druid.base_component
---@field click_zone node Restriction zone
---@field node node Swipe node
@ -934,9 +968,10 @@ local druid__swipe__style = {}
---@class druid.text : druid.base_component
---@field adjust_type number Current text size adjust settings
---@field color vector3 Current text color
---@field is_no_adjust bool Current text size adjust settings
---@field node node Text node
---@field node_id hash The node id of text node
---@field on_set_pivot druid_event On change pivot callback(self, pivot)
---@field on_set_text druid_event On set text callback(self, text)
---@field on_update_text_scale druid_event On adjust text size callback(self, new_scale)
@ -944,9 +979,16 @@ local druid__swipe__style = {}
---@field scale vector3 Current text node scale
---@field start_scale vector3 Initial text node scale
---@field start_size vector3 Initial text node size
---@field style druid.text.style Component style params.
---@field text_area vector3 Current text node available are
local druid__text = {}
--- Return current text adjust type
---@param self unknown
---@param adjust_type unknown
---@return number The current text adjust type
function druid__text.get_text_adjust(self, adjust_type) end
--- Calculate text width with font with respect to trailing space
---@param self druid.text
---@param text string
@ -956,8 +998,8 @@ function druid__text.get_text_width(self, text) end
---@param self druid.text
---@param node node Gui text node
---@param value string Initial text. Default value is node text from GUI scene.
---@param no_adjust bool If true, text will be not auto-adjust size
function druid__text.init(self, node, value, no_adjust) end
---@param adjust_type int Adjust type for text. By default is DOWNSCALE. Look const.TEXT_ADJUST for reference
function druid__text.init(self, node, value, adjust_type) end
--- Return true, if text with line break
---@param self druid.text
@ -967,29 +1009,53 @@ function druid__text.is_multiline(self) end
--- Set alpha
---@param self druid.text
---@param alpha number Alpha for node
---@return druid.text Current text instance
function druid__text.set_alpha(self, alpha) end
--- Set color
---@param self druid.text
---@param color vector4 Color for node
---@return druid.text Current text instance
function druid__text.set_color(self, color) end
--- Set minimal scale for DOWNSCALE_LIMITED or SCALE_THEN_SCROLL adjust types
---@param self druid.text
---@param minimal_scale number If pass nil - not use minimal scale
---@return druid.text Current text instance
function druid__text.set_minimal_scale(self, minimal_scale) end
--- Set text pivot.
---@param self druid.text
---@param pivot gui.pivot Gui pivot constant
---@return druid.text Current text instance
function druid__text.set_pivot(self, pivot) end
--- Set scale
---@param self druid.text
---@param scale vector3 Scale for node
---@return druid.text Current text instance
function druid__text.set_scale(self, scale) end
--- Set text adjust, refresh the current text visuals, if needed
---@param self druid.text
---@param adjust_type number See const.TEXT_ADJUST. If pass nil - use current adjust type
---@param minimal_scale number If pass nil - not use minimal scale
---@return druid.text Current text instance
function druid__text.set_text_adjust(self, adjust_type, minimal_scale) end
--- Set text to text field
---@param self druid.text
---@param set_to string Text for node
---@return druid.text Current text instance
function druid__text.set_to(self, set_to) end
---@class druid.text.style
---@field DEFAULT_ADJUST field The default adjust type for any text component
---@field TRIM_POSTFIX field The postfix for TRIM adjust type
local druid__text__style = {}
---@class druid.timer : druid.base_component
---@field from number Initial timer value
---@field node node Trigger node
@ -1248,6 +1314,7 @@ function druid_instance.on_focus_lost(self) end
---@param self druid_instance
---@param action_id hash Action_id from on_input
---@param action table Action from on_input
---@return bool The boolean value is input was consumed
function druid_instance.on_input(self, action_id, action) end
--- Druid on layout change function.
@ -1323,6 +1390,11 @@ function helper.deprecated(message) end
---@return vector4 Vector with distance to node border: (left, top, right, down)
function helper.get_border(node, offset) end
--- Return closest non inverted clipping parent node for node
---@param node node Gui node
---@return node|nil The clipping node
function helper.get_closest_stencil_node(node) end
--- Get node offset for given gui pivot
---@param pivot gui.pivot The node pivot
---@return vector3 Vector offset with [-1..1] values

View File

@ -1 +1 @@
{"content":[{"name":"game.projectc","size":3432,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":11568,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":388522,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":25565,"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":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}]}]}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,12 +1,12 @@
[project]
title = druid
version = 0.6.466
version = 0.7.499
write_log = 0
compress_archive = 1
publisher = Insality
developer = Insality
commit_sha = ffa3bafa002c561f6f4a31e8bbca228c3606b1cc
build_time = 2021-05-30T08:51:36Z
commit_sha = 1ae77e727fd29b01a514e73820b3e02213aeb7db
build_time = 2021-10-23T14:38:03Z
[display]
width = 600
@ -35,7 +35,7 @@ world_count = 4
gravity_x = 0
gravity_z = 0
scale = 1
allow_dynamic_transforms = 0
allow_dynamic_transforms = 1
debug_scale = 30
max_collisions = 64
max_contacts = 128
@ -121,9 +121,9 @@ default_language = en
localizations = en
[android]
version_code = 466
version_code = 499
minimum_sdk_version = 16
target_sdk_version = 29
target_sdk_version = 30
package = com.insality.druid
manifest = /builtins/manifests/android/AndroidManifest.xml
iap_provider = GooglePlay
@ -149,6 +149,7 @@ cssfile = /builtins/manifests/web/light_theme.css
archive_location_prefix = archive
show_fullscreen_button = 0
show_made_with_defold = 0
show_console_banner = 1
scale_mode = fit
engine_arguments = --verify-graphics-calls=false
splash_image = /media/druid_logo.png
@ -191,6 +192,17 @@ run_while_iconified = 0
[druid]
no_auto_input = 0
stencil_check = 0
input_text = text
input_touch = touch
input_marked_text = marked_text
input_key_esc = key_esc
input_key_back = key_back
input_key_enter = key_enter
input_key_backspace = key_backspace
input_multitouch = multitouch
input_scroll_up = scroll_up
input_scroll_down = scroll_down
[native_extension]
app_manifest = /example/game.appmanifest

Binary file not shown.

View File

@ -30,7 +30,7 @@ var FileLoader = {
return;
}
currentAttempt = currentAttempt + 1;
setTimeout(obj.send, FileLoader.options.retryInterval);
setTimeout(obj.send.bind(obj), FileLoader.options.retryInterval);
};
xhr.onload = function(e) {
if (onload) onload(xhr, e);

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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.6.466</title>
<title>druid 0.7.499</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
@ -160,7 +160,8 @@
var is_iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
var buttonHeight = 0;
// Resize on init, screen resize and orientation change
var prevInnerWidth = -1;
var prevInnerHeight = -1;
function resize_game_canvas() {
// Hack for iOS when exit from Fullscreen mode
if (is_iOS) {
@ -171,6 +172,12 @@
var game_canvas = document.getElementById('canvas');
var innerWidth = window.innerWidth;
var innerHeight = window.innerHeight - buttonHeight;
if (prevInnerWidth == innerWidth && prevInnerHeight == innerHeight)
{
return;
}
prevInnerWidth = innerWidth;
prevInnerHeight = innerHeight;
var width = 600;
var height = 900;
var targetRatio = width / height;
@ -201,6 +208,7 @@
resize_game_canvas();
window.addEventListener('resize', resize_game_canvas, false);
window.addEventListener('orientationchange', resize_game_canvas, false);
window.addEventListener('focus', resize_game_canvas, false);
</script>
<script id='engine-start' type='text/javascript'>

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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -133,6 +133,10 @@
<td class="name" nowrap><a href="#setup_component">setup_component(self, druid_instance, context, style)</a></td>
<td class="summary">Setup component context and his style table</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_childrens">get_childrens(self)</a></td>
<td class="summary">Return all children components, recursive</td>
</tr>
</table>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
@ -551,6 +555,33 @@
</dd>
<dt>
<a name = "get_childrens"></a>
<strong>get_childrens(self)</strong>
</dt>
<dd>
Return all children components, recursive
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><span class="type">BaseComponent</span></span>
</li>
</ul>
<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>
Array of childrens if the Druid component instance
</ol>
</dd>
</dl>
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
@ -577,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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -101,6 +101,10 @@
<td class="name" nowrap><a href="#get_key_trigger">get_key_trigger(self)</a></td>
<td class="summary">Get key-code to trigger this button</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_check_function">set_check_function([check_function[, failure_callback]])</a></td>
<td class="summary">Set function for additional check for button click availability</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
@ -140,6 +144,10 @@
<td class="summary">Trigger node</td>
</tr>
<tr>
<td class="name" nowrap><a href="#hash">hash</a></td>
<td class="summary">The hash of trigger node</td>
</tr>
<tr>
<td class="name" nowrap><a href="#anim_node">anim_node</a></td>
<td class="summary">Animation node</td>
</tr>
@ -320,7 +328,7 @@
</li>
<li><span class="parameter">key</span>
<span class="types"><span class="type">hash</span></span>
<span class="types"><a class="type" href="../modules/Button.html#hash">hash</a></span>
The action_id of the key
</li>
</ul>
@ -355,13 +363,46 @@
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">hash</span></span>
<span class="types"><a class="type" href="../modules/Button.html#hash">hash</a></span>
The action_id of the key
</ol>
</dd>
<dt>
<a name = "set_check_function"></a>
<strong>set_check_function([check_function[, failure_callback]])</strong>
</dt>
<dd>
Set function for additional check for button click availability
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">check_function</span>
<span class="types"><span class="type">function</span></span>
Should return true or false. If true - button can be pressed.
(<em>optional</em>)
</li>
<li><span class="parameter">failure_callback</span>
<span class="types"><span class="type">function</span></span>
Function what will be called on button click, if check function return false
(<em>optional</em>)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Button</span></span>
Current button instance
</ol>
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
@ -564,6 +605,26 @@
</dd>
<dt>
<a name = "hash"></a>
<strong>hash</strong>
</dt>
<dd>
The hash of trigger node
<ul>
<li><span class="parameter">hash</span>
<span class="types"><a class="type" href="../modules/Button.html#node">node_id</a></span>
</li>
</ul>
</dd>
<dt>
<a name = "anim_node"></a>
@ -714,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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -333,7 +333,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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -144,10 +144,18 @@
<td class="summary">Druid on layout change function.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#druid.on_language_change">druid.on_language_change()</a></td>
<td class="name" nowrap><a href="#druid.on_language_change">druid.on_language_change(self)</a></td>
<td class="summary">Druid on language change.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#druid.set_whitelist">druid.set_whitelist(self[, whitelist_components=nil])</a></td>
<td class="summary">Set whitelist components for input processing.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#druid.set_blacklist">druid.set_blacklist(self[, blacklist_components=nil])</a></td>
<td class="summary">Set blacklist components for input processing.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#new_button">new_button(self, node, callback[, params[, anim_node]])</a></td>
<td class="summary">Create button basic component</td>
</tr>
@ -392,6 +400,12 @@
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
The boolean value is input was consumed
</ol>
@ -498,7 +512,7 @@
</dd>
<dt>
<a name = "druid.on_language_change"></a>
<strong>druid.on_language_change()</strong>
<strong>druid.on_language_change(self)</strong>
</dt>
<dd>
Druid on language change.
@ -506,6 +520,69 @@
call manualy to update all translations
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><span class="type">DruidInstance</span></span>
</li>
</ul>
</dd>
<dt>
<a name = "druid.set_whitelist"></a>
<strong>druid.set_whitelist(self[, whitelist_components=nil])</strong>
</dt>
<dd>
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
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><span class="type">DruidInstance</span></span>
</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>
The array of component to whitelist
(<em>default</em> nil)
</li>
</ul>
</dd>
<dt>
<a name = "druid.set_blacklist"></a>
<strong>druid.set_blacklist(self[, blacklist_components=nil])</strong>
</dt>
<dd>
Set blacklist components for input processing.
If blacklist is not empty and component contains in this list,
component will be not processed on input step
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><span class="type">DruidInstance</span></span>
</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>
The array of component to blacklist
(<em>default</em> nil)
</li>
</ul>
@ -1283,7 +1360,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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -85,11 +85,11 @@
<td class="summary">Return pos for grid node index</td>
</tr>
<tr>
<td class="name" nowrap><a href="#add">add(self, node[, index[, shift_policy=SHIFT.RIGHT]])</a></td>
<td class="name" nowrap><a href="#add">add(self, node[, index[, shift_policy=SHIFT.RIGHT[, is_instance=false]]])</a></td>
<td class="summary">Add new node to the grid</td>
</tr>
<tr>
<td class="name" nowrap><a href="#remove">remove(self, index[, shift_policy=SHIFT.RIGHT])</a></td>
<td class="name" nowrap><a href="#remove">remove(self, index[, shift_policy=SHIFT.RIGHT[, is_instance=false]])</a></td>
<td class="summary">Remove the item from the grid.</td>
</tr>
<tr>
@ -247,7 +247,7 @@
</dd>
<dt>
<a name = "add"></a>
<strong>add(self, node[, index[, shift_policy=SHIFT.RIGHT]])</strong>
<strong>add(self, node[, index[, shift_policy=SHIFT.RIGHT[, is_instance=false]]])</strong>
</dt>
<dd>
Add new node to the grid
@ -273,6 +273,11 @@
How shift nodes, if required. See const.SHIFT
(<em>default</em> SHIFT.RIGHT)
</li>
<li><span class="parameter">is_instance</span>
<span class="types"><span class="type">boolean</span></span>
If true, update node positions instantly
(<em>default</em> false)
</li>
</ul>
@ -282,7 +287,7 @@
</dd>
<dt>
<a name = "remove"></a>
<strong>remove(self, index[, shift_policy=SHIFT.RIGHT])</strong>
<strong>remove(self, index[, shift_policy=SHIFT.RIGHT[, is_instance=false]])</strong>
</dt>
<dd>
Remove the item from the grid. Note that gui node will be not deleted
@ -303,6 +308,11 @@
How shift nodes, if required. See const.SHIFT
(<em>default</em> SHIFT.RIGHT)
</li>
<li><span class="parameter">is_instance</span>
<span class="types"><span class="type">boolean</span></span>
If true, update node positions instantly
(<em>default</em> false)
</li>
</ul>
<h3>Returns:</h3>
@ -776,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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -243,7 +243,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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -814,6 +814,11 @@
If true, invert direction for touchpad and mouse wheel scroll
(<em>default</em> false)
</li>
<li><span class="parameter">WHEEL_SCROLL_BY_INERTION</span>
<span class="types"><span class="type">bool</span></span>
If true, wheel will add inertion to scroll. Direct set position otherwise.
(<em>default</em> false)
</li>
</ul>
@ -1113,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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -33,6 +33,7 @@
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li>
<li><a href="#Fields">Fields</a></li>
</ul>
@ -98,11 +99,11 @@
<td class="summary">Set grid anchor.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#add">add(self, item[, index[, shift_policy=SHIFT.RIGHT]])</a></td>
<td class="name" nowrap><a href="#add">add(self, item[, index[, shift_policy=SHIFT.RIGHT[, is_instance=false]]])</a></td>
<td class="summary">Add new item to the grid</td>
</tr>
<tr>
<td class="name" nowrap><a href="#remove">remove(self, index[, shift_policy=SHIFT.RIGHT])</a></td>
<td class="name" nowrap><a href="#remove">remove(self, index[, shift_policy=SHIFT.RIGHT[, is_instance=false]])</a></td>
<td class="summary">Remove the item from the grid.</td>
</tr>
<tr>
@ -130,6 +131,13 @@
<td class="summary">Return StaticGrid offset, where StaticGrid content starts.</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>
</table>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
<tr>
@ -343,7 +351,7 @@
</dd>
<dt>
<a name = "add"></a>
<strong>add(self, item[, index[, shift_policy=SHIFT.RIGHT]])</strong>
<strong>add(self, item[, index[, shift_policy=SHIFT.RIGHT[, is_instance=false]]])</strong>
</dt>
<dd>
Add new item to the grid
@ -369,6 +377,11 @@
How shift nodes, if required. See const.SHIFT
(<em>default</em> SHIFT.RIGHT)
</li>
<li><span class="parameter">is_instance</span>
<span class="types"><span class="type">boolean</span></span>
If true, update node positions instantly
(<em>default</em> false)
</li>
</ul>
@ -378,7 +391,7 @@
</dd>
<dt>
<a name = "remove"></a>
<strong>remove(self, index[, shift_policy=SHIFT.RIGHT])</strong>
<strong>remove(self, index[, shift_policy=SHIFT.RIGHT[, is_instance=false]])</strong>
</dt>
<dd>
Remove the item from the grid. Note that gui node will be not deleted
@ -399,6 +412,11 @@
How shift nodes, if required. See const.SHIFT
(<em>default</em> SHIFT.RIGHT)
</li>
<li><span class="parameter">is_instance</span>
<span class="types"><span class="type">boolean</span></span>
If true, update node positions instantly
(<em>default</em> false)
</li>
</ul>
<h3>Returns:</h3>
@ -579,6 +597,34 @@
</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">IS_DYNAMIC_NODE_POSES</span>
<span class="types"><span class="type">bool</span></span>
If true, always center grid content as grid pivot sets
(<em>default</em> false)
</li>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
@ -831,7 +877,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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -33,6 +33,7 @@
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li>
<li><a href="#Fields">Fields</a></li>
</ul>
@ -79,7 +80,7 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#init">init(self, node[, value[, no_adjust]])</a></td>
<td class="name" nowrap><a href="#init">init(self, node[, value[, adjust_type=0]])</a></td>
<td class="summary">Component init function</td>
</tr>
<tr>
@ -110,6 +111,25 @@
<td class="name" nowrap><a href="#is_multiline">is_multiline(self)</a></td>
<td class="summary">Return true, if text with line break</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_text_adjust">set_text_adjust(self[, adjust_type[, minimal_scale]])</a></td>
<td class="summary">Set text adjust, refresh the current text visuals, if needed</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set_minimal_scale">set_minimal_scale(self, minimal_scale)</a></td>
<td class="summary">Set minimal scale for DOWNSCALE_LIMITED or SCALE_THEN_SCROLL adjust types</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_text_adjust">get_text_adjust(self, adjust_type)</a></td>
<td class="summary">Return current text adjust type</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>
</table>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
@ -130,6 +150,10 @@
<td class="summary">Text node</td>
</tr>
<tr>
<td class="name" nowrap><a href="#node_id">node_id</a></td>
<td class="summary">The node id of text node</td>
</tr>
<tr>
<td class="name" nowrap><a href="#pos">pos</a></td>
<td class="summary">Current text position</td>
</tr>
@ -150,7 +174,7 @@
<td class="summary">Current text node available are</td>
</tr>
<tr>
<td class="name" nowrap><a href="#is_no_adjust">is_no_adjust</a></td>
<td class="name" nowrap><a href="#adjust_type">adjust_type</a></td>
<td class="summary">Current text size adjust settings</td>
</tr>
<tr>
@ -168,7 +192,7 @@
<dl class="function">
<dt>
<a name = "init"></a>
<strong>init(self, node[, value[, no_adjust]])</strong>
<strong>init(self, node[, value[, adjust_type=0]])</strong>
</dt>
<dd>
Component init function
@ -189,10 +213,10 @@
Initial text. Default value is node text from GUI scene.
(<em>optional</em>)
</li>
<li><span class="parameter">no_adjust</span>
<span class="types"><span class="type">bool</span></span>
If true, text will be not auto-adjust size
(<em>optional</em>)
<li><span class="parameter">adjust_type</span>
<span class="types"><span class="type">int</span></span>
Adjust type for text. By default is DOWNSCALE. Look const.TEXT_ADJUST for reference
(<em>default</em> 0)
</li>
</ul>
@ -247,6 +271,12 @@
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Text</span></span>
Current text instance
</ol>
@ -272,6 +302,12 @@
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Text</span></span>
Current text instance
</ol>
@ -297,6 +333,12 @@
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Text</span></span>
Current text instance
</ol>
@ -322,6 +364,12 @@
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Text</span></span>
Current text instance
</ol>
@ -332,8 +380,7 @@
<strong>set_pivot(self, pivot)</strong>
</dt>
<dd>
Set text pivot. Text will re-anchor inside
his text area
Set text pivot. Text will re-anchor inside text area
<h3>Parameters:</h3>
@ -348,6 +395,12 @@
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Text</span></span>
Current text instance
</ol>
@ -379,6 +432,136 @@
</dd>
<dt>
<a name = "set_text_adjust"></a>
<strong>set_text_adjust(self[, adjust_type[, minimal_scale]])</strong>
</dt>
<dd>
Set text adjust, refresh the current text visuals, if needed
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><span class="type">Text</span></span>
</li>
<li><span class="parameter">adjust_type</span>
<span class="types"><span class="type">number</span></span>
See const.TEXT_ADJUST. If pass nil - use current adjust type
(<em>optional</em>)
</li>
<li><span class="parameter">minimal_scale</span>
<span class="types"><span class="type">number</span></span>
If pass nil - not use minimal scale
(<em>optional</em>)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Text</span></span>
Current text instance
</ol>
</dd>
<dt>
<a name = "set_minimal_scale"></a>
<strong>set_minimal_scale(self, minimal_scale)</strong>
</dt>
<dd>
Set minimal scale for DOWNSCALE_LIMITED or SCALE_THEN_SCROLL adjust types
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
<span class="types"><span class="type">Text</span></span>
</li>
<li><span class="parameter">minimal_scale</span>
<span class="types"><span class="type">number</span></span>
If pass nil - not use minimal scale
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Text</span></span>
Current text instance
</ol>
</dd>
<dt>
<a name = "get_text_adjust"></a>
<strong>get_text_adjust(self, adjust_type)</strong>
</dt>
<dd>
Return current text adjust type
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">self</span>
</li>
<li><span class="parameter">adjust_type</span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">number</span></span>
The current text adjust type
</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">TRIM_POSTFIX</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.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>
The default adjust type for any text component
(<em>default</em> DOWNSCALE)
</li>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
@ -463,6 +646,26 @@
</dd>
<dt>
<a name = "node_id"></a>
<strong>node_id</strong>
</dt>
<dd>
The node id of text node
<ul>
<li><span class="parameter">node_id</span>
<span class="types"><span class="type">hash</span></span>
</li>
</ul>
</dd>
<dt>
<a name = "pos"></a>
@ -565,16 +768,16 @@
</dd>
<dt>
<a name = "is_no_adjust"></a>
<strong>is_no_adjust</strong>
<a name = "adjust_type"></a>
<strong>adjust_type</strong>
</dt>
<dd>
Current text size adjust settings
<ul>
<li><span class="parameter">is_no_adjust</span>
<span class="types"><span class="type">bool</span></span>
<li><span class="parameter">adjust_type</span>
<span class="types"><span class="type">number</span></span>
</li>
</ul>
@ -611,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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -92,6 +92,10 @@
<td class="summary">Check if node is enabled in gui hierarchy.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_closest_stencil_node">get_closest_stencil_node(node)</a></td>
<td class="summary">Return closest non inverted clipping parent node for node</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_pivot_offset">get_pivot_offset(pivot)</a></td>
<td class="summary">Get node offset for given gui pivot</td>
</tr>
@ -242,6 +246,33 @@
</dd>
<dt>
<a name = "get_closest_stencil_node"></a>
<strong>get_closest_stencil_node(node)</strong>
</dt>
<dd>
Return closest non inverted clipping parent node for node
<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">node</span> or <span class="type">nil</span></span>
The clipping node
</ol>
</dd>
<dt>
<a name = "get_pivot_offset"></a>
@ -356,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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -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-04-06 00:03:14 </i>
<i style="float:right;">Last updated 2021-10-23 17:45:31 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@ -205,18 +205,28 @@ Have a good day.
- **#127** The `druid:create` is deprecated. Use `druid:new` for creating custom components
### Druid 0.7.0:
Hello! Here I'm again with new Druid stuff for you!
The feature I want a long time to deliver for you: the different Text size adjust modes. Druid use the text node sizes to fit the text into this box.
There are new adjust modes such as Trim, Scroll, Downscale with restrictions and Downscale + Scroll. You can change default adjust mode via text style table, but by default there is no changes - it's downscale adjust mode as before.
I'll hope it can be useful for you for in different cases and now it will be much easy to fit all your texts for different languages!
The next features is made for add more control for availability of user input. So meet the whitelists, blacklists and custom check functions for Buttons. Now you can easily choose the more suitable way to enable/disable/restrict input for you users. I'm sure it can be useful for you tutorials.
Another small, but cool feature on my mind is `druid.stencil_check`. If you did interactive elements inside the Scroll, probably you used `component:set_click_zone` to restrict input zone by stencil scroll view node. With this feature, Druid will do it automaticaly for you! You can enable this feature in your `game.project`. It will not override you existing `set_click_zone`.
Now you even able to remap default input keys! Also there are several bugfixes with Scroll, Text, Grids.
Wanna something more? [Add an issues!](https://github.com/Insality/druid/issues)
Good luck!
**Changelog 0.7.0**
---
- **#131** [Static Grid] Add style param: IS_DYNAMIC_NODE_POSES (default: false). Always align by content size with node anchor.
- If true - Static Grid will by always align to content anchor.
- If false (currently behaviour) - all poses for static grid is predefined and not depends on element's count (see example: static grid and static grid with dynamic poses)
- **#132** Add example with grid add/remove with animations
- **#112** Allow remap default Druid input bindings.
- **#66** Add `druid:set_whitelist()` and `druid.set_blacklist()` functions. It's affects only on input process step, you can allow/forbid interact with list of specific components
- **#125** Now `component:set_input_priority()` affects on all component's children too
- **#143** Update all lang components on ``druid.set_text_function` call
- **#78** Update Text component:
- **#78** [Text] Update Text component:
- Add text adjust type instead of _no_adjust_ param.
- const.TEXT_ADJUST.DOWNSCALE - Change text's scale to fit in the text node size
- const.TEXT_ADJUST.TRIM - Trim the text with postfix (default - "...", override in styles) to fit in the text node size
@ -224,10 +234,21 @@ Have a good day.
- const.TEXT_ADJUST.DOWNSCALE_LIMITED - Change text's scale list downscale, but there is limit for text's scale
- const.TEXT_ADJUST.SCROLL - Change text's pivot to imitate scrolling in the text box. Use with stencil node for better effect.
- const.TEXT_ADJUST.SCALE_THEN_SCROLL - Combine two modes: first limited downscale, then scroll
- **#81** Add ability to interact with Druid input via messages
- **#110** [Button] Add `Button:set_check_function(check_function, failure_callback)` function to add your custom click condition to button.
- `Button:set_enabled` has more priority than this to check button availability
- The `check_function` should return _true_ of _false_. If true - button can be clicked by user
- The `failure_callback` will be called if `check_function` will return false
- Example with `set_check_function` in general:buttons example collection
- **#66** Add `druid:set_whitelist()` and `druid.set_blacklist()` functions. It's affects only on input process step, you can allow/forbid interact with list of specific components
- You can pass array of components, single component or nil in these functions
- **#111** Add autocheck for input and stencil nodes. To enable this feature, add `druid.stencil_check = 1` to your _game.project_ file.
- This feature is using for auto setup `component:set_click_zone` to restrict clicks outside scrolls zone for example. Now you can don't think about click zone and let Druid do it instead of you!
- Add `helper.get_closest_stencil_node` function to get closest parent of non inverted stencil node
- Add `component.ON_LATE_INIT` interest. Component with this will call `component.on_late_init` function once after component init on update step. This can be used to do something after all gui components are inited
- **#81** Add ability to interact with Druid input via messages:
- Currently add for Button and Text component only:
- Send to _gui.script_ message: `druid_const.ON_MESSAGE_INPUT`. The message table params:
- `node_id` - the name of the node with button component on it
- `node_id` - the name of the node with component on it
- `action` - value from `druid_const.MESSAGE_INPUT`. Available values:
- **BUTTON_CLICK** - usual button click callback
- **BUTTON_LONG_CLICK** - button long click callback
@ -238,16 +259,14 @@ Have a good day.
- Add Druid component interest: `component.ON_MESSAGE_INPUT`
- Implement new interest via function `component:on_message_input(node_id, message)`
- See **System: Message input** example
- **#111** Add autocheck for input and stencil nodes. To enable this feature, add `druid.stencil_check = 1` to your game.project file.
- Add `helper.get_closest_stencil_node` function to get closest parent non inverted stencil node
- Add `component.ON_LATE_INIT` interest. If component with with interest, it will call `component.on_late_init` function once after component init on update step. This can be used to do something after all gui components are was initialized and setup.
- This feature is using for auto setup `component:set_click_zone` to restrict clicks outside scrolls zone for example. Now you can don't think about click zone and let Druid do it instead of you!
- **#110** Add `Button:set_check_function(check_function, failure_callback)` function to add your custom click condition to button.
- `Button:set_enabled` has more priority than this to check button availability
- The `check_function` should return _true_ of _false_. If true - button can be clicked
- The `failure_callback`will be called if `check_function` will return false. It's callback for you if button is not available
- Example with `set_check_function` exists in general:buttons example collection
- **#107** Better scale text adjust by height for multiline text nodes (but still not perfect)
- **#144** Fix some glitches with scroll Points of Interest. Remove false detection of scroll stopped.
- **#142** 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, what 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.
- **#131** [Static Grid] Add style param: `IS_DYNAMIC_NODE_POSES` (default: false). Always align by content size with node anchor.
- If true - Static Grid will by always align to content anchor.
- If false (currently behaviour) - all poses for static grid is predefined and not depends on element's count (see example: static grid and static grid with dynamic poses)
- **#125** Now `component:set_input_priority()` affects on all component's children too
- **#143** Update all lang components on `druid.set_text_function` call
- **#112** Allow remap default Druid input bindings via `game.project`
- **#107** [Text] Better scale text adjust by height for multiline text nodes (but still not perfect)
- **#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

View File

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