Changeset - r24014:d9cf4cd9869d
[Not reviewed]
master
0 5 0
stormcone - 5 years ago 2019-04-04 21:06:38
48624099+stormcone@users.noreply.github.com
Feature: Show the name of the NewGRF in the build vehicle window.
5 files changed with 21 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -928,6 +928,14 @@ int DrawVehiclePurchaseInfo(int left, in
 
	/* Additional text from NewGRF */
 
	y = ShowAdditionalText(left, right, y, engine_number);
 

	
 
	/* The NewGRF's name which the vehicle comes from */
 
	const GRFConfig *config = GetGRFConfig(e->GetGRFID());
 
	if (_settings_client.gui.show_newgrf_name && config != nullptr)
 
	{
 
		DrawString(left, right, y, config->GetName(), TC_BLACK);
 
		y += FONT_HEIGHT_NORMAL;
 
	}
 

	
 
	return y;
 
}
 

	
src/lang/english.txt
Show inline comments
 
@@ -1312,6 +1312,8 @@ STR_CONFIG_SETTING_POPULATION_IN_LABEL  
 
STR_CONFIG_SETTING_POPULATION_IN_LABEL_HELPTEXT                 :Display the population of towns in their label on the map
 
STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS                         :Thickness of lines in graphs: {STRING2}
 
STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS_HELPTEXT                :Width of the line in the graphs. A thin line is more precisely readable, a thicker line is easier to see and colours are easier to distinguish
 
STR_CONFIG_SETTING_SHOW_NEWGRF_NAME                             :Show the NewGRF's name in the build vehicle window
 
STR_CONFIG_SETTING_SHOW_NEWGRF_NAME_HELPTEXT                    :Add a line to the build vehicle window, showing which NewGRF the selected vehicle comes from.
 

	
 
STR_CONFIG_SETTING_LANDSCAPE                                    :Landscape: {STRING2}
 
STR_CONFIG_SETTING_LANDSCAPE_HELPTEXT                           :Landscapes define basic gameplay scenarios with different cargos and town growth requirements. NewGRF and Game Scripts allow finer control though
src/settings_gui.cpp
Show inline comments
 
@@ -1566,6 +1566,7 @@ static SettingsContainer &GetSettingsTre
 
			interface->Add(new SettingEntry("gui.timetable_in_ticks"));
 
			interface->Add(new SettingEntry("gui.timetable_arrival_departure"));
 
			interface->Add(new SettingEntry("gui.expenses_layout"));
 
			interface->Add(new SettingEntry("gui.show_newgrf_name"));
 
		}
 

	
 
		SettingsPage *advisors = main->Add(new SettingsPage(STR_CONFIG_SETTING_ADVISORS));
src/settings_type.h
Show inline comments
 
@@ -145,6 +145,7 @@ struct GUISettings {
 
	uint8  graph_line_thickness;             ///< the thickness of the lines in the various graph guis
 
	uint8  osk_activation;                   ///< Mouse gesture to trigger the OSK.
 
	byte   starting_colour;                  ///< default color scheme for the company to start a new game with
 
	bool   show_newgrf_name;                 ///< Show the name of the NewGRF in the build vehicle window
 

	
 
	uint16 console_backlog_timeout;          ///< the minimum amount of time items should be in the console backlog before they will be removed in ~3 seconds granularity.
 
	uint16 console_backlog_length;           ///< the minimum amount of items in the console backlog before items will be removed.
src/table/settings.ini
Show inline comments
 
@@ -3240,6 +3240,15 @@ strhelp  = STR_CONFIG_SETTING_GRAPH_LINE
 
strval   = STR_JUST_COMMA
 
proc     = RedrawScreen
 

	
 
[SDTC_BOOL]
 
var      = gui.show_newgrf_name
 
flags    = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
 
def      = false
 
str      = STR_CONFIG_SETTING_SHOW_NEWGRF_NAME
 
strhelp  = STR_CONFIG_SETTING_SHOW_NEWGRF_NAME_HELPTEXT
 
proc     = RedrawScreen
 
cat      = SC_ADVANCED
 

	
 
; For the dedicated build we'll enable dates in logs by default.
 
[SDTC_BOOL]
 
ifdef    = DEDICATED
0 comments (0 inline, 0 general)