-
Hi,
What steps should I take to align the text component properly inside my actor? I don't see anything in the docs that would allow me to change the |
Beta Was this translation helpful? Give feedback.
Answered by
eonarheim
Aug 23, 2022
Replies: 1 comment 1 reply
-
Hi @RyanGrieb thanks for opening a discussion! I can think of a couple things you can try to re-position the text graphic.
this.text.font.baseAlign = ex.BaseAlign.Top;
this.graphics.show(this.text, {
offset: ex.vec(0, this.text.localbounds.height)
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
RyanGrieb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @RyanGrieb thanks for opening a discussion!
I can think of a couple things you can try to re-position the text graphic.
ex.Text
draws from the bottom left of the text glyphs by default on theex.BaseAlign.Alphabetic
, try setting it toex.BaseAlgin.Top
?show()
to shift the graphics down