1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 15:24:30 +01:00

Fix first widget being pressed on tabless plugin windows

This commit is contained in:
Ted John
2020-05-09 16:06:06 +01:00
parent aac55d2cc0
commit 1e2cf9f77b

View File

@@ -580,11 +580,14 @@ namespace OpenRCT2::Ui::Windows
{
const auto& info = GetInfo(w);
auto numTabs = info.Desc.Tabs.size();
for (size_t i = 0; i < numTabs; i++)
if (numTabs != 0)
{
w->pressed_widgets &= ~(1 << (WIDX_TAB_0 + i));
for (size_t i = 0; i < numTabs; i++)
{
w->pressed_widgets &= ~(1 << (WIDX_TAB_0 + i));
}
w->pressed_widgets |= 1LL << (WIDX_TAB_0 + w->page);
}
w->pressed_widgets |= 1LL << (WIDX_TAB_0 + w->page);
}
static void window_custom_invalidate(rct_window* w)