Mercurial > hg > openttd
diff src/player_gui.cpp @ 7884:870ff6c7c551 draft
(svn r11435) -Codechange: show all players who have shares, not just the first two. Patch by SmatZ.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Thu, 15 Nov 2007 17:49:50 +0000 |
parents | 7ae5bda4e8dd |
children | 1ed44baec4d2 |
line wrap: on
line diff
--- a/src/player_gui.cpp +++ b/src/player_gui.cpp @@ -1038,21 +1038,18 @@ static void DrawCompanyOwnerText(const Player *p) { const Player *p2; - int num = -1; + uint num = 0; + const byte height = GetCharacterHeight(FS_NORMAL); FOR_ALL_PLAYERS(p2) { uint amt = GetAmountOwnedBy(p, p2->index); if (amt != 0) { - num++; + SetDParam(0, amt * 25); + SetDParam(1, p2->index); - SetDParam(num * 2 + 0, amt * 25); - SetDParam(num * 2 + 1, p2->index); - - if (num != 0) break; + DrawString(120, (num++) * height + 116, STR_707D_OWNED_BY, TC_FROMSTRING); } } - - if (num >= 0) DrawString(120, 124, STR_707D_OWNED_BY + num, TC_FROMSTRING); } /** @@ -1119,7 +1116,7 @@ DrawStringMultiCenter(48, 141, STR_7037_PRESIDENT, 94); SetDParam(0, CalculateCompanyValue(p)); - DrawString(110, 114, STR_7076_COMPANY_VALUE, TC_FROMSTRING); + DrawString(110, 106, STR_7076_COMPANY_VALUE, TC_FROMSTRING); DrawCompanyOwnerText(p);