src/newgrf_gui.cpp
changeset 8320 6ffad7a5d242
parent 8275 7bb7b8b75f5a
child 8378 9f849e5763e2
equal deleted inserted replaced
8319:434ce8c1e463 8320:6ffad7a5d242
   141 					bool h = c == WP(w, newgrf_add_d).sel;
   141 					bool h = c == WP(w, newgrf_add_d).sel;
   142 					const char *text = (c->name != NULL && !StrEmpty(c->name)) ? c->name : c->filename;
   142 					const char *text = (c->name != NULL && !StrEmpty(c->name)) ? c->name : c->filename;
   143 
   143 
   144 					/* Draw selection background */
   144 					/* Draw selection background */
   145 					if (h) GfxFillRect(3, y, w->width - 15, y + 9, 156);
   145 					if (h) GfxFillRect(3, y, w->width - 15, y + 9, 156);
   146 					DoDrawStringTruncated(text, 4, y, h ? 0xC : 0x6, w->width - 18);
   146 					DoDrawStringTruncated(text, 4, y, h ? TC_WHITE : TC_ORANGE, w->width - 18);
   147 					y += 10;
   147 					y += 10;
   148 				}
   148 				}
   149 				n++;
   149 				n++;
   150 			}
   150 			}
   151 
   151 
   368 					}
   368 					}
   369 
   369 
   370 					DrawSprite(SPR_SQUARE, pal, 5, y + 2);
   370 					DrawSprite(SPR_SQUARE, pal, 5, y + 2);
   371 					if (c->error != NULL) DrawSprite(SPR_WARNING_SIGN, 0, 20, y + 2);
   371 					if (c->error != NULL) DrawSprite(SPR_WARNING_SIGN, 0, 20, y + 2);
   372 					txtoffset = c->error != NULL ? 35 : 25;
   372 					txtoffset = c->error != NULL ? 35 : 25;
   373 					DoDrawStringTruncated(text, txtoffset, y + 3, WP(w, newgrf_d).sel == c ? 0xC : 0x10, w->width - txtoffset - 10);
   373 					DoDrawStringTruncated(text, txtoffset, y + 3, WP(w, newgrf_d).sel == c ? TC_WHITE : TC_BLACK, w->width - txtoffset - 10);
   374 					y += 14;
   374 					y += 14;
   375 				}
   375 				}
   376 			}
   376 			}
   377 
   377 
   378 			if (WP(w, newgrf_d).sel != NULL) {
   378 			if (WP(w, newgrf_d).sel != NULL) {