From 69803105efbaee00bd3aa8494cb0d4bf5c74b99f Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Sun, 4 Jul 2021 17:19:44 +0200 Subject: [PATCH] Fix volume meter requesting focus for any action --- osu.Game/Overlays/Volume/VolumeMeter.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/osu.Game/Overlays/Volume/VolumeMeter.cs b/osu.Game/Overlays/Volume/VolumeMeter.cs index 1c997a0abc..55f7588741 100644 --- a/osu.Game/Overlays/Volume/VolumeMeter.cs +++ b/osu.Game/Overlays/Volume/VolumeMeter.cs @@ -27,8 +27,6 @@ namespace osu.Game.Overlays.Volume { public class VolumeMeter : Container, IKeyBindingHandler { - private bool isFocused = true; - private CircularProgress volumeCircle; private CircularProgress volumeCircleGlow; @@ -316,13 +314,11 @@ namespace osu.Game.Overlays.Volume public void Focus() { - isFocused = true; this.ScaleTo(1.04f, transition_length, Easing.OutExpo); } public void Unfocus() { - isFocused = false; this.ScaleTo(1f, transition_length, Easing.OutExpo); } @@ -341,17 +337,15 @@ namespace osu.Game.Overlays.Volume if (!IsHovered) return false; - // Grab back focus is UP/DOWN input is directed at this meter - if (!isFocused) - RequestFocus?.Invoke(this); - switch (action) { case GlobalAction.SelectPrevious: + RequestFocus?.Invoke(this); adjust(1, false); return true; case GlobalAction.SelectNext: + RequestFocus?.Invoke(this); adjust(-1, false); return true; }