File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 26
26
using osu . Game . Localisation ;
27
27
using osu . Game . Online . Placeholders ;
28
28
using osu . Game . Overlays ;
29
+ using osu . Game . Overlays . Volume ;
29
30
using osu . Game . Scoring ;
30
31
using osu . Game . Screens . Play ;
31
32
using osu . Game . Screens . Ranking . Expanded . Accuracy ;
@@ -119,6 +120,7 @@ private void load(AudioManager audio)
119
120
RelativeSizeAxes = Axes . Both ,
120
121
Children = new Drawable [ ]
121
122
{
123
+ new GlobalScrollAdjustsVolume ( ) ,
122
124
StatisticsPanel = createStatisticsPanel ( ) . With ( panel =>
123
125
{
124
126
panel . RelativeSizeAxes = Axes . Both ;
@@ -526,12 +528,24 @@ public void OnReleased(KeyBindingReleaseEvent<GlobalAction> e)
526
528
{
527
529
}
528
530
531
+ protected override bool OnScroll ( ScrollEvent e )
532
+ {
533
+ // Match stable behaviour of only alt-scroll adjusting volume.
534
+ // This is the same behaviour as the song selection screen.
535
+ if ( ! e . CurrentState . Keyboard . AltPressed )
536
+ return true ;
537
+
538
+ return base . OnScroll ( e ) ;
539
+ }
540
+
529
541
protected partial class VerticalScrollContainer : OsuScrollContainer
530
542
{
531
543
protected override Container < Drawable > Content => content ;
532
544
533
545
private readonly Container content ;
534
546
547
+ protected override bool OnScroll ( ScrollEvent e ) => ! e . ControlPressed && ! e . AltPressed && ! e . ShiftPressed && ! e . SuperPressed ;
548
+
535
549
public VerticalScrollContainer ( )
536
550
{
537
551
Masking = false ;
You can’t perform that action at this time.
0 commit comments