src/ship_gui.cpp
changeset 8320 6ffad7a5d242
parent 8149 eb78fb69096f
child 8603 88c5ce6a5215
equal deleted inserted replaced
8319:434ce8c1e463 8320:6ffad7a5d242
    50 void DrawShipDetails(const Vehicle *v, int x, int y)
    50 void DrawShipDetails(const Vehicle *v, int x, int y)
    51 {
    51 {
    52 	SetDParam(0, v->engine_type);
    52 	SetDParam(0, v->engine_type);
    53 	SetDParam(1, v->build_year);
    53 	SetDParam(1, v->build_year);
    54 	SetDParam(2, v->value);
    54 	SetDParam(2, v->value);
    55 	DrawString(x, y, STR_9816_BUILT_VALUE, 0);
    55 	DrawString(x, y, STR_9816_BUILT_VALUE, TC_FROMSTRING);
    56 
    56 
    57 	SetDParam(0, v->cargo_type);
    57 	SetDParam(0, v->cargo_type);
    58 	SetDParam(1, v->cargo_cap);
    58 	SetDParam(1, v->cargo_cap);
    59 	DrawString(x, y + 10, STR_9817_CAPACITY, 0);
    59 	DrawString(x, y + 10, STR_9817_CAPACITY, TC_FROMSTRING);
    60 
    60 
    61 	StringID str = STR_8812_EMPTY;
    61 	StringID str = STR_8812_EMPTY;
    62 	if (!v->cargo.Empty()) {
    62 	if (!v->cargo.Empty()) {
    63 		SetDParam(0, v->cargo_type);
    63 		SetDParam(0, v->cargo_type);
    64 		SetDParam(1, v->cargo.Count());
    64 		SetDParam(1, v->cargo.Count());
    65 		SetDParam(2, v->cargo.Source());
    65 		SetDParam(2, v->cargo.Source());
    66 		str = STR_8813_FROM;
    66 		str = STR_8813_FROM;
    67 	}
    67 	}
    68 	DrawString(x, y + 21, str, 0);
    68 	DrawString(x, y + 21, str, TC_FROMSTRING);
    69 
    69 
    70 	/* Draw Transfer credits text */
    70 	/* Draw Transfer credits text */
    71 	SetDParam(0, v->cargo.FeederShare());
    71 	SetDParam(0, v->cargo.FeederShare());
    72 	DrawString(x, y + 33, STR_FEEDER_CARGO_VALUE, 0);
    72 	DrawString(x, y + 33, STR_FEEDER_CARGO_VALUE, TC_FROMSTRING);
    73 }
    73 }