src/train_gui.cpp
branchNewGRF_ports
changeset 6877 889301acc299
parent 6872 1c4a4a609f85
child 10184 fcf5fb2548eb
equal deleted inserted replaced
6876:2c40faeef7a5 6877:889301acc299
   239 			act_cargo[u->cargo_type] += u->cargo.Count();
   239 			act_cargo[u->cargo_type] += u->cargo.Count();
   240 			max_cargo[u->cargo_type] += u->cargo_cap;
   240 			max_cargo[u->cargo_type] += u->cargo_cap;
   241 		}
   241 		}
   242 
   242 
   243 		/* draw total cargo tab */
   243 		/* draw total cargo tab */
   244 		DrawString(x, y + 2, STR_013F_TOTAL_CAPACITY_TEXT, TC_FROMSTRING);
   244 		DrawString(x, y + 2, STR_TOTAL_CAPACITY_TEXT, TC_FROMSTRING);
   245 		for (CargoID i = 0; i < NUM_CARGO; i++) {
   245 		for (CargoID i = 0; i < NUM_CARGO; i++) {
   246 			if (max_cargo[i] > 0 && --vscroll_pos < 0 && vscroll_pos > -vscroll_cap) {
   246 			if (max_cargo[i] > 0 && --vscroll_pos < 0 && vscroll_pos > -vscroll_cap) {
   247 				y += 14;
   247 				y += 14;
   248 				SetDParam(0, i);            // {CARGO} #1
   248 				SetDParam(0, i);            // {CARGO} #1
   249 				SetDParam(1, act_cargo[i]); // {CARGO} #2
   249 				SetDParam(1, act_cargo[i]); // {CARGO} #2
   250 				SetDParam(2, i);            // {SHORTCARGO} #1
   250 				SetDParam(2, i);            // {SHORTCARGO} #1
   251 				SetDParam(3, max_cargo[i]); // {SHORTCARGO} #2
   251 				SetDParam(3, max_cargo[i]); // {SHORTCARGO} #2
   252 				SetDParam(4, _patches.freight_trains);
   252 				SetDParam(4, _patches.freight_trains);
   253 				DrawString(x, y + 2, FreightWagonMult(i) > 1 ? STR_TOTAL_CAPACITY_MULT : STR_013F_TOTAL_CAPACITY, TC_FROMSTRING);
   253 				DrawString(x, y + 2, FreightWagonMult(i) > 1 ? STR_TOTAL_CAPACITY_MULT : STR_TOTAL_CAPACITY, TC_FROMSTRING);
   254 			}
   254 			}
   255 		}
   255 		}
   256 		SetDParam(0, v->cargo.FeederShare());
   256 		SetDParam(0, v->cargo.FeederShare());
   257 		DrawString(x, y + 15, STR_FEEDER_CARGO_VALUE, TC_FROMSTRING);
   257 		DrawString(x, y + 15, STR_FEEDER_CARGO_VALUE, TC_FROMSTRING);
   258 	}
   258 	}