mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 14:24:33 +01:00
Rename Dropdown::Item to ItemExt
This commit is contained in:
@@ -58,9 +58,9 @@ uint32_t DropdownGetAppropriateImageDropdownItemsPerRow(uint32_t numItems);
|
||||
|
||||
namespace Dropdown
|
||||
{
|
||||
struct Item
|
||||
struct ItemExt
|
||||
{
|
||||
constexpr Item(int32_t _expectedItemIndex, uint32_t _itemFormat, rct_string_id _stringId)
|
||||
constexpr ItemExt(int32_t _expectedItemIndex, uint32_t _itemFormat, rct_string_id _stringId)
|
||||
: expectedItemIndex(_expectedItemIndex)
|
||||
, itemFormat(_itemFormat)
|
||||
, stringId(_stringId)
|
||||
@@ -72,31 +72,31 @@ namespace Dropdown
|
||||
rct_string_id stringId;
|
||||
};
|
||||
|
||||
constexpr Item ToggleOption(int32_t _expectedItemIndex, rct_string_id _stringId)
|
||||
constexpr ItemExt ToggleOption(int32_t _expectedItemIndex, rct_string_id _stringId)
|
||||
{
|
||||
return Item(_expectedItemIndex, STR_TOGGLE_OPTION, _stringId);
|
||||
return ItemExt(_expectedItemIndex, STR_TOGGLE_OPTION, _stringId);
|
||||
}
|
||||
|
||||
constexpr Item Separator()
|
||||
constexpr ItemExt Separator()
|
||||
{
|
||||
return Item(-1, Dropdown::SeparatorString, STR_EMPTY);
|
||||
return ItemExt(-1, Dropdown::SeparatorString, STR_EMPTY);
|
||||
}
|
||||
|
||||
template<int N> void SetItems(const Dropdown::Item (&items)[N])
|
||||
template<int N> void SetItems(const Dropdown::ItemExt (&items)[N])
|
||||
{
|
||||
for (int i = 0; i < N; ++i)
|
||||
{
|
||||
const Item& item = items[i];
|
||||
const ItemExt& item = items[i];
|
||||
gDropdownItemsFormat[i] = item.itemFormat;
|
||||
gDropdownItemsArgs[i] = item.stringId;
|
||||
}
|
||||
}
|
||||
|
||||
template<int N> constexpr bool ItemIDsMatchIndices(const Dropdown::Item (&items)[N])
|
||||
template<int N> constexpr bool ItemIDsMatchIndices(const Dropdown::ItemExt (&items)[N])
|
||||
{
|
||||
for (int i = 0; i < N; ++i)
|
||||
{
|
||||
const Dropdown::Item& item = items[i];
|
||||
const Dropdown::ItemExt& item = items[i];
|
||||
if (item.expectedItemIndex >= 0 && item.expectedItemIndex != i)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3464,7 +3464,7 @@ static void TopToolbarInitCheatsMenu(rct_window* w, rct_widget* widget)
|
||||
{
|
||||
using namespace Dropdown;
|
||||
|
||||
constexpr Item items[] = {
|
||||
constexpr ItemExt items[] = {
|
||||
ToggleOption(DDIDX_CHEATS, STR_CHEAT_TITLE),
|
||||
ToggleOption(DDIDX_TILE_INSPECTOR, STR_DEBUG_DROPDOWN_TILE_INSPECTOR),
|
||||
ToggleOption(DDIDX_OBJECT_SELECTION, STR_DEBUG_DROPDOWN_OBJECT_SELECTION),
|
||||
@@ -3631,7 +3631,7 @@ static void TopToolbarNetworkMenuDropdown(int16_t dropdownIndex)
|
||||
static void TopToolbarInitViewMenu(rct_window* w, rct_widget* widget)
|
||||
{
|
||||
using namespace Dropdown;
|
||||
constexpr Item items[] = {
|
||||
constexpr ItemExt items[] = {
|
||||
ToggleOption(DDIDX_UNDERGROUND_INSIDE, STR_UNDERGROUND_VIEW),
|
||||
ToggleOption(DDIDX_TRANSPARENT_WATER, STR_VIEWPORT_TRANSPARENT_WATER),
|
||||
ToggleOption(DDIDX_HIDE_BASE, STR_REMOVE_BASE_LAND),
|
||||
|
||||
Reference in New Issue
Block a user