|
@@ -544,13 +544,13 @@ public:
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
void Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const
|
|
|
{
|
|
|
bool rtl = _dynlang.text_dir == TD_RTL;
|
|
|
bool rtl = _current_text_dir == TD_RTL;
|
|
|
DrawSprite(SPR_VEH_BUS_SIDE_VIEW, PALETTE_RECOLOUR_START + this->result, rtl ? right - 16 : left + 16, top + 7);
|
|
|
DrawString(rtl ? left + 2 : left + 32, rtl ? right - 32 : right - 2, top + max(0, 13 - FONT_HEIGHT_NORMAL), this->String(), sel ? TC_WHITE : TC_BLACK);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
/** Widgets of the select company livery window. */
|
|
@@ -684,13 +684,13 @@ public:
|
|
|
}
|
|
|
|
|
|
virtual void DrawWidget(const Rect &r, int widget) const
|
|
|
{
|
|
|
if (widget != SCLW_WIDGET_MATRIX) return;
|
|
|
|
|
|
bool rtl = _dynlang.text_dir == TD_RTL;
|
|
|
bool rtl = _current_text_dir == TD_RTL;
|
|
|
|
|
|
/* Horizontal coordinates of scheme name column. */
|
|
|
const NWidgetBase *nwi = this->GetWidget<NWidgetBase>(SCLW_WIDGET_SPACER_DROPDOWN);
|
|
|
int sch_left = nwi->pos_x;
|
|
|
int sch_right = sch_left + nwi->current_x - 1;
|
|
|
/* Horizontal coordinates of first dropdown. */
|
|
@@ -773,13 +773,13 @@ public:
|
|
|
if (_livery_class[scheme] != this->livery_class || !HasBit(_loaded_newgrf_features.used_liveries, scheme)) j++;
|
|
|
if (scheme >= LS_END) return;
|
|
|
}
|
|
|
if (j >= LS_END) return;
|
|
|
|
|
|
/* If clicking on the left edge, toggle using the livery */
|
|
|
if (_dynlang.text_dir == TD_RTL ? pt.x - wid->pos_x > wid->current_x - TEXT_INDENT : pt.x - wid->pos_x < TEXT_INDENT) {
|
|
|
if (_current_text_dir == TD_RTL ? pt.x - wid->pos_x > wid->current_x - TEXT_INDENT : pt.x - wid->pos_x < TEXT_INDENT) {
|
|
|
DoCommandP(0, j | (2 << 8), !Company::Get((CompanyID)this->window_number)->livery[j].in_use, CMD_SET_COMPANY_COLOUR);
|
|
|
}
|
|
|
|
|
|
if (_ctrl_pressed) {
|
|
|
ToggleBit(this->sel, j);
|
|
|
} else {
|