mirror of https://github.com/OpenRCT2/OpenRCT2.git
This fixes it for rides but it is also an issue effecting a few different dropdowns
This commit is contained in:
parent
a6d3dbc6d9
commit
622c8cdb7e
|
@ -381,6 +381,10 @@ public:
|
|||
|
||||
void OnDropdown(WidgetIndex widgetIndex, int32_t dropdownIndex) override
|
||||
{
|
||||
if (dropdownIndex == -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_PAGE_DROPDOWN_BUTTON:
|
||||
|
|
|
@ -169,6 +169,10 @@ public:
|
|||
|
||||
void OnDropdown(WidgetIndex widgetIndex, int32_t selectedIndex) override
|
||||
{
|
||||
if (selectedIndex == -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
auto serverIndex = selected_list_item;
|
||||
if (serverIndex >= 0 && serverIndex < static_cast<int32_t>(_serverList.GetCount()))
|
||||
{
|
||||
|
|
|
@ -238,6 +238,10 @@ public:
|
|||
|
||||
void OnDropdown(WidgetIndex widgetIndex, int32_t dropdownIndex) override
|
||||
{
|
||||
if (dropdownIndex == -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (widgetIndex == WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER)
|
||||
{
|
||||
auto action = StaffSetColourAction(GetSelectedStaffType(), ColourDropDownIndexToColour(dropdownIndex));
|
||||
|
|
|
@ -219,6 +219,10 @@ public:
|
|||
|
||||
void OnDropdown(WidgetIndex widgetIndex, int32_t selectedIndex) override
|
||||
{
|
||||
if (selectedIndex == -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (widgetIndex == WIDX_GAME_TOOLS)
|
||||
{
|
||||
switch (selectedIndex)
|
||||
|
|
|
@ -2653,6 +2653,10 @@ public:
|
|||
|
||||
void OnDropdown(WidgetIndex widgetIndex, int32_t selectedIndex) override
|
||||
{
|
||||
if (selectedIndex == -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_FILE_MENU:
|
||||
|
|
|
@ -1447,10 +1447,7 @@ void WindowEventDropdownCall(WindowBase* w, WidgetIndex widgetIndex, int32_t dro
|
|||
{
|
||||
if (w->event_handlers == nullptr)
|
||||
{
|
||||
if (dropdownIndex != -1)
|
||||
{
|
||||
w->OnDropdown(widgetIndex, dropdownIndex);
|
||||
}
|
||||
w->OnDropdown(widgetIndex, dropdownIndex);
|
||||
}
|
||||
else if (w->event_handlers->dropdown != nullptr)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue