Re: [NEWBIE]Where i change the color of stats?

From: Mike Stilson (mike@velgarian.sytes.net)
Date: 09/04/02


On Tue, Sep 03, 2002 at 10:49:26PM -0500, Bobby@hotmail wrote:
>> On Tue, Sep 03, 2002 at 09:45:22PM -0300, Nikolas wrote:
>> >char *make_prompt(struct descriptor_data *d)
>> >{
>> [snip code that adds hard-coded ANSI color codes]
>> >}
>>
>> Well yeah, that's sure one way of doing it.
>>
>> If that's the patch/snippet that has prompt_str() then make_prompt()
>> should be calling that with something like:
>> if(STATE(d)==CON_PLAYING)) prompt = prompt_str(d->character);
>> or something along those lines.
>>
>> If it isn't, I'm not familiar with the snippet you're talking about.
>> Your way will (and obviously is) working for you, but it makes future
>> modifications a little bit more involved.
>What is the whole code for this snippet and what files are edited?

Uh, I'm not posting the entire patch (which I'm not even sure is the
same one) but it creates a file color.c which has the functions
is_colour(), proc_color().  The one I'm talking about, I think, was the
easycolor patch.

If it isn't, then I can't be specific, but at the end of the
make_prompt() function, you could just add something like:


+  prompt = function_that_processes_color(prompt, ...whatever other params it takes);
   return(prompt);
}

(this is a guess, YMMV).

-me

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT