This commit is contained in:
Insality
2025-03-16 02:24:47 +02:00
parent a2bb93a03b
commit ad0447b649
16 changed files with 32 additions and 16 deletions

View File

@@ -30,14 +30,16 @@ function M:set_text_property(text)
end
---@param text string
---@param text string|number
---@return widget.property_input
function M:set_text_value(text)
self.rich_input:set_text(text)
self.rich_input:set_text(tostring(text))
return self
end
---@param callback fun(self: widget.property_input, text: string)
---@param callback_context any
function M:on_change(callback, callback_context)
self.rich_input.input.on_input_unselect:subscribe(callback, callback_context)
end

View File

@@ -8,6 +8,7 @@ local helper = require("druid.helper")
---@field text_name druid.text
---@field text_value druid.text
---@field slider druid.slider
---@field on_change_value event fun(value:number)
local M = {}