mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 10:02:18 +02:00
Replace treturn
This commit is contained in:
@@ -280,7 +280,7 @@ end
|
||||
|
||||
--- Set input field text
|
||||
---@param self RichInput RichInput
|
||||
-- @treturn druid.input Current input instance
|
||||
---@return druid.input Current input instance
|
||||
---@param text string The input text
|
||||
function M:set_text(text)
|
||||
self.input:set_text(text)
|
||||
@@ -293,7 +293,7 @@ end
|
||||
--- Set input field font
|
||||
---@param self RichInput RichInput
|
||||
---@param font hash The font hash
|
||||
-- @treturn druid.input Current input instance
|
||||
---@return druid.input Current input instance
|
||||
function M:set_font(font)
|
||||
gui.set_font(self.input.text.node, font)
|
||||
gui.set_font(self.placeholder.node, font)
|
||||
@@ -314,7 +314,7 @@ end
|
||||
-- ex: [%a%d] for alpha and numeric
|
||||
---@param self RichInput RichInput
|
||||
---@param characters string Regulax exp. for validate user input
|
||||
-- @treturn RichInput Current instance
|
||||
---@return RichInput Current instance
|
||||
function M:set_allowed_characters(characters)
|
||||
self.input:set_allowed_characters(characters)
|
||||
|
||||
|
@@ -128,8 +128,8 @@ end
|
||||
--- Set text for Rich Text
|
||||
---@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
|
||||
---@return druid.rich_text.word[] words
|
||||
---@return druid.rich_text.lines_metrics line_metrics
|
||||
-- @usage
|
||||
-- • color: Change text color
|
||||
--
|
||||
@@ -190,7 +190,7 @@ end
|
||||
|
||||
--- Get current text
|
||||
---@param self RichText RichText
|
||||
-- @treturn string text
|
||||
---@return string text
|
||||
function M:get_text()
|
||||
return self._last_value
|
||||
end
|
||||
@@ -216,7 +216,7 @@ end
|
||||
--- Get all words, which has a passed tag.
|
||||
---@param self RichText RichText
|
||||
---@param tag string
|
||||
-- @treturn druid.rich_text.word[] words
|
||||
---@return druid.rich_text.word[] words
|
||||
function M:tagged(tag)
|
||||
if not self._words then
|
||||
return
|
||||
@@ -229,21 +229,21 @@ end
|
||||
---Split a word into it's characters
|
||||
---@param self RichText RichText
|
||||
---@param word druid.rich_text.word
|
||||
-- @treturn druid.rich_text.word[] characters
|
||||
---@return druid.rich_text.word[] characters
|
||||
function M:characters(word)
|
||||
return rich_text.characters(word)
|
||||
end
|
||||
|
||||
|
||||
--- Get all current words.
|
||||
-- @treturn table druid.rich_text.word[]
|
||||
---@return table druid.rich_text.word[]
|
||||
function M:get_words()
|
||||
return self._words
|
||||
end
|
||||
|
||||
|
||||
--- Get current line metrics
|
||||
--- @treturn druid.rich_text.lines_metrics
|
||||
----@return druid.rich_text.lines_metrics
|
||||
function M:get_line_metric()
|
||||
return self._line_metrics
|
||||
end
|
||||
|
Reference in New Issue
Block a user