mirror of https://github.com/OpenTTD/OpenTTD
Add: mention you are a spectator in the status bar (if you are, ofc) (#9471)
parent
120d216b0b
commit
65b8614d26
|
@ -783,6 +783,8 @@ STR_STATUSBAR_PAUSED_LINK_GRAPH :{ORANGE}* * P
|
||||||
STR_STATUSBAR_AUTOSAVE :{RED}AUTOSAVE
|
STR_STATUSBAR_AUTOSAVE :{RED}AUTOSAVE
|
||||||
STR_STATUSBAR_SAVING_GAME :{RED}* * SAVING GAME * *
|
STR_STATUSBAR_SAVING_GAME :{RED}* * SAVING GAME * *
|
||||||
|
|
||||||
|
STR_STATUSBAR_SPECATOR :{WHITE}(spectator)
|
||||||
|
|
||||||
# News message history
|
# News message history
|
||||||
STR_MESSAGE_HISTORY :{WHITE}Message History
|
STR_MESSAGE_HISTORY :{WHITE}Message History
|
||||||
STR_MESSAGE_HISTORY_TOOLTIP :{BLACK}A list of the recent news messages
|
STR_MESSAGE_HISTORY_TOOLTIP :{BLACK}A list of the recent news messages
|
||||||
|
|
|
@ -147,11 +147,15 @@ struct StatusBarWindow : Window {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WID_S_RIGHT: {
|
case WID_S_RIGHT: {
|
||||||
/* Draw company money, if any */
|
if (_local_company == COMPANY_SPECTATOR) {
|
||||||
const Company *c = Company::GetIfValid(_local_company);
|
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, text_top, STR_STATUSBAR_SPECATOR, TC_FROMSTRING, SA_HOR_CENTER);
|
||||||
if (c != nullptr) {
|
} else {
|
||||||
SetDParam(0, c->money);
|
/* Draw company money, if any */
|
||||||
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, text_top, STR_COMPANY_MONEY, TC_FROMSTRING, SA_HOR_CENTER);
|
const Company *c = Company::GetIfValid(_local_company);
|
||||||
|
if (c != nullptr) {
|
||||||
|
SetDParam(0, c->money);
|
||||||
|
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, text_top, STR_COMPANY_MONEY, TC_FROMSTRING, SA_HOR_CENTER);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue