1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 22:34:33 +01:00

Fix #18032: non-interactive widgets produce sound

This commit is contained in:
Hielke Morsink
2022-09-19 22:38:34 +02:00
committed by GitHub
parent d2634640ce
commit 43dbf9eb18
2 changed files with 22 additions and 1 deletions

View File

@@ -68,6 +68,7 @@
- Fix: [#18009] Visual glitch with litter at edge of sloped path.
- Fix: [#18026] Park rating drops to 0 with more than 32k guests, total ride excitement or intensity.
- Fix: [#18051] Visual glitch with Mine Ride's large unbanked turn.
- Fix: [#18032] All non-interactive widgets (labels, groupboxes) produce sound when clicked.
0.4.1 (2022-07-04)
------------------------------------------------------------------------

View File

@@ -1051,7 +1051,27 @@ static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, rct_window* w, W
case WindowWidgetType::Scroll:
InputScrollBegin(*w, widgetIndex, screenCoords);
break;
default:
case WindowWidgetType::Empty:
case WindowWidgetType::LabelCentred:
case WindowWidgetType::Label:
case WindowWidgetType::Groupbox:
case WindowWidgetType::Placeholder:
case WindowWidgetType::Last:
// Non-interactive widget type
break;
case WindowWidgetType::ImgBtn:
case WindowWidgetType::ColourBtn:
case WindowWidgetType::TrnBtn:
case WindowWidgetType::Tab:
case WindowWidgetType::FlatBtn:
case WindowWidgetType::Button:
case WindowWidgetType::TableHeader:
case WindowWidgetType::Spinner:
case WindowWidgetType::DropdownMenu:
case WindowWidgetType::CloseBox:
case WindowWidgetType::Checkbox:
case WindowWidgetType::TextBox:
case WindowWidgetType::Custom:
if (!WidgetIsDisabled(*w, widgetIndex))
{
OpenRCT2::Audio::Play(OpenRCT2::Audio::SoundId::Click1, 0, w->windowPos.x + widget.midX());