Annotations update [5]

This commit is contained in:
Insality
2023-10-18 10:40:08 +03:00
parent 24bb39481d
commit 4a16a8bc07
10 changed files with 209 additions and 9 deletions

View File

@@ -53,6 +53,9 @@
--- Current text position
-- @tfield vector3 pos
--- The last text value
-- @tfield string last_value
--- Initial text node scale
-- @tfield vector3 start_scale
@@ -320,6 +323,19 @@ function Text.set_to(self, set_to)
end
--- Set text area size
-- @tparam Text self @{Text}
-- @tparam vector3 size The new text area size
-- @treturn Text Current text instance
function Text.set_size(self, size)
self.start_size = size
self.text_area = vmath.vector3(size)
self.text_area.x = self.text_area.x * self.start_scale.x
self.text_area.y = self.text_area.y * self.start_scale.y
update_adjust(self)
end
--- Set color
-- @tparam Text self @{Text}
-- @tparam vector4 color Color for node