Topic: [SUGGESTION] A Teeworlds customized console
Hey !
As I found the teeworlds console (I mean, he real console, not the ingame interface) a little bit ugly and sad in Black&White, I tried to add some colors :
Hope you like it
You are not logged in. Please login or register.
Teeworlds Forum → Development → [SUGGESTION] A Teeworlds customized console
Hey !
As I found the teeworlds console (I mean, he real console, not the ingame interface) a little bit ugly and sad in Black&White, I tried to add some colors :
Hope you like it
Ehm... yeah but... the download link? xD
Awesome stuff.
Uhm...
DL link
maybe useful for players who like many "crazy" colors...
but i prefer the simple white letters, they are relaxing to me
I don't see where it could be interesting for regular players.
But it's a nice feature for any debugging purpose IMO...
Trust me it's useful. When many ppl are on a server and you can't get a hold of the chat or the messages disappeared, this really helps to check the previous messages in console that are usually spammed with shitty server infos.
Thanks dune, but put a downloadlink -.-
i think its useful for the person who hosts the server and for some debugging stuff like spl0k mentioned. But most servers are hosted on servers without any destop stuff... so the coloration would make more sense in rcon
btw... there is a new system for debug messages on its way which will prevent console spam at least in rcon (for now not a single debug message will pop up in rcon)
Sorry for no download link, but this was just a try, just to show you how this could look like ^^
I passed 20s to decide which colors I will use, so... maybe not the best ones.
I also can put some background color, and btw I deleted some 'useless' info for the basic server hoster such as the date in hexa and the 'prediction reset' spamming warnings.
For info, I also managed to do some ASCII drawing that you see before Teeworlds start.
Here, I did that with "gamer", but well, I'm a programmer, not a designer, do not forget that
Then, about this "download link". There is not much change to do, only problem are Operating Systems.
void dbg_msg(const char *sys, const char *fmt, ...)
{
va_list args;
char str[1024*4];
char *msg;
int i, len;
#if defined(CONF_FAMILY_WINDOWS)
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
int hOut_background = (int)hOut & 0xFFF0; // This 'saves' the background color
#endif
str_format(str, sizeof(str), "[%s]: ", sys);
len = strlen(str);
msg = (char *)str + len;
va_start(args, fmt);
#if defined(CONF_FAMILY_WINDOWS)
_vsnprintf(msg, sizeof(str)-len, fmt, args);
#else
vsnprintf(msg, sizeof(str)-len, fmt, args);
#endif
va_end(args);
#if defined(CONF_FAMILY_WINDOWS)
if(!strcmp(sys, "chat"))
{
if(strstr(msg, "*** ") == msg)
SetConsoleTextAttribute(hOut, FOREGROUND_RED | FOREGROUND_GREEN | hOut_background);
else
SetConsoleTextAttribute(hOut, FOREGROUND_RED | FOREGROUND_INTENSITY | hOut_background);
}
if(!strcmp(sys, "client") || !strcmp(sys, "netclient"))
SetConsoleTextAttribute(hOut, FOREGROUND_BLUE | FOREGROUND_GREEN | hOut_background);
#elif defined(CONF_FAMILY_UNIX)
if(!strcmp(sys, "chat"))
{
if(strstr(msg, "*** ") == msg)
printf("\033[33;00m");
else
printf("\033[31;01m");
}
if(!strcmp(sys, "client") || !strcmp(sys, "netclient"))
printf("\033[34;01m");
#elif defined(CONF_PLATFORM_MACOSX)
if(!strcmp(sys, "chat"))
{
if(strstr(msg, "*** ") == msg)
printf("\e[33;00m");
else
printf("\e[31;01m");
}
if(!strcmp(sys, "client") || !strcmp(sys, "netclient"))
printf("\e[34;01m");
#endif
for(i = 0; i < num_loggers; i++)
loggers[i](str);
#if defined(CONF_FAMILY_WINDOWS)
SetConsoleTextAttribute(hOut, 0x0007 | hOut_background);
#elif defined(CONF_FAMILY_UNIX)
printf("\033[m");
#elif defined(CONF_PLATFORM_MACOSX)
printf("\e[m");
#endif
}
I cannot test this code for Linux and Mac, so I just can hope this is going to work - normally this does.
Really sorry bout those OS
Do I need to enable ANSI.sys for this?
Cause colored letters are usually only available by enabling ANSI.sys on windows.
Mh, I don't think so.
I hadn't to enable anything, this should work as is. (I'm on Windows 7)
H!, all
Teeworlds is danger o.O
I made a drawing of: ''Its's danger Teeworlds''
It is smal, I hope you like it! ^^
look on: http://www.2shared.com/photo/KqiyMQuP/T … anger.html
H!, all
Teeworlds is danger o.O
I made a drawing of: ''Its's danger Teeworlds''
It is smal, I hope you like it! ^^look on: http://www.2shared.com/photo/KqiyMQuP/T … anger.html
wrong subforum. post this in Content: Graphics
@topic
It is a good idea but you should choose other colours.
some which are less "powerful". But i know its just a test and easy to change
edit: upps. sorry, topic is outdated.
i like thats fun xD
@topic
It is a good idea but you should choose other colours.
some which are less "powerful". But i know its just a test and easy to change
The topic is a bit less than one year old. Maybe it's a bit outdated
Actually, some OS do not open a console window at the startup of the client, so it's not that useful, but I implemented it on that client if you're interested in how it's looking.
AwayD wrote:@topic
It is a good idea but you should choose other colours.
some which are less "powerful". But i know its just a test and easy to changeThe topic is a bit less than one year old. Maybe it's a bit outdated
Actually, some OS do not open a console window at the startup of the client, so it's not that useful, but I implemented it on that client if you're interested in how it's looking.
actually i just wanted to answer harmen and i dont wanted to spam so i just wrote something about it xd
and of course i already know your client
Teeworlds Forum → Development → [SUGGESTION] A Teeworlds customized console
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.