File diff r16430:b3f65f9bc976 → r16431:ec558deca9d7
src/vehicle_gui.cpp
Show inline comments
 
@@ -1029,13 +1029,13 @@ uint GetVehicleListHeight(VehicleType ty
 
 */
 
void BaseVehicleListWindow::DrawVehicleListItems(VehicleID selected_vehicle, int line_height, const Rect &r) const
 
{
 
	int left = r.left + WD_MATRIX_LEFT;
 
	int right = r.right - WD_MATRIX_RIGHT;
 
	int width = right - left;
 
	bool rtl = _dynlang.text_dir == TD_RTL;
 
	bool rtl = _current_text_dir == TD_RTL;
 

	
 
	int text_offset = GetDigitWidth() * this->unitnumber_digits + WD_FRAMERECT_RIGHT;
 
	int text_left  = left  + (rtl ?           0 : text_offset);
 
	int text_right = right - (rtl ? text_offset :           0);
 

	
 
	bool show_orderlist = this->vli.vtype >= VEH_SHIP;
 
@@ -1736,13 +1736,13 @@ struct VehicleDetailsWindow : Window {
 
				/* For trains only. */
 
				DrawVehicleDetails(v, r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, r.top + WD_MATRIX_TOP, this->vscroll->GetPosition(), this->vscroll->GetCapacity(), this->tab);
 
				break;
 

	
 
			case VLD_WIDGET_MIDDLE_DETAILS: {
 
				/* For other vehicles, at the place of the matrix. */
 
				bool rtl = _dynlang.text_dir == TD_RTL;
 
				bool rtl = _current_text_dir == TD_RTL;
 
				uint sprite_width = max<uint>(GetSprite(v->GetImage(rtl ? DIR_E : DIR_W), ST_NORMAL)->width, 70U) + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
 

	
 
				uint text_left  = r.left  + (rtl ? 0 : sprite_width);
 
				uint text_right = r.right - (rtl ? sprite_width : 0);
 

	
 
				/* Articulated road vehicles use a complete line. */