Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New format for coloring #1

Open
WPMGPRoSToTeMa opened this issue Sep 8, 2016 · 0 comments
Open

New format for coloring #1

WPMGPRoSToTeMa opened this issue Sep 8, 2016 · 0 comments

Comments

@WPMGPRoSToTeMa
Copy link
Owner

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant