I’m trying to render dialogue text in different alignments (TopLeft, MiddleCenter, etc.) instead of always anchoring to the top-left corner.
I had a system where you could set alignment in the data like:
alignment = "TopLeft"
or
alignment = "MiddleCenter"
It worked before, but now whenever I try to “center” the text (using AbsoluteSize.X - textLength / 2),the text keeps snapping to the top-left corner (out of frame) instead of centering.. The alignment seems correct logically, but the text appears tiny and misplaced.
I reverted back to the original version because of these problems 💔 .
I think to get the alignment it should be something like offsetting by half of the label’s size minus half of the text’s size, thanks to fudifin for telling me. But I’m confused on how to properly implement this.
How do I correctly handle multiple alignments (MiddleCenter, BottomRight, etc.) for this dialogue text without it breaking into the top-left corner or scaling incorrectly?
