File diff r16430:b3f65f9bc976 → r16431:ec558deca9d7
src/industry_gui.cpp
Show inline comments
 
@@ -1651,13 +1651,13 @@ struct CargoesField {
 
					const IndustrySpec *indsp = GetIndustrySpec(this->u.industry.ind_type);
 
					SetDParam(0, indsp->name);
 
					DrawString(xpos, xpos2, ypos, STR_JUST_STRING, TC_WHITE, SA_HOR_CENTER);
 

	
 
					/* Draw the industry legend. */
 
					int blob_left, blob_right;
 
					if (_dynlang.text_dir == TD_RTL) {
 
					if (_current_text_dir == TD_RTL) {
 
						blob_right = xpos2 - BLOB_DISTANCE;
 
						blob_left  = blob_right - BLOB_WIDTH;
 
					} else {
 
						blob_left  = xpos + BLOB_DISTANCE;
 
						blob_right = blob_left + BLOB_WIDTH;
 
					}
 
@@ -1666,13 +1666,13 @@ struct CargoesField {
 
				} else {
 
					DrawString(xpos, xpos2, ypos, STR_INDUSTRY_CARGOES_HOUSES, TC_FROMSTRING, SA_HOR_CENTER);
 
				}
 

	
 
				/* Draw the other_produced/other_accepted cargoes. */
 
				const CargoID *other_right, *other_left;
 
				if (_dynlang.text_dir == TD_RTL) {
 
				if (_current_text_dir == TD_RTL) {
 
					other_right = this->u.industry.other_accepted;
 
					other_left  = this->u.industry.other_produced;
 
				} else {
 
					other_right = this->u.industry.other_produced;
 
					other_left  = this->u.industry.other_accepted;
 
				}
 
@@ -1710,13 +1710,13 @@ struct CargoesField {
 
					colpos += HOR_CARGO_WIDTH - 2;
 
					GfxDrawLine(colpos, top, colpos, bot, CARGO_LINE_COLOUR);
 
					colpos += 1 + HOR_CARGO_SPACE;
 
				}
 

	
 
				const CargoID *hor_left, *hor_right;
 
				if (_dynlang.text_dir == TD_RTL) {
 
				if (_current_text_dir == TD_RTL) {
 
					hor_left  = this->u.cargo.cust_cargoes;
 
					hor_right = this->u.cargo.supp_cargoes;
 
				} else {
 
					hor_left  = this->u.cargo.supp_cargoes;
 
					hor_right = this->u.cargo.cust_cargoes;
 
				}
 
@@ -2431,13 +2431,13 @@ struct IndustryCargoesWindow : public Wi
 
		int vpos = -this->vscroll->GetPosition() * nwp->resize_y;
 
		for (uint i = 0; i < this->fields.Length(); i++) {
 
			int row_height = (i == 0) ? CargoesField::small_height : CargoesField::normal_height;
 
			if (vpos + row_height >= 0) {
 
				int xpos = left_pos;
 
				int col, dir;
 
				if (_dynlang.text_dir == TD_RTL) {
 
				if (_current_text_dir == TD_RTL) {
 
					col = last_column;
 
					dir = -1;
 
				} else {
 
					col = 0;
 
					dir = 1;
 
				}
 
@@ -2487,13 +2487,13 @@ struct IndustryCargoesWindow : public Wi
 
		if (column > num_columns) return false;
 
		xpos = pt.x - xpos;
 

	
 
		/* Return both positions, compensating for RTL languages (which works due to the equal symmetry in both displays). */
 
		fieldxy->y = row;
 
		xy->y = vpos;
 
		if (_dynlang.text_dir == TD_RTL) {
 
		if (_current_text_dir == TD_RTL) {
 
			fieldxy->x = num_columns - column;
 
			xy->x = ((column & 1) ? CargoesField::CARGO_FIELD_WIDTH : CargoesField::industry_width) - xpos;
 
		} else {
 
			fieldxy->x = column;
 
			xy->x = xpos;
 
		}