mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r20382) -Codechange: Hide default airport layoutname if there is only one layout.
This commit is contained in:
parent
b2f9f1f1eb
commit
1cd34128d6
|
@ -257,12 +257,16 @@ public:
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue