mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 18:12:19 +02:00
Add message input TEXT_SET, update docs/changelog
This commit is contained in:
@@ -35,8 +35,12 @@ end
|
||||
function M.on_message(self, message_id, message, sender)
|
||||
end
|
||||
|
||||
-- Call only if component with ON_ANGUAGECHANinterest
|
||||
function M.on_anguagechanself)
|
||||
-- Call only if component with ON_LANGUAGE_CHANGE interest
|
||||
function M.on_language_change(self)
|
||||
end
|
||||
|
||||
-- Call only if component with ON_MESSAGE_INPUT interest
|
||||
function M.on_message_input(self, node_id, message)
|
||||
end
|
||||
|
||||
-- Call only if component with ON_LAYOUT_CHANGE interest
|
||||
@@ -105,6 +109,8 @@ There is next interests in druid:
|
||||
|
||||
- **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`
|
||||
|
@@ -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
|
Reference in New Issue
Block a user