You've already forked OpenRCT2-Unity
mirror of
https://github.com/izzy2lost/OpenRCT2-Unity.git
synced 2026-03-10 12:38:22 -07:00
Properly handle clicking below the list
This commit is contained in:
@@ -1339,7 +1339,7 @@ static void WindowTileInspectorScrollmousedown(rct_window* w, int32_t scrollInde
|
||||
// Because the list items are displayed in reverse order, subtract the calculated index from the amount of elements
|
||||
const int16_t index = windowTileInspectorElementCount - (screenCoords.y - 1) / SCROLLABLE_ROW_HEIGHT - 1;
|
||||
const ScreenRect checkboxColumnRect{ { 2, 0 }, { 11, screenCoords.y } };
|
||||
if (checkboxColumnRect.Contains(screenCoords))
|
||||
if (index >= 0 && checkboxColumnRect.Contains(screenCoords))
|
||||
{ // Checkbox was clicked
|
||||
WindowTileInspectorToggleInvisibility(index);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user