|
@@ -1534,25 +1534,25 @@ struct NetworkLobbyWindow : public Windo
|
|
|
this->SetWidgetDisabledState(NLWW_NEW, gi->companies_on >= gi->companies_max);
|
|
|
/* Cannot spectate if there are too many spectators */
|
|
|
this->SetWidgetDisabledState(NLWW_SPECTATE, gi->spectators_on >= gi->spectators_max);
|
|
|
|
|
|
this->vscroll->SetCount(gi->companies_on);
|
|
|
|
|
|
/* Draw window widgets */
|
|
|
this->DrawWidgets();
|
|
|
}
|
|
|
|
|
|
void DrawMatrix(const Rect &r) const
|
|
|
{
|
|
|
bool rtl = _dynlang.text_dir == TD_RTL;
|
|
|
bool rtl = _current_text_dir == TD_RTL;
|
|
|
uint left = r.left + WD_FRAMERECT_LEFT;
|
|
|
uint right = r.right - WD_FRAMERECT_RIGHT;
|
|
|
|
|
|
Dimension lock_size = GetSpriteSize(SPR_LOCK);
|
|
|
int lock_width = lock_size.width;
|
|
|
int lock_y_offset = (this->resize.step_height - WD_MATRIX_TOP - WD_MATRIX_BOTTOM - lock_size.height) / 2;
|
|
|
|
|
|
Dimension profit_size = GetSpriteSize(SPR_PROFIT_LOT);
|
|
|
int profit_width = lock_size.width;
|
|
|
int profit_y_offset = (this->resize.step_height - WD_MATRIX_TOP - WD_MATRIX_BOTTOM - profit_size.height) / 2;
|
|
|
|
|
|
uint text_left = left + (rtl ? lock_width + profit_width + 4 : 0);
|
|
@@ -2055,25 +2055,25 @@ struct NetworkClientListWindow : Window
|
|
|
virtual void OnPaint()
|
|
|
{
|
|
|
/* Check if we need to reset the height */
|
|
|
if (!this->CheckClientListHeight()) return;
|
|
|
|
|
|
this->DrawWidgets();
|
|
|
}
|
|
|
|
|
|
virtual void DrawWidget(const Rect &r, int widget) const
|
|
|
{
|
|
|
if (widget != CLW_PANEL) return;
|
|
|
|
|
|
bool rtl = _dynlang.text_dir == TD_RTL;
|
|
|
bool rtl = _current_text_dir == TD_RTL;
|
|
|
int icon_y_offset = 1 + (FONT_HEIGHT_NORMAL - 10) / 2;
|
|
|
uint y = r.top + WD_FRAMERECT_TOP;
|
|
|
uint left = r.left + WD_FRAMERECT_LEFT;
|
|
|
uint right = r.right - WD_FRAMERECT_RIGHT;
|
|
|
uint type_icon_width = this->server_client_width + this->company_icon_width;
|
|
|
|
|
|
|
|
|
uint type_left = rtl ? right - this->server_client_width : left;
|
|
|
uint type_right = rtl ? right : left + this->server_client_width - 1;
|
|
|
uint icon_left = rtl ? right - type_icon_width + WD_FRAMERECT_LEFT : left + this->server_client_width;
|
|
|
uint name_left = rtl ? left : left + type_icon_width;
|
|
|
uint name_right = rtl ? right - type_icon_width : right;
|