Skip to content

New format for coloring #1

Description

@WPMGPRoSToTeMa

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions