Closed mpkorstanje closed 10 years ago
Can you make a screenshot of this please? so i can better recreate the issue, track the problem, and test the fix. Thanks.
Ah sorry about that. Didn't have time to do it properly earlier.
Have a look here: https://github.com/mpkorstanje/Quintus/tree/master/examples/text_allign
Left: Quintus centers all text on the y coordinate of the sprite regardless of alignment. Right: What it looks like after patch. Text alligns left, right or center of it's y coordinate.
Okay. Hold on this one for a bit. I had a look at what Cykod said in #77 and I'm doing this wrong. I should be moving cx, cy about.
I must have been misunderstanding something about how Quintus does its coordinate system. Issue is still there but this fix isn't the right one.
All fixed up. BitShock, it's all yours now. Example has been updated. Left the bad, right the good stuff.
https://github.com/mpkorstanje/Quintus/tree/master/examples/text_allign
Alright i tested it and it's fine ready to merge. But first delete your custom comments and fix the typos (if any) and correct the indentation please. Thank you.
@Bitshock its as clean as it gets.
align is used to both set the alignment in the front string and to physically move the location where the font string is to be. The end result is that align is always centered.
This fixes this by making the default alignment centred and removing the physical positioning of the text.Bounding points are adjusted accordingly.