Text Parsing/Coloring?

  • Thread starter Thread starter Donald Smith
  • Start date Start date
D

Donald Smith

Hey,

How it works is, wolfenstein has a color code system built into it. By
typing ^(a-z or 0-9 key here), it gets a value that represents a color, each
key has a different color. Like ^1 = Red, ^2 = Green, 3 = Yellow, etc.

What I need done is, when my program reads a string, it looks for the
^(key) value and sets the forecolor of the string to that color. But then
when it reads another ^(key) value, it does the same thing until no ^(key)
values are left.

Example:

The Input is like this:

^0Ki^7ng^3*^0Publ^7ic^3?

And The Output would be this:

King*Public?


I found a good example online:
http://enemy-territory.4players.de:1041/modules.php?name=Nick_Colors
That's exactly what I need done, only in C#. Thanks.

- Donald.
 
Back
Top