mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 10:02:18 +02:00
Update annotations
This commit is contained in:
@@ -263,7 +263,6 @@ end
|
||||
|
||||
|
||||
--- Set placeholder text
|
||||
---@param self RichInput RichInput
|
||||
---@param placeholder_text string The placeholder text
|
||||
function M:set_placeholder(placeholder_text)
|
||||
self.placeholder:set_to(placeholder_text)
|
||||
@@ -272,14 +271,12 @@ end
|
||||
|
||||
|
||||
--- Select input field
|
||||
---@param self RichInput RichInput
|
||||
function M:select()
|
||||
self.input:select()
|
||||
end
|
||||
|
||||
|
||||
--- Set input field text
|
||||
---@param self RichInput RichInput
|
||||
---@return druid.input Current input instance
|
||||
---@param text string The input text
|
||||
function M:set_text(text)
|
||||
@@ -291,7 +288,6 @@ end
|
||||
|
||||
|
||||
--- Set input field font
|
||||
---@param self RichInput RichInput
|
||||
---@param font hash The font hash
|
||||
---@return druid.input Current input instance
|
||||
function M:set_font(font)
|
||||
@@ -303,7 +299,6 @@ end
|
||||
|
||||
|
||||
--- Set input field text
|
||||
---@param self RichInput RichInput
|
||||
function M:get_text()
|
||||
return self.input:get_text()
|
||||
end
|
||||
@@ -312,7 +307,6 @@ end
|
||||
--- Set allowed charaters for input field.
|
||||
-- See: https://defold.com/ref/stable/string/
|
||||
-- ex: [%a%d] for alpha and numeric
|
||||
---@param self RichInput RichInput
|
||||
---@param characters string Regulax exp. for validate user input
|
||||
---@return RichInput Current instance
|
||||
function M:set_allowed_characters(characters)
|
||||
|
@@ -85,7 +85,6 @@ local M = component.create("rich_text")
|
||||
|
||||
|
||||
--- The RichText constructor
|
||||
---@param self RichText RichText
|
||||
---@param text_node node|string The text node to make Rich Text
|
||||
---@param value string|nil The initial text value. Default will be gui.get_text(text_node)
|
||||
function M:init(text_node, value)
|
||||
@@ -126,7 +125,6 @@ end
|
||||
|
||||
|
||||
--- Set text for Rich Text
|
||||
---@param self RichText RichText
|
||||
---@param text string|nil The text to set
|
||||
---@return druid.rich_text.word[] words
|
||||
---@return druid.rich_text.lines_metrics line_metrics
|
||||
@@ -189,7 +187,6 @@ end
|
||||
|
||||
|
||||
--- Get current text
|
||||
---@param self RichText RichText
|
||||
---@return string text
|
||||
function M:get_text()
|
||||
return self._last_value
|
||||
@@ -214,7 +211,6 @@ end
|
||||
|
||||
|
||||
--- Get all words, which has a passed tag.
|
||||
---@param self RichText RichText
|
||||
---@param tag string
|
||||
---@return druid.rich_text.word[] words
|
||||
function M:tagged(tag)
|
||||
@@ -227,7 +223,6 @@ end
|
||||
|
||||
|
||||
---Split a word into it's characters
|
||||
---@param self RichText RichText
|
||||
---@param word druid.rich_text.word
|
||||
---@return druid.rich_text.word[] characters
|
||||
function M:characters(word)
|
||||
|
Reference in New Issue
Block a user