(svn r22429) -Add: some constants for specific palette colours used in the GUI.
This commit is contained in:
@@ -695,7 +695,7 @@ struct NewGRFWindow : public QueryStringBaseWindow {
|
||||
{
|
||||
switch (widget) {
|
||||
case SNGRFS_FILE_LIST: {
|
||||
GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, GREY_SCALE(1));
|
||||
GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, PC_BLACK);
|
||||
|
||||
uint step_height = this->GetWidget<NWidgetBase>(SNGRFS_FILE_LIST)->resize_y;
|
||||
uint y = r.top + WD_FRAMERECT_TOP;
|
||||
@@ -715,7 +715,7 @@ struct NewGRFWindow : public QueryStringBaseWindow {
|
||||
bool h = (this->active_sel == c);
|
||||
PaletteID pal = this->GetPalette(c);
|
||||
|
||||
if (h) GfxFillRect(r.left + 1, y, r.right - 1, y + step_height - 1, 156);
|
||||
if (h) GfxFillRect(r.left + 1, y, r.right - 1, y + step_height - 1, PC_DARK_BLUE);
|
||||
DrawSprite(SPR_SQUARE, pal, square_left, y + sprite_offset_y);
|
||||
if (c->error != NULL) DrawSprite(SPR_WARNING_SIGN, 0, warning_left, y + sprite_offset_y);
|
||||
uint txtoffset = c->error == NULL ? 0 : 10;
|
||||
@@ -727,7 +727,7 @@ struct NewGRFWindow : public QueryStringBaseWindow {
|
||||
}
|
||||
|
||||
case SNGRFS_AVAIL_LIST: {
|
||||
GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, GREY_SCALE(1));
|
||||
GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, PC_BLACK);
|
||||
|
||||
uint step_height = this->GetWidget<NWidgetBase>(SNGRFS_AVAIL_LIST)->resize_y;
|
||||
int offset_y = (step_height - FONT_HEIGHT_NORMAL) / 2;
|
||||
@@ -740,7 +740,7 @@ struct NewGRFWindow : public QueryStringBaseWindow {
|
||||
bool h = (c == this->avail_sel);
|
||||
const char *text = c->GetName();
|
||||
|
||||
if (h) GfxFillRect(r.left + 1, y, r.right - 1, y + step_height - 1, 156);
|
||||
if (h) GfxFillRect(r.left + 1, y, r.right - 1, y + step_height - 1, PC_DARK_BLUE);
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y + offset_y, text, h ? TC_WHITE : TC_SILVER);
|
||||
y += step_height;
|
||||
}
|
||||
@@ -749,7 +749,7 @@ struct NewGRFWindow : public QueryStringBaseWindow {
|
||||
|
||||
case SNGRFS_NEWGRF_INFO_TITLE:
|
||||
/* Create the nice grayish rectangle at the details top. */
|
||||
GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, 157);
|
||||
GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, PC_DARK_BLUE);
|
||||
DrawString(r.left, r.right, (r.top + r.bottom - FONT_HEIGHT_NORMAL) / 2, STR_NEWGRF_SETTINGS_INFO_TITLE, TC_FROMSTRING, SA_HOR_CENTER);
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user