Skip to content

Commit c9a492a

Browse files
authored
Merge pull request #32075 from Gennadiyev/patch-result-screen-volume-adjust
Add Alt + mousewheel volume adjustment on result screens
2 parents 5318c37 + 543ad5b commit c9a492a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

osu.Game/Screens/Ranking/ResultsScreen.cs

+14
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
using osu.Game.Localisation;
2727
using osu.Game.Online.Placeholders;
2828
using osu.Game.Overlays;
29+
using osu.Game.Overlays.Volume;
2930
using osu.Game.Scoring;
3031
using osu.Game.Screens.Play;
3132
using osu.Game.Screens.Ranking.Expanded.Accuracy;
@@ -119,6 +120,7 @@ private void load(AudioManager audio)
119120
RelativeSizeAxes = Axes.Both,
120121
Children = new Drawable[]
121122
{
123+
new GlobalScrollAdjustsVolume(),
122124
StatisticsPanel = createStatisticsPanel().With(panel =>
123125
{
124126
panel.RelativeSizeAxes = Axes.Both;
@@ -526,12 +528,24 @@ public void OnReleased(KeyBindingReleaseEvent<GlobalAction> e)
526528
{
527529
}
528530

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+
529541
protected partial class VerticalScrollContainer : OsuScrollContainer
530542
{
531543
protected override Container<Drawable> Content => content;
532544

533545
private readonly Container content;
534546

547+
protected override bool OnScroll(ScrollEvent e) => !e.ControlPressed && !e.AltPressed && !e.ShiftPressed && !e.SuperPressed;
548+
535549
public VerticalScrollContainer()
536550
{
537551
Masking = false;

0 commit comments

Comments
 (0)