summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-26 15:42:45 +0000
committerrubidium <rubidium@openttd.org>2009-04-26 15:42:45 +0000
commit85b653bafcee2a7687cbbebb7a0d65aa9ae8081b (patch)
treefc9d6c7002a5a271f9d586dbc0e844b439d05a8a
parent7dd677ced22abb688b2ed69f99faed211f3554b1 (diff)
downloadopenttd-85b653bafcee2a7687cbbebb7a0d65aa9ae8081b.tar.xz
(svn r16163) -Codechange: instead of SetDParamStr(0, string); DrawString(..., STR_JUST_RAW_STRING, ...) use DrawString(..., string, ...).
-rw-r--r--src/genworld_gui.cpp3
-rw-r--r--src/network/network_content_gui.cpp3
-rw-r--r--src/network/network_gui.cpp14
-rw-r--r--src/roadveh_gui.cpp3
4 files changed, 7 insertions, 16 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index bd2ed937a..f9c6082f8 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -645,8 +645,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
int right = DrawString(0, 326, 91, STR_HEIGHTMAP_SIZE, TC_FROMSTRING, SA_RIGHT);
DrawString( 12, 114, 91, STR_HEIGHTMAP_NAME);
- SetDParamStr(0, this->name);
- DrawString(114, right - 5, 91, STR_JUST_RAW_STRING, TC_ORANGE);
+ DrawString(114, right - 5, 91, this->name, TC_ORANGE);
}
}
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index 2726c7144..a15ac08f7 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -423,8 +423,7 @@ public:
StringID str = STR_CONTENT_TYPE_BASE_GRAPHICS + ci->type - CONTENT_TYPE_BASE_GRAPHICS;
DrawString(this->widget[NCLWW_TYPE].left, this->widget[NCLWW_TYPE].right, y, str, TC_BLACK, SA_CENTER);
- SetDParamStr(0, ci->name);
- DrawString(this->widget[NCLWW_NAME].left + 5, this->widget[NCLWW_NAME].right, y, STR_JUST_RAW_STRING, TC_BLACK);
+ DrawString(this->widget[NCLWW_NAME].left + 5, this->widget[NCLWW_NAME].right, y, ci->name, TC_BLACK);
y += this->resize.step_height;
}
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 2e0e1ddbb..f5612acc9 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -240,8 +240,7 @@ protected:
/* show highlighted item with a different colour */
if (highlight) GfxFillRect(this->widget[NGWW_NAME].left + 1, y - 2, this->widget[NGWW_INFO].right - 1, y + 9, 10);
- SetDParamStr(0, cur_item->info.server_name);
- DrawString(this->widget[NGWW_NAME].left + 5, this->widget[NGWW_NAME].right, y, STR_JUST_RAW_STRING, TC_BLACK);
+ DrawString(this->widget[NGWW_NAME].left + 5, this->widget[NGWW_NAME].right, y, cur_item->info.server_name, TC_BLACK);
/* only draw details if the server is online */
if (cur_item->online) {
@@ -414,8 +413,7 @@ public:
if (sel == NULL) {
DrawString(this->widget[NGWW_DETAILS].left + 1, this->widget[NGWW_DETAILS].right - 1, 58, STR_NETWORK_GAME_INFO, TC_FROMSTRING, SA_CENTER);
} else if (!sel->online) {
- SetDParamStr(0, sel->info.server_name);
- DrawString(this->widget[NGWW_DETAILS].left + 1, this->widget[NGWW_DETAILS].right - 1, 68, STR_JUST_RAW_STRING, TC_ORANGE, SA_CENTER); // game name
+ DrawString(this->widget[NGWW_DETAILS].left + 1, this->widget[NGWW_DETAILS].right - 1, 68, sel->info.server_name, TC_ORANGE, SA_CENTER); // game name
DrawString(this->widget[NGWW_DETAILS].left + 1, this->widget[NGWW_DETAILS].right - 1, 132, STR_NETWORK_SERVER_OFFLINE, TC_FROMSTRING, SA_CENTER); // server offline
} else { // show game info
@@ -424,12 +422,8 @@ public:
DrawString(this->widget[NGWW_DETAILS].left + 1, this->widget[NGWW_DETAILS].right - 1, 48, STR_NETWORK_GAME_INFO, TC_FROMSTRING, SA_CENTER);
-
- SetDParamStr(0, sel->info.server_name);
- DrawString(this->widget[NGWW_DETAILS].left, this->widget[NGWW_DETAILS].right, 62, STR_JUST_RAW_STRING, TC_ORANGE, SA_CENTER); // game name
-
- SetDParamStr(0, sel->info.map_name);
- DrawString(this->widget[NGWW_DETAILS].left, this->widget[NGWW_DETAILS].right, 74, STR_JUST_RAW_STRING, TC_BLACK, SA_CENTER); // map name
+ DrawString(this->widget[NGWW_DETAILS].left, this->widget[NGWW_DETAILS].right, 62, sel->info.server_name, TC_ORANGE, SA_CENTER); // game name
+ DrawString(this->widget[NGWW_DETAILS].left, this->widget[NGWW_DETAILS].right, 74, sel->info.map_name, TC_BLACK, SA_CENTER); // map name
SetDParam(0, sel->info.clients_on);
SetDParam(1, sel->info.clients_max);
diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp
index 61db89ea3..16dbd22e2 100644
--- a/src/roadveh_gui.cpp
+++ b/src/roadveh_gui.cpp
@@ -72,8 +72,7 @@ void DrawRoadVehDetails(const Vehicle *v, int left, int right, int y)
}
}
- SetDParamStr(0, capacity);
- DrawString(left, right, y + 10 + y_offset, STR_JUST_RAW_STRING, TC_BLUE);
+ DrawString(left, right, y + 10 + y_offset, capacity, TC_BLUE);
for (const Vehicle *u = v; u != NULL; u = u->Next()) {
if (u->cargo_cap == 0) continue;