Mercurial > hg > openttd
changeset 15715:59cb3bfd1819 draft
(svn r20382) -Codechange: Hide default airport layoutname if there is only one layout.
author | frosch <frosch@openttd.org> |
---|---|
date | Thu, 05 Aug 2010 17:24:45 +0000 |
parents | 934e283c3dc6 |
children | e14bc18e6e9b |
files | src/airport_gui.cpp |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -257,12 +257,16 @@ break; case BAIRW_LAYOUT_NUM: - SetDParam(0, STR_STATION_BUILD_AIRPORT_LAYOUT_NAME); - SetDParam(1, _selected_airport_layout + 1); + SetDParam(0, STR_EMPTY); 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); + if (string != STR_UNDEFINED) { + SetDParam(0, string); + } else if (as->num_table > 1) { + SetDParam(0, STR_STATION_BUILD_AIRPORT_LAYOUT_NAME); + SetDParam(1, _selected_airport_layout + 1); + } } break;