Is the new text alignment always top aligned?

It’s great that we finally have text alignment in multiline newText objects.  

However I’ve noticed that if I “center” align my text, it is always top aligned as well. Is this by design, or have I missed something?

We have some popup boxes that are a fixed size, however the text within them will vary. Therefore I know the maximum SIZE of the textbox (slightly smaller than the popup) and can set that. What we don’t know is how long the text string will be. If it’s long enough to fill the newText area then great, but when it’s not long enough we would want to center-center align it, not top-center align.

Can this be done yet?

Hi @AIanPlantPot,

Vertical alignment (as a property) isn’t yet supported, but could you do a “0” height setting on the text object instead of setting it outright, allow it to flow to whatever height it needs to be, then use the height property to gather its height and center it vertically in another line of code? I suppose this would (in theory) allow the text to flow outside of your bounding box limits if there was alot of it, but perhaps you could control that some other way, i.e. cut off the characters at a certain set limit (or maybe it won’t be an issue if there’s never going to be a large amount of text in the boxes).

Hopefully this helps somewhat,

Brent

That should work, I feel like a simpleton for not thinking of it.

Thanks Brent!

Hi @AIanPlantPot,

Vertical alignment (as a property) isn’t yet supported, but could you do a “0” height setting on the text object instead of setting it outright, allow it to flow to whatever height it needs to be, then use the height property to gather its height and center it vertically in another line of code? I suppose this would (in theory) allow the text to flow outside of your bounding box limits if there was alot of it, but perhaps you could control that some other way, i.e. cut off the characters at a certain set limit (or maybe it won’t be an issue if there’s never going to be a large amount of text in the boxes).

Hopefully this helps somewhat,

Brent

That should work, I feel like a simpleton for not thinking of it.

Thanks Brent!

Thanks Brent, I’ve been puking blood because this issue for last couple of months. Could you please add it in the documentation too, since I think that it’s a very important functionality that most larger games and business apps will require.

Thanks.

It should be work.

Thanks Brent, I’ve been puking blood because this issue for last couple of months. Could you please add it in the documentation too, since I think that it’s a very important functionality that most larger games and business apps will require.

Thanks.

It should be work.