summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-21 23:45:34 +0000
committerrubidium <rubidium@openttd.org>2009-03-21 23:45:34 +0000
commitd837fc4d03bc2cab4ffcae9c8fb81d4226e30913 (patch)
tree7735a9fe4858662401465187eed99bbd8c49f169 /src/newgrf_gui.cpp
parent676bf31e82fb666feee5cde9ffc65bdc7a5070a7 (diff)
downloadopenttd-d837fc4d03bc2cab4ffcae9c8fb81d4226e30913.tar.xz
(svn r15797) -Codechange: make users of the old DrawStringMultiLine use the new one.
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index e45f74501..7c14f2504 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -67,24 +67,24 @@ static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint w, uint bott
GetString(message, c->error->custom_message == NULL ? c->error->message : STR_JUST_RAW_STRING, lastof(message));
SetDParamStr(0, message);
- y += DrawStringMultiLine(x, y, c->error->severity, w, bottom - y);
+ y = DrawStringMultiLine(x, x + w, y, bottom, c->error->severity);
}
/* Draw filename or not if it is not known (GRF sent over internet) */
if (c->filename != NULL) {
SetDParamStr(0, c->filename);
- y += DrawStringMultiLine(x, y, STR_NEWGRF_FILENAME, w, bottom - y);
+ y = DrawStringMultiLine(x, x + w, y, bottom, STR_NEWGRF_FILENAME);
}
/* Prepare and draw GRF ID */
snprintf(buff, lengthof(buff), "%08X", BSWAP32(c->grfid));
SetDParamStr(0, buff);
- y += DrawStringMultiLine(x, y, STR_NEWGRF_GRF_ID, w, bottom - y);
+ y = DrawStringMultiLine(x, x + w, y, bottom, STR_NEWGRF_GRF_ID);
/* Prepare and draw MD5 sum */
md5sumToString(buff, lastof(buff), c->md5sum);
SetDParamStr(0, buff);
- y += DrawStringMultiLine(x, y, STR_NEWGRF_MD5SUM, w, bottom - y);
+ y = DrawStringMultiLine(x, x + w, y, bottom, STR_NEWGRF_MD5SUM);
/* Show GRF parameter list */
if (show_params) {
@@ -95,25 +95,25 @@ static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint w, uint bott
} else {
SetDParam(0, STR_01A9_NONE);
}
- y += DrawStringMultiLine(x, y, STR_NEWGRF_PARAMETER, w, bottom - y);
+ y = DrawStringMultiLine(x, x + w, y, bottom, STR_NEWGRF_PARAMETER);
/* Draw the palette of the NewGRF */
SetDParamStr(0, c->windows_paletted ? "Windows" : "DOS");
- y += DrawStringMultiLine(x, y, STR_NEWGRF_PALETTE, w, bottom - y);
+ y = DrawStringMultiLine(x, x + w, y, bottom, STR_NEWGRF_PALETTE);
}
/* Show flags */
- if (c->status == GCS_NOT_FOUND) y += DrawStringMultiLine(x, y, STR_NEWGRF_NOT_FOUND, w, bottom - y);
- if (c->status == GCS_DISABLED) y += DrawStringMultiLine(x, y, STR_NEWGRF_DISABLED, w, bottom - y);
- if (HasBit(c->flags, GCF_COMPATIBLE)) y += DrawStringMultiLine(x, y, STR_NEWGRF_COMPATIBLE_LOADED, w, bottom - y);
+ if (c->status == GCS_NOT_FOUND) y = DrawStringMultiLine(x, x + w, y, bottom, STR_NEWGRF_NOT_FOUND);
+ if (c->status == GCS_DISABLED) y = DrawStringMultiLine(x, x + w, y, bottom, STR_NEWGRF_DISABLED);
+ if (HasBit(c->flags, GCF_COMPATIBLE)) y = DrawStringMultiLine(x, x + w, y, bottom, STR_NEWGRF_COMPATIBLE_LOADED);
/* Draw GRF info if it exists */
if (c->info != NULL && !StrEmpty(c->info)) {
SetDParam(0, STR_JUST_RAW_STRING);
SetDParamStr(1, c->info);
- y += DrawStringMultiLine(x, y, STR_02BD, w, bottom - y);
+ y = DrawStringMultiLine(x, x + w, y, bottom, STR_02BD);
} else {
- y += DrawStringMultiLine(x, y, STR_NEWGRF_NO_INFO, w, bottom - y);
+ y = DrawStringMultiLine(x, x + w, y, bottom, STR_NEWGRF_NO_INFO);
}
}