1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 04:53:12 +01:00

Fix #25437: no mouse over highlight on new ride window previews

This commit is contained in:
mix
2025-10-31 18:25:46 +00:00
committed by GitHub
parent 75c1669240
commit 71c4d9c3c5

View File

@@ -491,14 +491,14 @@ namespace OpenRCT2::Ui::Windows
while (listItem->Type != kRideTypeNull || listItem->EntryIndex != kObjectEntryIndexNull)
{
// Draw flat button rectangle
auto borderStyle = Rectangle::BorderStyle::none;
if (_newRideVars.SelectedRide == *listItem)
borderStyle = Rectangle::BorderStyle::inset;
if (_newRideVars.HighlightedRide == *listItem || borderStyle != Rectangle::BorderStyle::none)
const bool isSelected = _newRideVars.SelectedRide == *listItem;
if (_newRideVars.HighlightedRide == *listItem || isSelected)
{
const auto borderStyle = isSelected ? Rectangle::BorderStyle::inset : Rectangle::BorderStyle::outset;
Rectangle::fillInset(
rt, { coords, coords + ScreenCoordsXY{ 115, 115 } }, colours[1], borderStyle,
Rectangle::FillBrightness::dark);
}
// Draw ride image with feathered border
auto mask = ImageId(SPR_NEW_RIDE_MASK);