1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 12:39:11 +00:00

(svn r15794) -Codechange: remove the DoDrawString part of the old text drawing API

This commit is contained in:
rubidium
2009-03-21 22:46:17 +00:00
parent ce513b46b7
commit f11300d1f9
10 changed files with 35 additions and 58 deletions

View File

@@ -237,7 +237,7 @@ void NetworkDrawChatMessage()
/* Paint the chat messages starting with the lowest at the bottom */
for (uint y = NETWORK_CHAT_LINE_HEIGHT; count-- != 0; y += NETWORK_CHAT_LINE_HEIGHT) {
DoDrawString(_chatmsg_list[count].message, _chatmsg_box.x + 3, _screen.height - _chatmsg_box.y - y + 1, _chatmsg_list[count].colour);
DrawString(_chatmsg_box.x + 3, _chatmsg_box.x + _chatmsg_box.width - 1, _screen.height - _chatmsg_box.y - y + 1, _chatmsg_list[count].message, _chatmsg_list[count].colour);
}
/* Make sure the data is updated next flush */

View File

@@ -906,7 +906,7 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow {
this->DrawEditBox(NSSW_GAMENAME);
/* if password is set, draw red '*' next to 'Set password' button */
if (!StrEmpty(_settings_client.network.server_password)) DoDrawString("*", 408, 23, TC_RED);
if (!StrEmpty(_settings_client.network.server_password)) DrawString(408, this->width - 2, 23, "*", TC_RED);
/* draw list of maps */
GfxFillRect(11, 63, 258, 215, 0xD7); // black background of maps list
@@ -919,7 +919,7 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow {
if (pos == 0) {
DrawString(14, y, STR_4010_GENERATE_RANDOM_NEW_GAME, TC_DARK_GREEN);
} else {
DoDrawString(item->title, 14, y, _fios_colours[item->type] );
DrawString(14, this->width - 1, y, item->title, _fios_colours[item->type] );
}
y += NSSWND_ROWSIZE;
@@ -1609,7 +1609,7 @@ struct NetworkClientListPopupWindow : Window {
colour = TC_BLACK;
}
DoDrawString(this->action[i], 4, y, colour);
DrawString(4, this->width - 4, y, this->action[i], colour);
}
}
@@ -1718,7 +1718,7 @@ struct NetworkClientListWindow : Window
/* Filter out spectators */
if (IsValidCompanyID(ci->client_playas)) DrawCompanyIcon(ci->client_playas, 64, y + 1);
DoDrawString(ci->client_name, 81, y, colour);
DrawString(81, this->width - 2, y, ci->client_name, colour);
y += CLNWND_ROWSIZE;
}