How do I add a background color to a "text" box?

Get help using Construct 2

Post » Wed May 02, 2012 2:45 am

I am using the text box a lot in my program. I don't mean the text box you can add text to, but rather the box that simply displays text. Is there a way in which I can automatically add a white background to the box?
So far, the only solution I have come up with is adding a sprite of a white image behind the text - this however is a real pain, as I have a ton of boxes, and adding an image behind doesn't quite fit the proportions of the text box. Is there some plug in that can add a white background behind the text?

Alternatively, I've tried using the "Text box" option. However, I cannot figure out how to get the line break to work. I write "Hello" & newline & "World." in the text section of the text box, but it displays ""Hello" & newline & "World."" I'd prefer to be able to use the "text" option, as that way I won't have to do all the line breaks manually, but I was wondering if there was some easy way to add a white box behind the text.

Posts: 3
Reputation: 281

Post » Wed May 02, 2012 4:24 am

There may be a way to do this with one of the custom plugins. Someone else will have to comment on that. But you can add the sprite backgrounds with just a few actions, and adjust them to line up with your text objects to your liking.

I threw this together quickly, so it isn't pretty, but it should give you the idea.


In the example the text objects are just different instances of the same text object. If you have a bunch of different text objects it is a bit more complicated because you have to do the work for each one of them--unless you have the paid version, in which case you may be able to use a family for all of your text objects.

kittiewan2012-05-02 04:29:12
Posts: 281
Reputation: 11,858

Return to How do I....?

Who is online

Users browsing this forum: emoaeden, flemmig, henryScirra, sTARKi, sudeep98, Yura G and 22 guests