Left alignment of UI elements possible?
I do not understand how the alignment of UI-Labels should work. If I attach two UI-Labels with different label-text into the same UI-Container, then I expect that the Labels are both left aligned.
But that is not what happens. The draw method of the UI-Labels draws the label with a "-this.p.cx" which is different for the two UI-Labels.
Is it possible to make UI-Labels left aligned according to a point?
They should, but right now p.w and p.cx are getting overridden regardless - will fix
I could try a bugfix.
As far as I understand the calcSize method Q.UI.Text works only for center-aligned elements.
Are there other places I have to look for?
if you want to take a stab at it, calcSize is the issue - default sprites are centered on their origin, but that doesn't make sense for most text. It'd be best to be top aligned by default and then either left, right or centered by moving the cx and cy
left: cx=0, cy=0, right: cx=w, cy=0 center: cx = w/2, cy=0
@DanEEStar,
I've fixed the align property of UI.Text, if you set the align to 'left' and stick a label in the left side of a parent the text will render properly. Same for center and right. See: http://htmlpreview.github.io/?https://github.com/mpkorstanje/Quintus/blob/master/examples/text_allign/index.html
Can you check if it works when its done in a UI.Container?
So close this right? @mpkorstanje