1
0
Fork 0

(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.

release/0.6
rubidium 2007-10-21 12:45:43 +00:00
parent a68feea00a
commit 93303cffc4
1 changed files with 7 additions and 4 deletions

View File

@ -358,11 +358,14 @@ static void NewGRFWndProc(Window *w, WindowEvent *e)
break; break;
} }
/* Do not show a "not-failure" colour when it actually failed to load */
if (pal != PALETTE_TO_RED) {
if (HASBIT(c->flags, GCF_STATIC)) { if (HASBIT(c->flags, GCF_STATIC)) {
pal = PALETTE_TO_GREY; pal = PALETTE_TO_GREY;
} else if (HASBIT(c->flags, GCF_COMPATIBLE)) { } else if (HASBIT(c->flags, GCF_COMPATIBLE)) {
pal = PALETTE_TO_ORANGE; pal = PALETTE_TO_ORANGE;
} }
}
DrawSprite(SPR_SQUARE, pal, 5, y + 2); DrawSprite(SPR_SQUARE, pal, 5, y + 2);
if (c->error != NULL) DrawSprite(SPR_WARNING_SIGN, 0, 20, y + 2); if (c->error != NULL) DrawSprite(SPR_WARNING_SIGN, 0, 20, y + 2);