It looks like you're new here. If you want to get involved, click one of these buttons!
local layer = Popup.new({easing = conf.easing}) layer:setFillStyle(Shape.SOLID, 0x0000ff, 0.5) layer:setLineStyle(5, 0x000000) layer:setPosition(conf.width/2, conf.height/2) layer:setScale(0) self:addChild(layer) ... local helpDesc = TextWrap.new("Lorem ipsum a dolor sit amet, consectetur adipiscing elit. Morbi ultrices varius tortor. Donec dui nunc, mollis eu dignissim ut, vestibulum vel nunc. Etiam odio est, facilisis imperdiet lacus ut, suscipit bibendum tellus. Ut bibendum elementum a tortor molestie cursus. Lorem a ipsum dolor sit amet, consectetur adipiscing elit. Nullam ut elementum arcu. Fusce mollis eros sapien, sed dictum libero dapibus eget. In bibendum eleifend convallis. Nulla facilisi. ", textWidth, "justify", 5, conf.descriptionFont) helpDesc:setPosition(-layer:getWidth()/2 + 30, -layer:getHeight()/2 + 150) helpDesc:setTextColor(0xffffff) layer:addChild(helpDesc) |
Comments
May it be related to half pixel positioning? Like positioning text to 10.5 pixel
And I try tahoma.ttf and again I get the misaligned texts on textwrap.
Thanks
I think problem is on game template scale parts. But since I am a newbie, probably it is not related with that.
Thanks for your advise.
I solved alignment problem by changing TextWrap class to Atilim's version. See the attached project of yours and see the change in Textwrap.lua and help.lua.
EDIT: or you can use @talis provided version
I am using Atilim's version. But I can not see 'justify' option on TextWrap class.
Is it implemented?
see here it is the 6th paremeter:
Likes: talis
For example phrase "Certainly\nyes" aligns perfectly, while phrase "Most\nlikely" for some reason shifts to the right.
Did somebody find a solution how to centrify multiline textfields?
Sometimes it centrifies text, sometimes it shifts it to the right, depends on God knows what:
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Guys can you check attached project, is there a solution how to centrify text?
Neither TextWrap nor TextArea is of any help
Is there a bug in TextWrap/TextArea or somewhere in the very engine itself?
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Likes: SinisterSoft, totebo
How do new layout abilities work? I didn't find any examples now.
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
http://giderosmobile.com/forum/discussion/comment/55387/#Comment_55387
Likes: totebo, MoKaLux
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Likes: pm1891
https://deluxepixel.com
https://deluxepixel.com
Likes: SinisterSoft
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
https://deluxepixel.com