Codechange: Use functions to create common drop down list items.
This commit is contained in:

committed by
Peter Nelson

parent
11aa3694fa
commit
56cac21086
@@ -24,6 +24,7 @@
|
||||
#include "core/geometry_func.hpp"
|
||||
#include "rail_gui.h"
|
||||
#include "road_gui.h"
|
||||
#include "dropdown_type.h"
|
||||
#include "dropdown_func.h"
|
||||
#include "autoreplace_cmd.h"
|
||||
#include "group_cmd.h"
|
||||
@@ -563,8 +564,8 @@ public:
|
||||
|
||||
case WID_RV_TRAIN_ENGINEWAGON_DROPDOWN: {
|
||||
DropDownList list;
|
||||
list.push_back(std::make_unique<DropDownListStringItem>(STR_REPLACE_ENGINES, 1, false));
|
||||
list.push_back(std::make_unique<DropDownListStringItem>(STR_REPLACE_WAGONS, 0, false));
|
||||
list.push_back(MakeDropDownListStringItem(STR_REPLACE_ENGINES, 1));
|
||||
list.push_back(MakeDropDownListStringItem(STR_REPLACE_WAGONS, 0));
|
||||
ShowDropDownList(this, std::move(list), this->replace_engines ? 1 : 0, WID_RV_TRAIN_ENGINEWAGON_DROPDOWN);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user