Codechange: Use functions to create common drop down list items.
This commit is contained in:
committed by
Peter Nelson
parent
11aa3694fa
commit
56cac21086
@@ -23,6 +23,7 @@
|
||||
#include "newgrf_airport.h"
|
||||
#include "newgrf_callbacks.h"
|
||||
#include "dropdown_type.h"
|
||||
#include "dropdown_func.h"
|
||||
#include "core/geometry_func.hpp"
|
||||
#include "hotkeys.h"
|
||||
#include "vehicle_func.h"
|
||||
@@ -241,7 +242,7 @@ class BuildAirportWindow : public PickerWindowBase {
|
||||
DropDownList list;
|
||||
|
||||
for (uint i = 0; i < AirportClass::GetClassCount(); i++) {
|
||||
list.push_back(std::make_unique<DropDownListStringItem>(AirportClass::Get((AirportClassID)i)->name, i, false));
|
||||
list.push_back(MakeDropDownListStringItem(AirportClass::Get((AirportClassID)i)->name, i));
|
||||
}
|
||||
|
||||
return list;
|
||||
|
||||
Reference in New Issue
Block a user