replace all tparam

This commit is contained in:
Insality
2024-11-07 18:34:27 +01:00
parent 999c6222a0
commit 620facbe1f
15 changed files with 281 additions and 281 deletions

View File

@@ -263,8 +263,8 @@ end
--- Set placeholder text
-- @tparam RichInput self RichInput
-- @tparam string placeholder_text The 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)
return self
@@ -272,16 +272,16 @@ end
--- Select input field
-- @tparam RichInput self RichInput
---@param self RichInput RichInput
function M:select()
self.input:select()
end
--- Set input field text
-- @tparam RichInput self RichInput
---@param self RichInput RichInput
-- @treturn druid.input Current input instance
-- @tparam string text The input text
---@param text string The input text
function M:set_text(text)
self.input:set_text(text)
gui.set_enabled(self.placeholder.node, true and #self.input:get_text() == 0)
@@ -291,8 +291,8 @@ end
--- Set input field font
-- @tparam RichInput self RichInput
-- @tparam hash font The font hash
---@param self RichInput RichInput
---@param font hash The font hash
-- @treturn druid.input Current input instance
function M:set_font(font)
gui.set_font(self.input.text.node, font)
@@ -303,7 +303,7 @@ end
--- Set input field text
-- @tparam RichInput self RichInput
---@param self RichInput RichInput
function M:get_text()
return self.input:get_text()
end
@@ -312,8 +312,8 @@ end
--- Set allowed charaters for input field.
-- See: https://defold.com/ref/stable/string/
-- ex: [%a%d] for alpha and numeric
-- @tparam RichInput self RichInput
-- @tparam string characters Regulax exp. for validate user input
---@param self RichInput RichInput
---@param characters string Regulax exp. for validate user input
-- @treturn RichInput Current instance
function M:set_allowed_characters(characters)
self.input:set_allowed_characters(characters)

View File

@@ -85,9 +85,9 @@ local M = component.create("rich_text")
--- The RichText constructor
-- @tparam RichText self RichText
-- @tparam node|string text_node The text node to make Rich Text
-- @tparam string|nil value The initial text value. Default will be gui.get_text(text_node)
---@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)
self.root = self:get_node(text_node)
self.text_prefab = self.root
@@ -126,8 +126,8 @@ end
--- Set text for Rich Text
-- @tparam RichText self RichText
-- @tparam string|nil text The text to set
---@param self RichText RichText
---@param text string|nil The text to set
-- @treturn druid.rich_text.word[] words
-- @treturn druid.rich_text.lines_metrics line_metrics
-- @usage
@@ -189,7 +189,7 @@ end
--- Get current text
-- @tparam RichText self RichText
---@param self RichText RichText
-- @treturn string text
function M:get_text()
return self._last_value
@@ -214,8 +214,8 @@ end
--- Get all words, which has a passed tag.
-- @tparam RichText self RichText
-- @tparam string tag
---@param self RichText RichText
---@param tag string
-- @treturn druid.rich_text.word[] words
function M:tagged(tag)
if not self._words then
@@ -227,8 +227,8 @@ end
---Split a word into it's characters
-- @tparam RichText self RichText
-- @tparam druid.rich_text.word word
---@param self RichText RichText
---@param word druid.rich_text.word
-- @treturn druid.rich_text.word[] characters
function M:characters(word)
return rich_text.characters(word)