(svn r6931) -Codechange: Change textmessage format a bit. Only the sender's name and target are

in the sender's colour, the actual message is in white. Should improve readability.
This commit is contained in:
Darkvater
2006-10-24 22:19:12 +00:00
parent c4ac95efa8
commit a28048a4ea
3 changed files with 25 additions and 32 deletions

View File

@@ -150,36 +150,27 @@ void CDECL NetworkTextMessage(NetworkAction action, uint16 color, bool self_send
snprintf(message, sizeof(message), "*** %s %s", name, temp);
}
break;
case NETWORK_ACTION_CHAT_COMPANY:
if (self_send) {
SetDParamStr(0, name);
GetString(temp, STR_NETWORK_CHAT_TO_COMPANY, lastof(temp));
snprintf(message, sizeof(message), "%s %s", temp, buf);
} else {
SetDParamStr(0, name);
GetString(temp, STR_NETWORK_CHAT_COMPANY, lastof(temp));
snprintf(message, sizeof(message), "%s %s", temp, buf);
}
break;
case NETWORK_ACTION_CHAT_CLIENT:
if (self_send) {
SetDParamStr(0, name);
GetString(temp, STR_NETWORK_CHAT_TO_CLIENT, lastof(temp));
snprintf(message, sizeof(message), "%s %s", temp, buf);
} else {
SetDParamStr(0, name);
GetString(temp, STR_NETWORK_CHAT_CLIENT, lastof(temp));
snprintf(message, sizeof(message), "%s %s", temp, buf);
}
break;
case NETWORK_ACTION_NAME_CHANGE:
GetString(temp, STR_NETWORK_NAME_CHANGE, lastof(temp));
snprintf(message, sizeof(message), "*** %s %s %s", name, temp, buf);
break;
case NETWORK_ACTION_CHAT_COMPANY:
SetDParamStr(0, name);
SetDParamStr(1, buf);
GetString(temp, self_send ? STR_NETWORK_CHAT_TO_COMPANY : STR_NETWORK_CHAT_COMPANY, lastof(temp));
ttd_strlcpy(message, temp, sizeof(message));
break;
case NETWORK_ACTION_CHAT_CLIENT:
SetDParamStr(0, name);
SetDParamStr(1, buf);
GetString(temp, self_send ? STR_NETWORK_CHAT_TO_CLIENT : STR_NETWORK_CHAT_CLIENT, lastof(temp));
ttd_strlcpy(message, temp, sizeof(message));
break;
default:
SetDParamStr(0, name);
SetDParamStr(1, buf);
GetString(temp, STR_NETWORK_CHAT_ALL, lastof(temp));
snprintf(message, sizeof(message), "%s %s", temp, buf);
ttd_strlcpy(message, temp, sizeof(message));
break;
}