mirror of
https://github.com/ppy/osu.git
synced 2025-02-27 17:32:55 +08:00
Ensure Master
volume is updated when scrolling on toolbar button
This commit is contained in:
parent
1f31e3fb51
commit
5eb56ab814
@ -77,6 +77,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
|
||||
protected override bool OnScroll(ScrollEvent e)
|
||||
{
|
||||
volume?.FocusMasterVolume();
|
||||
volume?.Adjust(GlobalAction.IncreaseVolume, e.ScrollDelta.Y, e.IsPrecise);
|
||||
return true;
|
||||
}
|
||||
|
@ -140,11 +140,16 @@ namespace osu.Game.Overlays
|
||||
|
||||
private ScheduledDelegate popOutDelegate;
|
||||
|
||||
public void FocusMasterVolume()
|
||||
{
|
||||
volumeMeters.Select(volumeMeterMaster);
|
||||
}
|
||||
|
||||
public override void Show()
|
||||
{
|
||||
// Focus on the master meter as a default if previously hidden
|
||||
if (State.Value == Visibility.Hidden)
|
||||
volumeMeters.Select(volumeMeterMaster);
|
||||
FocusMasterVolume();
|
||||
|
||||
if (State.Value == Visibility.Visible)
|
||||
schedulePopOut();
|
||||
|
Loading…
Reference in New Issue
Block a user