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

This commit is contained in:
stormcone
2019-04-04 23:06:38 +02:00
parent 9900af38f5
commit 4def6cf70f
5 changed files with 21 additions and 0 deletions

View File

@@ -928,6 +928,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;
}