mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 18:12:19 +02:00
Annotations update [5]
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user