Ability to specify colours for certain parts of strings?

New releases and general discussions.

Post » Mon Dec 24, 2007 10:16 pm

Hi,

I havn't actually checked this out for myself in construct yet, but is it possible to make certain parts of a string different colours? The use of this would be for a chat room, you'd want to have PMs different colours than normal chat, and probably usernames different colours from the chat they've just sent.

Can this be done already? If not is it hard to add to the current string plugin?

Thanks,
Alex
B
2
S
2
G
5
Posts: 448
Reputation: 2,546

Post » Wed Dec 26, 2007 9:41 pm

You can do this using the html text box. All you'd have to do is wrap the text around html tags like

[code:375olocp]<font color="red">Random Font text here</font>
[/code:375olocp]

However, this would probably be easier with some sort of string parser... Which unfortunately, Construct doesn't seem to have...


I probably should start looking into the plugin dev kit...
B
4
S
1
G
5
Posts: 65
Reputation: 1,932

Post » Thu Dec 27, 2007 3:59 pm

Can you set the background to transparent with that object?
B
2
S
2
G
5
Posts: 448
Reputation: 2,546

Post » Thu Dec 27, 2007 6:08 pm

No you can't, sorry... we need something like a transparent RTF plugin. I'll see if I can have one ready by 1.0.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Thu Dec 27, 2007 10:28 pm

Yeah that would be cool Ashley. Something MMF is lacking severly.
B
2
S
2
G
5
Posts: 448
Reputation: 2,546

Post » Tue Jan 01, 2008 3:48 pm

Might it be possible to alter the HTML Control so it renders with transparency? That'd be awesome, so that the background could be semitransparent. I dunno how it'd work exactly, however, because you'd really need for it to be blendable. So alpha PNGs blend with the transparent background, and cleartype fonts too.
B
4
S
1
G
5
Posts: 48
Reputation: 1,546

Post » Tue Jan 01, 2008 3:55 pm

It might be possible to make HTML render with a transparent background, but I don't know about alpha blending with the background - it's a windows control so I assume it wouldnt cooperate with a DirectX app. But I'll give it a shot anyway.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Thu Jan 03, 2008 12:07 am

Cleartype fonts would be the main thing I think.
B
4
S
1
G
5
Posts: 48
Reputation: 1,546


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 5 guests