Fix: Missing button beeps (#14470)

This commit is contained in:
Tyler Trahan
2025-08-05 13:57:45 -04:00
committed by GitHub
parent dea40880a4
commit 8c58fb1efd
12 changed files with 28 additions and 9 deletions

View File

@@ -18,6 +18,7 @@
#include "cargotype.h"
#include "strings_func.h"
#include "window_func.h"
#include "sound_func.h"
#include "gfx_func.h"
#include "core/geometry_func.hpp"
#include "currency.h"
@@ -92,6 +93,8 @@ struct GraphLegendWindow : Window {
InvalidateWindowData(WC_DELIVERED_CARGO, 0);
InvalidateWindowData(WC_PERFORMANCE_HISTORY, 0);
InvalidateWindowData(WC_COMPANY_VALUE, 0);
SndClickBeep();
}
/**
@@ -767,6 +770,7 @@ public:
if (HasBit(this->masked_range, row)) break;
ToggleBit(this->excluded_range, row);
SndClickBeep();
this->SetDirty();
break;
}
@@ -1316,6 +1320,8 @@ struct BaseCargoGraphWindow : BaseGraphWindow {
int row = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_GRAPH_MATRIX);
if (row >= this->vscroll->GetCount()) return;
SndClickBeep();
for (const CargoSpec *cs : _sorted_cargo_specs) {
if (!HasBit(this->cargo_types, cs->Index())) continue;
if (row-- > 0) continue;