Is there any way to give a text object a border or background?

I made a drag and drop quiz, however, to better differentiate the text from the background, I want to add some sort of border/box around the choices/text, or give the text background color. The problem is that the choices are all different lengths, and I’m not sure how to procedurally generate boxes for every choice.

The Text’s style object has a backgroundColor property. If you want more control, you can instead use a Rectangle shape object with the Text’s width and height. Keep in mind that a Rectangle’s default origin is (0.5, 0.5); it’ll be easier to set it to (0, 0).

1 Like