Add message input TEXT_SET, update docs/changelog

This commit is contained in:
Insality
2021-10-23 13:30:50 +03:00
parent 0179e68887
commit 063e4f4a31
6 changed files with 259 additions and 323 deletions

View File

@@ -225,7 +225,7 @@ Have a good day.
- 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
- Currently add only Druid Button component:
- 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
- `action` - value from `druid_const.MESSAGE_INPUT`. Available values:
@@ -233,6 +233,8 @@ Have a good day.
- **BUTTON_LONG_CLICK** - button long click callback
- **BUTTON_DOUBLE_CLICK** - button double click callback
- **BUTTON_REPEATED_CLICK** - button repeated click callback
- **TEXT_SET** - set text for Text component
- `value` - optional field for several actions. For example value is text for **TEXT_SET**
- 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