mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
Fix text width being calculated incorrectly in certain situations
This commit is contained in:
parent
3265575d1e
commit
838ac1c85c
@ -389,7 +389,6 @@ function newobject:SetText(t)
|
||||
v.x = drawx
|
||||
v.y = drawy
|
||||
else
|
||||
if k ~= 1 then
|
||||
if string.byte(text) == 10 then
|
||||
twidth = 0
|
||||
drawx = 0
|
||||
@ -408,9 +407,6 @@ function newobject:SetText(t)
|
||||
drawx = drawx + prevtextwidth
|
||||
textwidth = textwidth + width
|
||||
end
|
||||
else
|
||||
initialwidth = width
|
||||
end
|
||||
prevtextwidth = width
|
||||
prevtextheight = height
|
||||
v.x = drawx
|
||||
@ -424,7 +420,7 @@ function newobject:SetText(t)
|
||||
end
|
||||
|
||||
if textwidth < largestwidth then
|
||||
textwidth = largestwidth + initialwidth
|
||||
textwidth = largestwidth
|
||||
end
|
||||
|
||||
if maxw > 0 then
|
||||
|
Loading…
Reference in New Issue
Block a user