Merge branch 'master' into jgrpp
# Conflicts: # src/airport_gui.cpp # src/blitter/32bpp_optimized.cpp # src/blitter/32bpp_simple.cpp # src/blitter/32bpp_sse2.cpp # src/blitter/8bpp_optimized.cpp # src/blitter/8bpp_simple.cpp # src/blitter/null.cpp # src/build_vehicle_gui.cpp # src/company_gui.cpp # src/crashlog.cpp # src/dropdown.cpp # src/dropdown_type.h # src/genworld_gui.cpp # src/gfx.cpp # src/main_gui.cpp # src/newgrf_debug_gui.cpp # src/news_gui.cpp # src/news_type.h # src/openttd.cpp # src/order_gui.cpp # src/settings.cpp # src/settings_gui.cpp # src/signs.cpp # src/smallmap_gui.cpp # src/spritecache.cpp # src/spriteloader/grf.cpp # src/texteff.cpp # src/toolbar_gui.cpp # src/town_cmd.cpp # src/vehicle.cpp # src/vehicle_gui.cpp # src/video/opengl.cpp # src/viewport.cpp # src/waypoint_cmd.cpp # src/zoom_type.h
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "string_func.h"
|
||||
#include "gui.h"
|
||||
#include "dropdown_type.h"
|
||||
#include "dropdown_common_type.h"
|
||||
#include "dropdown_func.h"
|
||||
#include "querystring_gui.h"
|
||||
#include "town.h"
|
||||
@@ -392,7 +393,7 @@ static DropDownList BuildMapsizeDropDown(int other_dimension)
|
||||
|
||||
for (uint i = MIN_MAP_SIZE_BITS; i <= MAX_MAP_SIZE_BITS; i++) {
|
||||
SetDParam(0, 1LL << i);
|
||||
list.push_back(std::make_unique<DropDownListStringItem>((i + other_dimension > MAX_MAP_TILES_BITS) ? STR_RED_INT : STR_JUST_INT, i, false));
|
||||
list.push_back(MakeDropDownListStringItem((i + other_dimension > MAX_MAP_TILES_BITS) ? STR_RED_INT : STR_JUST_INT, i, false));
|
||||
}
|
||||
|
||||
return list;
|
||||
@@ -405,20 +406,20 @@ static DropDownList BuildTownNameDropDown()
|
||||
/* Add and sort newgrf townnames generators */
|
||||
const auto &grf_names = GetGRFTownNameList();
|
||||
for (uint i = 0; i < grf_names.size(); i++) {
|
||||
list.push_back(std::make_unique<DropDownListStringItem>(grf_names[i], BUILTIN_TOWNNAME_GENERATOR_COUNT + i, false));
|
||||
list.push_back(MakeDropDownListStringItem(grf_names[i], BUILTIN_TOWNNAME_GENERATOR_COUNT + i));
|
||||
}
|
||||
std::sort(list.begin(), list.end(), DropDownListStringItem::NatSortFunc);
|
||||
|
||||
size_t newgrf_size = list.size();
|
||||
/* Insert newgrf_names at the top of the list */
|
||||
if (newgrf_size > 0) {
|
||||
list.push_back(std::make_unique<DropDownListDividerItem>(-1, false)); // separator line
|
||||
list.push_back(MakeDropDownListDividerItem()); // separator line
|
||||
newgrf_size++;
|
||||
}
|
||||
|
||||
/* Add and sort original townnames generators */
|
||||
for (uint i = 0; i < BUILTIN_TOWNNAME_GENERATOR_COUNT; i++) {
|
||||
list.push_back(std::make_unique<DropDownListStringItem>(STR_MAPGEN_TOWN_NAME_ORIGINAL_ENGLISH + i, i, false));
|
||||
list.push_back(MakeDropDownListStringItem(STR_MAPGEN_TOWN_NAME_ORIGINAL_ENGLISH + i, i));
|
||||
}
|
||||
std::sort(list.begin() + newgrf_size, list.end(), DropDownListStringItem::NatSortFunc);
|
||||
|
||||
|
Reference in New Issue
Block a user