mirror of
https://github.com/ppy/osu
synced 2024-12-16 03:45:46 +00:00
Merge pull request #28823 from frenzibyte/remove-volume-key-arrow-handling
Remove key arrow handling in `VolumeOverlay` to avoid conflicting with ruleset key bindings (i.e. osu!catch)
This commit is contained in:
commit
911fa31ac0
@ -1,8 +1,6 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Bindables;
|
||||
@ -19,7 +17,6 @@ using osu.Game.Input.Bindings;
|
||||
using osu.Game.Overlays.Volume;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Game.Overlays
|
||||
{
|
||||
@ -27,17 +24,17 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
private const float offset = 10;
|
||||
|
||||
private VolumeMeter volumeMeterMaster;
|
||||
private VolumeMeter volumeMeterEffect;
|
||||
private VolumeMeter volumeMeterMusic;
|
||||
private MuteButton muteButton;
|
||||
private VolumeMeter volumeMeterMaster = null!;
|
||||
private VolumeMeter volumeMeterEffect = null!;
|
||||
private VolumeMeter volumeMeterMusic = null!;
|
||||
private MuteButton muteButton = null!;
|
||||
|
||||
private SelectionCycleFillFlowContainer<VolumeMeter> volumeMeters = null!;
|
||||
|
||||
private readonly BindableDouble muteAdjustment = new BindableDouble();
|
||||
|
||||
public Bindable<bool> IsMuted { get; } = new Bindable<bool>();
|
||||
|
||||
private SelectionCycleFillFlowContainer<VolumeMeter> volumeMeters;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio, OsuColour colours)
|
||||
{
|
||||
@ -140,8 +137,6 @@ namespace osu.Game.Overlays
|
||||
return false;
|
||||
}
|
||||
|
||||
private ScheduledDelegate popOutDelegate;
|
||||
|
||||
public void FocusMasterVolume()
|
||||
{
|
||||
volumeMeters.Select(volumeMeterMaster);
|
||||
@ -179,30 +174,6 @@ namespace osu.Game.Overlays
|
||||
return base.OnMouseMove(e);
|
||||
}
|
||||
|
||||
protected override bool OnKeyDown(KeyDownEvent e)
|
||||
{
|
||||
switch (e.Key)
|
||||
{
|
||||
case Key.Left:
|
||||
Adjust(GlobalAction.PreviousVolumeMeter);
|
||||
return true;
|
||||
|
||||
case Key.Right:
|
||||
Adjust(GlobalAction.NextVolumeMeter);
|
||||
return true;
|
||||
|
||||
case Key.Down:
|
||||
Adjust(GlobalAction.DecreaseVolume);
|
||||
return true;
|
||||
|
||||
case Key.Up:
|
||||
Adjust(GlobalAction.IncreaseVolume);
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnKeyDown(e);
|
||||
}
|
||||
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
{
|
||||
schedulePopOut();
|
||||
@ -215,6 +186,8 @@ namespace osu.Game.Overlays
|
||||
base.OnHoverLost(e);
|
||||
}
|
||||
|
||||
private ScheduledDelegate? popOutDelegate;
|
||||
|
||||
private void schedulePopOut()
|
||||
{
|
||||
popOutDelegate?.Cancel();
|
||||
|
Loading…
Reference in New Issue
Block a user