Fix: buttons sometimes stay pressed

In the invalidate function of the tile inspector, the checkboxes get checked to match the selected tile element. Some of those checkboxes share their widget index with buttons from other pages. When a checkbox is checked, the it's set to be "pressed", which causes the butons in the other tabs so appear that way. This behaviour is fixed by unpressing widgets when switching to another page.
This commit is contained in:
Hielke Morsink 2018-05-21 19:51:12 +02:00
parent fe40005372
commit 0d77c279aa

View file

@ -1352,6 +1352,7 @@ static void window_tile_inspector_set_page(rct_window *w, const TILE_INSPECTOR_P
w->widgets = PageWidgets[page];
w->enabled_widgets = PageEnabledWidgets[page];
w->disabled_widgets = PageDisabledWidgets[page];
w->pressed_widgets = 0;
}
static void window_tile_inspector_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y)