mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r13907) -Codechange: Replace a number with Colours enum on DrawFrameRect usage
This commit is contained in:
parent
325ef293fd
commit
69671d3aef
|
@ -72,7 +72,7 @@ void DrawAircraftImage(const Vehicle *v, int x, int y, VehicleID selection)
|
|||
DrawSprite(rotor_sprite, PAL_NONE, x + 25, y + 5);
|
||||
}
|
||||
if (v->index == selection) {
|
||||
DrawFrameRect(x - 1, y - 1, x + 58, y + 21, 0xF, FR_BORDERONLY);
|
||||
DrawFrameRect(x - 1, y - 1, x + 58, y + 21, COLOUR_WHITE, FR_BORDERONLY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ struct CheatWindow : Window {
|
|||
case SLE_BOOL: {
|
||||
bool on = (*(bool*)ce->variable);
|
||||
|
||||
DrawFrameRect(x + 20, y + 1, x + 30 + 9, y + 9, on ? 6 : 4, on ? FR_LOWERED : FR_NONE);
|
||||
DrawFrameRect(x + 20, y + 1, x + 30 + 9, y + 9, on ? COLOUR_GREEN : COLOUR_RED, on ? FR_LOWERED : FR_NONE);
|
||||
SetDParam(0, on ? STR_CONFIG_PATCHES_ON : STR_CONFIG_PATCHES_OFF);
|
||||
} break;
|
||||
|
||||
|
|
|
@ -1691,7 +1691,7 @@ struct NetworkJoinStatusWindow : Window {
|
|||
}
|
||||
|
||||
/* Draw nice progress bar :) */
|
||||
DrawFrameRect(20, 18, (int)((this->width - 20) * progress / 100), 28, 10, FR_NONE);
|
||||
DrawFrameRect(20, 18, (int)((this->width - 20) * progress / 100), 28, COLOUR_MAUVE, FR_NONE);
|
||||
}
|
||||
|
||||
virtual void OnClick(Point pt, int widget)
|
||||
|
|
|
@ -132,7 +132,7 @@ void DrawRoadVehImage(const Vehicle *v, int x, int y, VehicleID selection, int c
|
|||
}
|
||||
|
||||
if (highlight_w != 0) {
|
||||
DrawFrameRect(x - 1, y - 1, x - 1 + highlight_w, y + 12, 15, FR_BORDERONLY);
|
||||
DrawFrameRect(x - 1, y - 1, x - 1 + highlight_w, y + 12, COLOUR_WHITE, FR_BORDERONLY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1056,19 +1056,19 @@ struct CustomCurrencyWindow : Window {
|
|||
y += 12;
|
||||
|
||||
/* separator */
|
||||
DrawFrameRect(10, y + 1, 29, y + 9, 0, GB(this->click, 2, 2) ? FR_LOWERED : FR_NONE);
|
||||
DrawFrameRect(10, y + 1, 29, y + 9, COLOUR_DARK_BLUE, GB(this->click, 2, 2) ? FR_LOWERED : FR_NONE);
|
||||
x = DrawString(35, y + 1, STR_CURRENCY_SEPARATOR, TC_FROMSTRING);
|
||||
DoDrawString(this->separator, x + 4, y + 1, TC_ORANGE);
|
||||
y += 12;
|
||||
|
||||
/* prefix */
|
||||
DrawFrameRect(10, y + 1, 29, y + 9, 0, GB(this->click, 4, 2) ? FR_LOWERED : FR_NONE);
|
||||
DrawFrameRect(10, y + 1, 29, y + 9, COLOUR_DARK_BLUE, GB(this->click, 4, 2) ? FR_LOWERED : FR_NONE);
|
||||
x = DrawString(35, y + 1, STR_CURRENCY_PREFIX, TC_FROMSTRING);
|
||||
DoDrawString(_custom_currency.prefix, x + 4, y + 1, TC_ORANGE);
|
||||
y += 12;
|
||||
|
||||
/* suffix */
|
||||
DrawFrameRect(10, y + 1, 29, y + 9, 0, GB(this->click, 6, 2) ? FR_LOWERED : FR_NONE);
|
||||
DrawFrameRect(10, y + 1, 29, y + 9, COLOUR_DARK_BLUE, GB(this->click, 6, 2) ? FR_LOWERED : FR_NONE);
|
||||
x = DrawString(35, y + 1, STR_CURRENCY_SUFFIX, TC_FROMSTRING);
|
||||
DoDrawString(_custom_currency.suffix, x + 4, y + 1, TC_ORANGE);
|
||||
y += 12;
|
||||
|
|
|
@ -24,7 +24,7 @@ void DrawShipImage(const Vehicle *v, int x, int y, VehicleID selection)
|
|||
DrawSprite(v->GetImage(DIR_W), GetVehiclePalette(v), x + 32, y + 10);
|
||||
|
||||
if (v->index == selection) {
|
||||
DrawFrameRect(x - 5, y - 1, x + 67, y + 21, 15, FR_BORDERONLY);
|
||||
DrawFrameRect(x - 5, y - 1, x + 67, y + 21, COLOUR_WHITE, FR_BORDERONLY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ void DrawTrainImage(const Vehicle *v, int x, int y, VehicleID selection, int cou
|
|||
if (highlight_l != highlight_r) {
|
||||
/* Draw the highlight. Now done after drawing all the engines, as
|
||||
* the next engine after the highlight could overlap it. */
|
||||
DrawFrameRect(highlight_l, 0, highlight_r, 13, 15, FR_BORDERONLY);
|
||||
DrawFrameRect(highlight_l, 0, highlight_r, 13, COLOUR_WHITE, FR_BORDERONLY);
|
||||
}
|
||||
|
||||
_cur_dpi = old_dpi;
|
||||
|
|
|
@ -496,7 +496,7 @@ void Window::DrawWidgets() const
|
|||
|
||||
|
||||
if (this->flags4 & WF_WHITE_BORDER_MASK) {
|
||||
DrawFrameRect(0, 0, this->width - 1, this->height - 1, 0xF, FR_BORDERONLY);
|
||||
DrawFrameRect(0, 0, this->width - 1, this->height - 1, COLOUR_WHITE, FR_BORDERONLY);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue