Custom Speech Bubbles

For questions about using Classic.

Post » Tue Feb 03, 2009 4:07 pm

This may be a bit much to ask for, but I really need some help, or an example (.cap) of how to set up custom sprite speech bubbles that resize automatically according to the structure of the shown text. And for that matter, how to get the text from an array, and go to the next text line within the array by pressing a button or something.

If this is too much to ask for, I'll just resort to making some huge sprite animation of a speech bubble using different frames for the text. LOL
B
2
G
4
Posts: 40
Reputation: 1,130

Post » Tue Feb 03, 2009 4:21 pm

You could do it like a css content box, and have separate images for the border, then a tillable background for the center.
As for the text, well I think a little more information is needed to figure out what you want to do.
If all that seems a bit too complex, I'd just use the box object...
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Tue Feb 03, 2009 4:29 pm

Since you can't get the dimensions of text right now, you could use another system to define how big a bubble you need. Like specify the bubble size at the start of the speech bubble text, as in "100|Hi there, this is a size 100 speech bubble" or "50|Size 50 bubble!" then use the gettoken system expression to get the size and bubble text. Or if you're using TimeLine, specify the size in a timeline parameter. And so on.

Whatever you do, don't use pre-drawn bubbles in animation frames. That will use loads of VRAM, and you'll quickly run out if you use a lot of bubbles. It'd be better to use one fixed size of bubble and fit your text inside of that, rather than pre-drawn bubbles.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Tue Feb 03, 2009 4:34 pm

Alright guys, I'll try this stuff out. I can't finish my noir project without the speech bubbles, so hopefully my brain will kick in, eh? Thanks for helping. :)
B
2
G
4
Posts: 40
Reputation: 1,130

Post » Tue Feb 03, 2009 5:52 pm

I've added 2 expressions to get the width/height of text to the Text object, for the next build.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests