From fc2d93c34faee32487ff951a0e3613a08f9fe9cd Mon Sep 17 00:00:00 2001 From: Insality Date: Wed, 9 Mar 2022 18:19:36 +0200 Subject: [PATCH] Update README md --- README.md | 20 ++++++++++++++------ druid/component.lua | 3 ++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 14ab394..b59f4da 100644 --- a/README.md +++ b/README.md @@ -57,13 +57,25 @@ input_scroll_down = scroll_down By default, **Druid** will auto-capture input focus, if any input component will be created. So you don't need to call `msg.post(".", "acquire_input_focus")` -If you don't need this behaviour, you can disable it by settings `druid.no_auto_input` field in _game.project_: +If you don't need this behaviour, you can disable it by setting `druid.no_auto_input` field in _game.project_: ``` [druid] no_auto_input = 1 ``` +### Template name check [optional] + +By default, **Druid** will auto check the parent component template name to build the full template name for component. + +If for some reason you want to pass the full template name by yourself, you can disable it by setting `druid.no_auto_input` field in _game.project_: + +``` +[druid] +no_auto_template = 1 +``` + + ### Stencil check [optional] When creating input components inside stencil nodes, you probably will use `component:set_click_zone()` to restrict clicks outside this stencil zone. @@ -73,6 +85,7 @@ Druid can do it automatically on _late_init_ component step. To enable this feat stencil_check = 1 ``` + ### Code [optional] Adjust **Druid** settings, if needed: @@ -265,11 +278,6 @@ You can fund the full **Druid** documentation here: https://insality.github.io/druid/ -## Games powered by Druid - -_You published your game and you using Druid? Note me!_ - - ## License - Developed and supported by [Insality](https://github.com/Insality) diff --git a/druid/component.lua b/druid/component.lua index 93ad033..7602b3f 100644 --- a/druid/component.lua +++ b/druid/component.lua @@ -143,7 +143,8 @@ end --- Get node for component by name. -- If component has nodes, node_or_name should be string -- It auto pick node by template name or from nodes by clone_tree --- if they was setup via component:set_nodes, component:set_template +-- if they was setup via component:set_nodes, component:set_template. +-- If node is not found, the exception will fired -- @tparam BaseComponent self @{BaseComponent} -- @tparam string|node node_or_name Node name or node itself -- @treturn node Gui node