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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user