Merge upstream PR #7852 into jgrpp

Feature: Show the name of the NewGRF in the build vehicle window

Author: stormcone

# Conflicts:
#	src/lang/english.txt
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/table/settings.ini
This commit is contained in:
Jonathan G Rennison
2019-12-13 17:28:48 +00:00
5 changed files with 22 additions and 0 deletions

View File

@@ -929,6 +929,14 @@ int DrawVehiclePurchaseInfo(int left, int right, int y, EngineID engine_number,
/* 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;
}