diff options
author | rubidium <rubidium@openttd.org> | 2007-10-21 12:45:43 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-10-21 12:45:43 +0000 |
commit | f42cdbf4d0a9f547ac5f7c2ec18514d0b2b42e6b (patch) | |
tree | 083dc887b87e2d91b080af4d628b5beb12c04d8b /src | |
parent | 411de01b093ef6903c6ca0d1f075303ddf758d48 (diff) | |
download | openttd-f42cdbf4d0a9f547ac5f7c2ec18514d0b2b42e6b.tar.xz |
(svn r11329) -Fix: if a NewGRF failed to load for some reason (like fatal errors), but it was a "compatible" NewGRF, it was shown with the compatible colour and not the not-loaded colour in the NewGRF list.
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf_gui.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index e3d7db51e..e1479d125 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -358,10 +358,13 @@ static void NewGRFWndProc(Window *w, WindowEvent *e) break; } - if (HASBIT(c->flags, GCF_STATIC)) { - pal = PALETTE_TO_GREY; - } else if (HASBIT(c->flags, GCF_COMPATIBLE)) { - pal = PALETTE_TO_ORANGE; + /* Do not show a "not-failure" colour when it actually failed to load */ + if (pal != PALETTE_TO_RED) { + if (HASBIT(c->flags, GCF_STATIC)) { + pal = PALETTE_TO_GREY; + } else if (HASBIT(c->flags, GCF_COMPATIBLE)) { + pal = PALETTE_TO_ORANGE; + } } DrawSprite(SPR_SQUARE, pal, 5, y + 2); |