summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-02-21 23:18:08 +0000
committermaedhros <maedhros@openttd.org>2007-02-21 23:18:08 +0000
commitf2d63dcecf5975b1817858e044e9044f21a4cc41 (patch)
treed603c0685ec921601a4cde5803bfbc4c046c69a3 /src/newgrf_gui.cpp
parentfd4a0dafc2b59930fd313a281f2851d8e4c75aba (diff)
downloadopenttd-f2d63dcecf5975b1817858e044e9044f21a4cc41.tar.xz
(svn r8838) -Feature: Show newgrf error messages loaded in Action B in the newgrf gui
window. GRFs with an error have a warning symbol shown before the name.
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index 0de82b529..c418786b2 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -43,6 +43,11 @@ static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint w, bool show
{
char buff[256];
+ if (c->error != NULL) {
+ SetDParamStr(0, c->error);
+ y += DrawStringMultiLine(x, y, STR_NEWGRF_ERROR_MSG, w);
+ }
+
/* Draw filename or not if it is not known (GRF sent over internet) */
if (c->filename != NULL) {
SetDParamStr(0, c->filename);
@@ -328,7 +333,8 @@ static void NewGRFWndProc(Window *w, WindowEvent *e)
}
DrawSprite(SPR_SQUARE, pal, 5, y + 2);
- DoDrawString(text, 25, y + 3, WP(w, newgrf_d).sel == c ? 0xC : 0x10);
+ if (c->error != NULL) DrawSprite(SPR_WARNING_SIGN, 0, 20, y + 2);
+ DoDrawString(text, c->error != NULL ? 35 : 25, y + 3, WP(w, newgrf_d).sel == c ? 0xC : 0x10);
y += 14;
}
}