mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 10:02:18 +02:00
#107 Better scale text adjust by height for multiline text nodes
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user