diff options
author | stormcone <48624099+stormcone@users.noreply.github.com> | 2019-04-04 23:06:38 +0200 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2020-01-04 18:42:35 +0100 |
commit | b524f1ae21487caf8ed460d8e20a51c3dd7e11a6 (patch) | |
tree | 421c770d1ec2d9947200b0d43e404d9a604acc6f /src/build_vehicle_gui.cpp | |
parent | e04ca904a9455afc63aa87db775fe4463ab899b7 (diff) | |
download | openttd-b524f1ae21487caf8ed460d8e20a51c3dd7e11a6.tar.xz |
Feature: Show the name of the NewGRF in the build vehicle window.
Diffstat (limited to 'src/build_vehicle_gui.cpp')
-rw-r--r-- | src/build_vehicle_gui.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index c457b0f19..c3252f7b9 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -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; } |