src/newgrf_gui.cpp
branchcpp_gui
changeset 6263 19dab6a68886
parent 6258 a2f86b8fd99b
child 6268 4b5241e5dd10
equal deleted inserted replaced
6262:bd89f58e8623 6263:19dab6a68886
   118 				if (n >= w->vscroll.pos && n < w->vscroll.pos + w->vscroll.cap) {
   118 				if (n >= w->vscroll.pos && n < w->vscroll.pos + w->vscroll.cap) {
   119 					bool h = c == WP(w, newgrf_add_d).sel;
   119 					bool h = c == WP(w, newgrf_add_d).sel;
   120 					const char *text = (c->name != NULL && !StrEmpty(c->name)) ? c->name : c->filename;
   120 					const char *text = (c->name != NULL && !StrEmpty(c->name)) ? c->name : c->filename;
   121 
   121 
   122 					/* Draw selection background */
   122 					/* Draw selection background */
   123 					if (h) GfxFillRect(3, y, w->width - 15, y + 9, 156);
   123 					if (h) GfxFillRect(3, y, w->Width() - 15, y + 9, 156);
   124 					DoDrawStringTruncated(text, 4, y, h ? 0xC : 0x6, w->width - 18);
   124 					DoDrawStringTruncated(text, 4, y, h ? 0xC : 0x6, w->Width() - 18);
   125 					y += 10;
   125 					y += 10;
   126 				}
   126 				}
   127 				n++;
   127 				n++;
   128 			}
   128 			}
   129 
   129