diff options
-rw-r--r-- | src/airport_gui.cpp | 5 | ||||
-rw-r--r-- | src/newgrf_callbacks.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index ee2b96276..9c86c1161 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -258,6 +258,11 @@ public: case BAIRW_LAYOUT_NUM: SetDParam(0, STR_STATION_BUILD_AIRPORT_LAYOUT_NAME); SetDParam(1, _selected_airport_layout + 1); + if (_selected_airport_index != -1) { + const AirportSpec *as = GetAirportSpecFromClass(_selected_airport_class, _selected_airport_index); + StringID string = GetAirportTextCallback(as, _selected_airport_layout, CBID_AIRPORT_LAYOUT_NAME); + if (string != STR_UNDEFINED) SetDParam(0, string); + } break; default: break; diff --git a/src/newgrf_callbacks.h b/src/newgrf_callbacks.h index f85bfa859..911ca71c9 100644 --- a/src/newgrf_callbacks.h +++ b/src/newgrf_callbacks.h @@ -248,6 +248,9 @@ enum CallbackID { * used as a custom string ID in the 0xD000 range. */ CBID_AIRPORT_ADDITIONAL_TEXT = 0x155, // 15 bit callback + + /** Called to determine text to show as airport layout name. */ + CBID_AIRPORT_LAYOUT_NAME = 0x156, // 15 bit callback }; /** |