mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
Fix #16008: Can select elements when no tile selected
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
- Feature: [#714] Allow up to 255 trains per ride.
|
||||
- Feature: [#2253] Path surfaces and railings can be mixed and matched, like in RCT1.
|
||||
- Improved: [#10664] Invisibility status is now shown in the Tile Inspector.
|
||||
- Fix: [#16008] Tile Inspector can select elements from last tile without reselecting it.
|
||||
|
||||
0.3.5.1 (2021-11-21)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
@@ -1337,6 +1337,10 @@ static void WindowTileInspectorSetPage(rct_window* w, const TileInspectorPage pa
|
||||
|
||||
static void WindowTileInspectorScrollmousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
// There is nothing to interact with when no tile is selected
|
||||
if (!windowTileInspectorTileSelected)
|
||||
return;
|
||||
|
||||
// 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;
|
||||
WindowTileInspectorSelectElementFromList(w, index);
|
||||
|
||||
Reference in New Issue
Block a user