cut off long server descriptions in scoreboard (maybe L8R we'll linewrap up to a limit) [kudos@SKB]
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5193 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -245,7 +245,15 @@ void renderscores(void *menu, bool init)
|
||||
if(s)
|
||||
{
|
||||
if(servstate.mastermode > MM_OPEN) concatformatstring(serverline, servstate.mastermode == MM_MATCH ? "M%d " : "P ", servstate.matchteamsize);
|
||||
concatformatstring(serverline, "%s:%d %s", s->name, s->port, s->sdesc);
|
||||
// ft: 2010jun12: this can write over the menu boundary
|
||||
//concatformatstring(serverline, "%s:%d %s", s->name, s->port, s->sdesc);
|
||||
// for now we'll just cut it off, same as the serverbrowser
|
||||
// but we might want to consider wrapping the bottom-line to accomodate longer descriptions - to a limit.
|
||||
string text;
|
||||
filtertext(text, s->sdesc);
|
||||
for(char *p = text; (p = strchr(p, '\"')); *p++ = ' ');
|
||||
text[38] = '\0'; // serverbrowser has less room - +8 chars here
|
||||
concatformatstring(serverline, "%s:%d %s", s->name, s->port, text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user