mirror of
https://github.com/Insality/druid
synced 2025-09-28 02:22:19 +02:00
Update annotations, fix rare errors
This commit is contained in:
@@ -210,7 +210,15 @@ function RichText.set_text(self, text)
|
||||
end
|
||||
|
||||
|
||||
function RichText.get_text(self)
|
||||
return self._last_value
|
||||
end
|
||||
|
||||
|
||||
function RichText:on_remove()
|
||||
pcall(gui.set_texture, self.icon_prefab, self._settings.default_texture)
|
||||
pcall(gui.play_flipbook, self.icon_prefab, self._settings.default_animation)
|
||||
|
||||
self:clear()
|
||||
end
|
||||
|
||||
@@ -238,6 +246,15 @@ function RichText.tagged(self, tag)
|
||||
end
|
||||
|
||||
|
||||
---Split a word into it's characters
|
||||
-- @tparam RichText self @{RichText}
|
||||
-- @tparam druid.rich_text.word word
|
||||
-- @treturn druid.rich_text.word[] characters
|
||||
function RichText.characters(self, word)
|
||||
return rich_text.characters(word)
|
||||
end
|
||||
|
||||
|
||||
--- Get all current words.
|
||||
-- @treturn table druid.rich_text.word[]
|
||||
function RichText:get_words()
|
||||
@@ -277,6 +294,7 @@ function RichText:_create_settings()
|
||||
node_scale = gui.get_scale(self.icon_prefab),
|
||||
image_scale = gui.get_scale(self.icon_prefab),
|
||||
default_animation = gui.get_flipbook(self.icon_prefab),
|
||||
default_texture = gui.get_texture(self.icon_prefab),
|
||||
}
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user