mirror of https://github.com/OpenTTD/OpenTTD
Fix: Missing beeps for graph selectors
parent
87f159b567
commit
d0d0ff3c38
|
@ -17,6 +17,7 @@
|
||||||
#include "cargotype.h"
|
#include "cargotype.h"
|
||||||
#include "strings_func.h"
|
#include "strings_func.h"
|
||||||
#include "window_func.h"
|
#include "window_func.h"
|
||||||
|
#include "sound_func.h"
|
||||||
#include "gfx_func.h"
|
#include "gfx_func.h"
|
||||||
#include "core/geometry_func.hpp"
|
#include "core/geometry_func.hpp"
|
||||||
#include "currency.h"
|
#include "currency.h"
|
||||||
|
@ -90,6 +91,8 @@ struct GraphLegendWindow : Window {
|
||||||
InvalidateWindowData(WC_DELIVERED_CARGO, 0);
|
InvalidateWindowData(WC_DELIVERED_CARGO, 0);
|
||||||
InvalidateWindowData(WC_PERFORMANCE_HISTORY, 0);
|
InvalidateWindowData(WC_PERFORMANCE_HISTORY, 0);
|
||||||
InvalidateWindowData(WC_COMPANY_VALUE, 0);
|
InvalidateWindowData(WC_COMPANY_VALUE, 0);
|
||||||
|
|
||||||
|
SndClickBeep();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -718,6 +721,7 @@ public:
|
||||||
|
|
||||||
if (HasBit(this->masked_range, row)) break;
|
if (HasBit(this->masked_range, row)) break;
|
||||||
ToggleBit(this->excluded_range, row);
|
ToggleBit(this->excluded_range, row);
|
||||||
|
SndClickBeep();
|
||||||
this->SetDirty();
|
this->SetDirty();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1255,6 +1259,8 @@ struct BaseCargoGraphWindow : BaseGraphWindow {
|
||||||
int row = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_GRAPH_MATRIX);
|
int row = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_GRAPH_MATRIX);
|
||||||
if (row >= this->vscroll->GetCount()) return;
|
if (row >= this->vscroll->GetCount()) return;
|
||||||
|
|
||||||
|
SndClickBeep();
|
||||||
|
|
||||||
for (const CargoSpec *cs : _sorted_cargo_specs) {
|
for (const CargoSpec *cs : _sorted_cargo_specs) {
|
||||||
if (!HasBit(this->cargo_types, cs->Index())) continue;
|
if (!HasBit(this->cargo_types, cs->Index())) continue;
|
||||||
if (row-- > 0) continue;
|
if (row-- > 0) continue;
|
||||||
|
|
Loading…
Reference in New Issue