Annotations update [4]

This commit is contained in:
Insality
2023-10-17 23:18:25 +03:00
parent c99b97f392
commit 24bb39481d
7 changed files with 54 additions and 28 deletions

View File

@@ -9,6 +9,9 @@
--- The component druid instance
-- @tfield DruidInstance druid @{DruidInstance}
--- Root node
-- @tfield node root
--- On input field text change callback(self, input_text)
-- @tfield Input input @{Input}
@@ -69,6 +72,8 @@ function RichInput.init(self, template, nodes)
self:set_template(template)
self:set_nodes(nodes)
self.druid = self:get_druid()
self.root = self:get_node(SCHEME.ROOT)
self.input = self.druid:new_input(self:get_node(SCHEME.BUTTON), self:get_node(SCHEME.INPUT))
self.cursor = self:get_node(SCHEME.CURSOR)
@@ -85,7 +90,7 @@ end
--- Set placeholder text
-- @tparam RichInput self @{RichInput}
-- @tparam string placeholder_text The placeholder text
-- @tparam string|nil placeholder_text The placeholder text
function RichInput.set_placeholder(self, placeholder_text)
self.placeholder:set_to(placeholder_text)
return self