#107 Better scale text adjust by height for multiline text nodes

This commit is contained in:
Insality
2021-10-23 16:18:43 +03:00
parent ab3f5f8e31
commit ba312742d2
3 changed files with 12 additions and 9 deletions

View File

@@ -29,18 +29,18 @@ local function setup_texts(self)
timer.delay(0.3, true, function()
anchoring:set_pivot(pivots[pivot_index])
pivot_index = pivot_index + 1
pivot_index = pivot_index + 1
if pivot_index > #pivots then
pivot_index = 1
end
end)
timer.delay(0.2, true, function()
big_text = big_text .. " max"
timer.delay(0.3, true, function()
big_text = big_text .. " m a x"
width:set_to(big_text)
height:set_to(big_text)
if #big_text > 50 then
if #big_text > 120 then
big_text = "Check max size"
end
end)