Codechange: Use functions to create common drop down list items.

This commit is contained in:
Peter Nelson
2024-03-31 17:31:47 +01:00
committed by Peter Nelson
parent 11aa3694fa
commit 56cac21086
22 changed files with 190 additions and 136 deletions

View File

@@ -14,6 +14,7 @@
#include "../window_func.h"
#include "../network/network.h"
#include "../network/network_content.h"
#include "../dropdown_type.h"
#include "../dropdown_func.h"
#include "../timer/timer.h"
#include "../timer/timer_window.h"
@@ -317,7 +318,7 @@ struct GSConfigWindow : public Window {
DropDownList list;
for (int i = config_item.min_value; i <= config_item.max_value; i++) {
list.push_back(std::make_unique<DropDownListStringItem>(config_item.labels.find(i)->second, i, false));
list.push_back(MakeDropDownListStringItem(config_item.labels.find(i)->second, i));
}
ShowDropDownListAt(this, std::move(list), old_val, WID_GSC_SETTING_DROPDOWN, wi_rect, COLOUR_ORANGE);