Re: Easy Color

From: Peter Ajamian (pajamian@cheapsam.com)
Date: 01/29/00


Phillip A Ames wrote:

> What you would do here, is insert something similar to 'strcat(d->output,
> "\x1B[0;0m");' in this code (which would append the 'normal' color code
> to the end of the string, making color return to normal no matter what.
> Then, the aforementioned code would look something like this:

This will cause strange characters to display on someone's screen if
their client does not support color.  A better solution is to use
CCNRM(d->character, C_SPR) which will check the player's color setting
and only send the normalize code if the player has color enabled.

Another way of doing it which I use is to simply normalize the color in
make_prompt.

Regards, Peter


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT