Codechange: Make functions for click and confirm beeps. (#14484)

Avoids repetition.
This commit is contained in:
Peter Nelson
2025-07-27 21:54:32 +01:00
committed by GitHub
parent f51067f9f5
commit 614a01907a
17 changed files with 73 additions and 54 deletions
+1 -1
View File
@@ -3076,7 +3076,7 @@ struct IndustryCargoesWindow : public Window {
case WID_IC_NOTIFY:
this->ToggleWidgetLoweredState(WID_IC_NOTIFY);
this->SetWidgetDirty(WID_IC_NOTIFY);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
SndClickBeep();
if (this->IsWidgetLowered(WID_IC_NOTIFY)) {
if (FindWindowByClass(WC_SMALLMAP) == nullptr) ShowSmallMap();