Current format of coloring is too unreadable and uses control chars (some plugins can use \ as ctrlchar, this can lead the problems).
I suggest a new format for coloring that uses curly braces: {color}:
{yellow}, {none}, {default}, {red}, {green}, {blue}, {gray}, {grey}, {white}
Example:
ChatPrint(0, "{red}This {green}is {none}some {green}message");
Advantages:
- more readable
- doesn't use ctrlchars
Disadvantages:
- curly braces now should be escaped everywhere (by using
{{ and }}), ChatPrint_EscapeString is more actual now
- it is too long, what about shorten form?
Short form:
{r}, {g}, {b}, {w}, {y}, {d}, {n}
Example:
ChatPrint(0, "{r}This {g}is {n}some {g}message"); // The short form looks more good for me
Disadvantage of short form:
- for gray we should use white (
{w}), because green uses {g}
Problem:
- it is too hard to use
ChatPrint_EscapeString everywhere, what about a new escape function that returns string as return value? (array return)
Current format of coloring is too unreadable and uses control chars (some plugins can use
\as ctrlchar, this can lead the problems).I suggest a new format for coloring that uses curly braces:
{color}:{yellow},{none},{default},{red},{green},{blue},{gray},{grey},{white}Example:
ChatPrint(0, "{red}This {green}is {none}some {green}message");Advantages:
Disadvantages:
{{and}}),ChatPrint_EscapeStringis more actual nowShort form:
{r},{g},{b},{w},{y},{d},{n}Example:
ChatPrint(0, "{r}This {g}is {n}some {g}message"); // The short form looks more good for meDisadvantage of short form:
{w}), because green uses{g}Problem:
ChatPrint_EscapeStringeverywhere, what about a new escape function that returns string as return value? (array return)