TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Change color of local echo

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
mattikus



Joined: 06 Aug 2008
Posts: 15

PostPosted: Thu Aug 07, 2008 12:58 pm    Post subject: Change color of local echo Reply with quote

Is there any easy way to change the color of the local echo? I used to have it set to yellow in mushclient, it helped me visually differentiate it from the surrounding text.
Back to top
View user's profile Send private message
magiko



Joined: 11 May 2006
Posts: 33

PostPosted: Thu Aug 07, 2008 2:27 pm    Post subject: Reply with quote

Scandum may reply with a builtin solution (he does that...), but I don't know it :p.

In the mean time, here's a stab at it. This is a replacement function for how you use echo - simply a wrapper:

Code:

#function {myecho} {#echo <018>%0<088>}
@myecho{test string}


(colors listed in #help color) You don't have to use the function, but it's a bit better than sticking the color codes directly into all echos.
Back to top
View user's profile Send private message
mattikus



Joined: 06 Aug 2008
Posts: 15

PostPosted: Thu Aug 07, 2008 3:15 pm    Post subject: Reply with quote

I wish it were that simple. The echo i'm referring to is the echo generated after you type in a command on screen.

for example:

I would type look, then "look" would appear on the screen, followed by the the room description. Right now it just has look in the normal colors of the output, without a clear way to differentiate it from the surrounding text.
Back to top
View user's profile Send private message
magiko



Joined: 11 May 2006
Posts: 33

PostPosted: Thu Aug 07, 2008 3:29 pm    Post subject: Reply with quote

"That's funny... mine's white..."

Took me a bit to figure out that #split changes the typed commands in the onscreen buffer. #split's useful even if it doesn't fix your color issue.

The only color I changed in my terminal (from what I recollect) is bg to a middle grey (probably so I could see both white and black) - your mileage will vary there, I'm sure.
Back to top
View user's profile Send private message
mattikus



Joined: 06 Aug 2008
Posts: 15

PostPosted: Thu Aug 07, 2008 3:33 pm    Post subject: Reply with quote

Yep, I am indeed using #split, and my text is white as well. I would prefer it to be yellow. I think it's probably hard coded into the code and If I knew where to look I could change it. I did a cursory search earlier but I haven't found a likely spot for it yet.
Back to top
View user's profile Send private message
mattikus



Joined: 06 Aug 2008
Posts: 15

PostPosted: Thu Aug 07, 2008 3:39 pm    Post subject: Reply with quote

Looks like this has been asked before: http://tintin.sourceforge.net/board/viewtopic.php?t=410

I think i've found the relevant portion of the code, I'm attempting to hack my functionality in now.
Back to top
View user's profile Send private message
mattikus



Joined: 06 Aug 2008
Posts: 15

PostPosted: Thu Aug 07, 2008 3:53 pm    Post subject: Reply with quote

Found it.

In input.c, I changed:
Code:
   
if (HAS_BIT(ses->flags, SES_FLAG_SPLIT))
    {
        sprintf(buffer, "\033[0;37m%s", line);
    }


to:
Code:

if (HAS_BIT(ses->flags, SES_FLAG_SPLIT))
    {
        sprintf(buffer, "\033[0;33m%s", line);
    }


Which gives me the yellow text i wanted.
Back to top
View user's profile Send private message
magiko



Joined: 11 May 2006
Posts: 33

PostPosted: Thu Aug 07, 2008 4:06 pm    Post subject: Reply with quote

Bah. You beat me to it by a few minutes. A few lines later you can change the color for non split, as well.

(White on black background tho? Killer on the eyes. I do black text on the gray).
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3274

PostPosted: Thu Aug 07, 2008 11:30 pm    Post subject: Reply with quote

Looks like I promised a config option for the command color a long time ago.

I went ahead and changed #config {echo command} to #config {command echo} and added a #config {command color} option that allows setting a 3 digit color code.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group