Found another bug with the text handling. Ever since the cool new layout changes, it seems sometimes my mono-spaced fonts are not lining up.
If you run the below in a mono-spaced font, then * at the end should all match up like you see below. But they do not. It seems that the space (" ") might be the issue. Part of my game relies on mono-spaced fonts to actually be mono-spaced (simulating old computers), which now does not happen.
And yes, I tried a lot of different layout options. They don't seem to effect the actual width of a character.
Hope it's an easy fix!
Here, you can see the stars on the right side aren't lining up like they should:
text = [[
******************************************
* *
* CONGRATULATIONS! *
* CONGRATULATIONS *
* CONGRATS *
* *
******************************************
]]
local textfield=TextField.new(font,text)
stage:addChild(textfield) |
Comments
EDIT: Lokking at the code I can think of a way to fix this while making it more efficient at the same time, will do that soon.
Likes: keszegh, SinisterSoft, Atavismus, antix, totebo, EricCarr, pie
Classic @hgy29.
Likes: Atavismus
Hopefully I didn't break something else...
Likes: antix, EricCarr