Changeset - r26261:1ed997ddf7e6
[Not reviewed]
master
0 2 0
Tyler Trahan - 2 years ago 2022-05-11 21:28:59
tyler@tylertrahan.com
Change: Use an indent, not a dash, to list train capacity
2 files changed with 8 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/lang/english.txt
Show inline comments
 
@@ -4228,8 +4228,8 @@ STR_VEHICLE_DETAILS_TRAIN_ENGINE_BUILT_A
 
STR_VEHICLE_DETAILS_TRAIN_WAGON_VALUE                           :{LTBLUE}{ENGINE}{BLACK}   Value: {LTBLUE}{CURRENCY_LONG}
 

	
 
STR_VEHICLE_DETAILS_TRAIN_TOTAL_CAPACITY_TEXT                   :{BLACK}Total cargo capacity of this train:
 
STR_VEHICLE_DETAILS_TRAIN_TOTAL_CAPACITY                        :{LTBLUE}- {CARGO_LONG} ({CARGO_SHORT})
 
STR_VEHICLE_DETAILS_TRAIN_TOTAL_CAPACITY_MULT                   :{LTBLUE}- {CARGO_LONG} ({CARGO_SHORT}) (x{NUM})
 
STR_VEHICLE_DETAILS_TRAIN_TOTAL_CAPACITY                        :{LTBLUE}{CARGO_LONG} ({CARGO_SHORT})
 
STR_VEHICLE_DETAILS_TRAIN_TOTAL_CAPACITY_MULT                   :{LTBLUE}{CARGO_LONG} ({CARGO_SHORT}) (x{NUM})
 

	
 
STR_VEHICLE_DETAILS_CARGO_EMPTY                                 :{LTBLUE}Empty
 
STR_VEHICLE_DETAILS_CARGO_FROM                                  :{LTBLUE}{CARGO_LONG} from {STATION}
src/train_gui.cpp
Show inline comments
 
@@ -182,6 +182,7 @@ struct CargoSummaryItem {
 

	
 
static const uint TRAIN_DETAILS_MIN_INDENT = 32; ///< Minimum indent level in the train details window
 
static const uint TRAIN_DETAILS_MAX_INDENT = 72; ///< Maximum indent level in the train details window; wider than this and we start on a new line
 
static const int  TRAIN_DETAILS_LIST_INDENT = 10; ///< Indent for list items in the Total Cargo window
 

	
 
/** Container for the cargo summary information. */
 
typedef std::vector<CargoSummaryItem> CargoSummary;
 
@@ -363,6 +364,10 @@ void DrawTrainDetails(const Train *v, in
 
	/* get rid of awkward offset */
 
	y -= WD_MATRIX_TOP;
 

	
 
	/* Indent the total cargo capacity details */
 
	int offs_left = _current_text_dir == TD_LTR ? TRAIN_DETAILS_LIST_INDENT : 0;
 
	int offs_right = _current_text_dir == TD_LTR ? 0 : TRAIN_DETAILS_LIST_INDENT;
 

	
 
	int sprite_height = ScaleGUITrad(GetVehicleHeight(VEH_TRAIN));
 
	int line_height = std::max(sprite_height, WD_MATRIX_TOP + FONT_HEIGHT_NORMAL + WD_MATRIX_BOTTOM);
 
	int sprite_y_offset = line_height / 2;
 
@@ -465,7 +470,7 @@ void DrawTrainDetails(const Train *v, in
 
				SetDParam(2, i);            // {SHORTCARGO} #1
 
				SetDParam(3, max_cargo[i]); // {SHORTCARGO} #2
 
				SetDParam(4, _settings_game.vehicle.freight_trains);
 
				DrawString(left, right, y + text_y_offset, FreightWagonMult(i) > 1 ? STR_VEHICLE_DETAILS_TRAIN_TOTAL_CAPACITY_MULT : STR_VEHICLE_DETAILS_TRAIN_TOTAL_CAPACITY);
 
				DrawString(left + offs_left, right - offs_right, y + text_y_offset, FreightWagonMult(i) > 1 ? STR_VEHICLE_DETAILS_TRAIN_TOTAL_CAPACITY_MULT : STR_VEHICLE_DETAILS_TRAIN_TOTAL_CAPACITY);
 
				y += line_height;
 
			}
 
		}
0 comments (0 inline, 0 general)