Changing colour of specific words in a string

For questions about using Classic.

Post » Fri Oct 21, 2011 11:22 pm

I was wondering can the text object change colours of particular line of text?

This is what I mean.

string is:
"Enter" + NewLine + "Exit"

Then it should be:
Enter
Exit


If I were to use text object I could change the colour of all text to red. However, I do not know how to change the colour of 1 line or a section of the string to red (or any other colour)

If I could change the colour of particular text it would look something like:
Enter
Exit

Is there actually some kind of tags (like in html/css) that I could add into the string to modify the colours? Or is the text of the text object is just a long line of string?
B
3
G
1
Posts: 44
Reputation: 563

Post » Sat Oct 22, 2011 7:37 am

It is one string, colored once.
You could create several instances of a text object, one for every line of text and set the text and the color seperately. You could pick the right text line by using a pv set to the line number of that text line.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sat Oct 22, 2011 10:48 am

So in other words doing:

<color=red>Enter</color>
<color=green>Exit</color>

will not work. I in fact have to create multiple text objects to create the effect that I want. Well this makes it a bit difficult.
B
3
G
1
Posts: 44
Reputation: 563

Post » Sat Oct 22, 2011 10:12 pm

Oh actually If there was an easy way to do it It would have helped me a lot on my project too. Beceause on my project I give player a text. Than I want player to write it fast. If he writes a letter wrong than change that letter's color to red if its true change color to green. It would be perfect.
B
7
S
1
G
1
Posts: 76
Reputation: 904

Post » Sun Oct 23, 2011 1:22 am

[QUOTE=jangsy5] So in other words doing:

<color=red>Enter</color>
<color=green>Exit</color>

will not work. I in fact have to create multiple text objects to create the effect that I want. Well this makes it a bit difficult.[/QUOTE]

There is an HTML object, if you feel like toying around with that.
B
51
S
10
G
7
Posts: 184
Reputation: 6,825


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests