mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
Merge pull request #11683 from IntelOrca/plugin/fix-first-widget-pressed
[Plugin] Fix first widget being pressed on tab-less windows
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user