The Dawn Of Time
The Official Forums for the Dawn Of Time Mud Codebase
 
Log in Register FAQ Memberlist Search The Dawn Of Time Forum Index Goto the Official Dawn Website

For those who want background colors...

 
Post new topic   Reply to topic    The Dawn Of Time Forum Index » Coding
View previous topic :: View next topic  
Author Message
Rylas



Joined: 27 Jan 2003
Posts: 12
Location: Missouri

PostPosted: Wed Jul 02, 2003 2:30 am    Post subject: For those who want background colors... Reply with quote

I have taken the time to add background color support to DoT, BUT, this does not support irc, ircWhite, or HTML, just the basic ANSI codes.

So, here is what ya gotta do:

In colour.cpp, find the following line:

Code:

{'X', false, true, "", "\033[0;37m", "\00315,01", "\00314,00", "</FONT><FONT COLOR=\"#BFBFBF\">"},


After that line, copy and paste this in:

Code:

// Background colors, added by Rylas of Alpha Rebirth
//silver
{'2', false, true, "", "\033[0;40m", "", "", ""},
//red
{'3', false, true, "", "\033[0;41m", "", "", ""},
//green
{'4', false, true, "", "\033[0;42m", "", "", ""},
//yellow
{'5', false, true, "", "\033[0;43m", "", "", ""},
//blue
{'6', false, true, "", "\033[0;44m", "", "", ""},
//magenta
{'7', false, true, "", "\033[0;45m", "", "", ""},
//cyan
{'8', false, true, "", "\033[0;46m", "", "", ""},
//white
{'9', false, true, "", "\033[0;47m", "", "", ""},


Key:

`2 = Grey
`3 = Red
`4 = Green
`5 = Yellow
`6 = Blue
`7 = Magenta
`8 = Cyan
`9 = White

And your done! Recompile and fire that bad boy up.



_________________
Always behave like a duck. Keep calm and unruffled on the top, but paddle like the devil underneath.
Back to top
View user's profile Send private message Visit poster's website AIM Address
mmoritz80



Joined: 21 Sep 2018
Posts: 26
Location: Ohio

PostPosted: Tue Jan 29, 2019 6:40 pm    Post subject: Reply with quote

Updated this for version S.

After this code in colour.cpp (line 63)
Code:
   //Clear - aliased to white
   {'x', "clear - white",   false, true, "", "\033[0;37m", "\00315,01", "\00301,00", "#BFBFBF", "#BFBFBF", "#BFBFBF"},
   {'X', "clear - white",   false, true, "", "\033[0;37m", "\00315,01", "\00301,00", "#BFBFBF", "#BFBFBF", "#BFBFBF"},


Add in the following
Code:
    // Background colors, added by Rylas of Alpha Rebirth
    {'2', "silver-bg",   false, true, "", "\033[0;40m", "", "", "", "", ""},
    {'3', "red-bg",      false, true, "", "\033[0;41m", "", "", "", "", ""},
    {'4', "green-bg",    false, true, "", "\033[0;42m", "", "", "", "", ""},
    {'5', "yellow-bg",   false, true, "", "\033[0;43m", "", "", "", "", ""},
    {'6', "blue-bg",     false, true, "", "\033[0;44m", "", "", "", "", ""},
    {'7', "magenta-bg",  false, true, "", "\033[0;45m", "", "", "", "", ""},
    {'8', "cyan-bg",     false, true, "", "\033[0;46m", "", "", "", "", ""},
    {'9', "white-bg",    false, true, "", "\033[0;47m", "", "", "", "", ""},


Reminder this code only works if you are in colour mode ansi.



_________________
Lands of Oneiro Pending Alpha Test Two

Melissa's Game Dev Blog


Last edited by mmoritz80 on Wed Jan 30, 2019 1:11 am; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website
mmoritz80



Joined: 21 Sep 2018
Posts: 26
Location: Ohio

PostPosted: Wed Jan 30, 2019 12:48 am    Post subject: Reply with quote

I thought I had this working but after using the new background color codes on a test item in the game, I have discovered that my silver background (color code `2) is not working.

All of the other background colors are showing up fine. I'm not sure what would cause one of the color codes to fail while all of the others seem to function as expected.

Here's a screenshot showing all of the background colors.



_________________
Lands of Oneiro Pending Alpha Test Two

Melissa's Game Dev Blog
Back to top
View user's profile Send private message Visit poster's website
Daos



Joined: 29 Jan 2003
Posts: 1224
Location: United States

PostPosted: Sun Apr 14, 2019 3:15 am    Post subject: Reply with quote

mmoritz80 wrote:
I thought I had this working but after using the new background color codes on a test item in the game, I have discovered that my silver background (color code `2) is not working.

All of the other background colors are showing up fine. I'm not sure what would cause one of the color codes to fail while all of the others seem to function as expected.

Here's a screenshot showing all of the background colors.


Try highlighting the text with your mouse and see what happens. You may need to use another color to unveil the text.



_________________
- Daos

http://www.dawnoftime.org
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    The Dawn Of Time Forum Index » Coding All times are GMT + 13 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


Powered by phpBB © 2001-2005 phpBB Group
Theme created by Vjacheslav Trushkin