(svn r15813) -Codechange: remove the last remnants of the old text drawing API.

This commit is contained in:
rubidium
2009-03-22 14:55:49 +00:00
parent 2e38d7c332
commit 6d3745a924
6 changed files with 44 additions and 60 deletions

View File

@@ -738,7 +738,7 @@ public:
y < dpi->top + dpi->height) {
/* And draw it. */
SetDParam(0, t->index);
DrawString(x, y, STR_2056, TC_WHITE);
DrawString(x, x + t->sign.width_2, y, STR_2056, TC_WHITE);
}
}
}
@@ -857,15 +857,15 @@ public:
if (!tbl->show_on_map) {
/* Simply draw the string, not the black border of the legend colour.
* This will enforce the idea of the disabled item */
DrawString(x + 11, y, STR_SMALLMAP_INDUSTRY, TC_GREY);
DrawString(x + 11, x + COLUMN_WIDTH - 1, y, STR_SMALLMAP_INDUSTRY, TC_GREY);
} else {
DrawString(x + 11, y, STR_SMALLMAP_INDUSTRY, TC_BLACK);
DrawString(x + 11, x + COLUMN_WIDTH - 1, y, STR_SMALLMAP_INDUSTRY, TC_BLACK);
GfxFillRect(x, y + 1, x + 8, y + 5, 0); // outer border of the legend colour
}
} else {
/* Anything that is not an industry is using normal process */
GfxFillRect(x, y + 1, x + 8, y + 5, 0);
DrawString(x + 11, y, tbl->legend, TC_FROMSTRING);
DrawString(x + 11, x + COLUMN_WIDTH - 1, y, tbl->legend, TC_FROMSTRING);
}
GfxFillRect(x + 1, y + 2, x + 7, y + 4, tbl->colour); // legend colour