(Resolved) How to center text to an image?

Hi, I’ve been looking at how to automatically center text to a Comic type dialogue balloon, but despite researching I haven’t managed to do it, so I hope you can help me.

Hello. I didn’t understand so can tell more about what you want?

Can you use a BBText object, make the text box as large as the speech bubbles and then use markup code to centre the text? Or do you want the text to fill the speech bubble automatically and flow within the bubble’s edges?

What I want to do is that the text is always centered in the image so as not to do it manually.

Sorry for explaining myself wrong, what I want is to center the text on an image to make it manga-like dialogues.

The above expressions are incorrect. It’ll center the text on the upper-left most side of the text.

You want to use mangabubble.CenterX()/Y, not X/Y

Yeah but I said


To clarify, you really should not change points unnecessarily, that can lead to odd behaviors when you’re repositioning objects.

Points should realistically only be modified if there is a deep functional need, like assets that are already offset (many sprites obtained with transparencies around them).

The engine already provides functionality to find the center, no need to go outside of that functionality.

Thank you! It was what she needed, thank you very much for his help and time.

1 Like