diff --git a/osu.Game/Overlays/Direct/FilterControl.cs b/osu.Game/Overlays/Direct/FilterControl.cs index 8883dfdebb..a2da516257 100644 --- a/osu.Game/Overlays/Direct/FilterControl.cs +++ b/osu.Game/Overlays/Direct/FilterControl.cs @@ -49,14 +49,14 @@ namespace osu.Game.Overlays.Direct { private Drawable icon { - get { return iconContainer.Icon; } - set { iconContainer.Icon = value; } + get => iconContainer.Icon; + set => iconContainer.Icon = value; } private RulesetInfo ruleset; public RulesetInfo Ruleset { - get { return ruleset; } + get => ruleset; set { ruleset = value; @@ -73,6 +73,9 @@ namespace osu.Game.Overlays.Direct iconContainer.FadeTo(Ruleset.ID == obj?.ID ? 1f : 0.5f, 100); } + public override bool HandleKeyboardInput => !bindable.Disabled && base.HandleKeyboardInput; + public override bool HandleMouseInput => !bindable.Disabled && base.HandleMouseInput; + public RulesetToggleButton(Bindable bindable, RulesetInfo ruleset) { this.bindable = bindable; @@ -90,6 +93,7 @@ namespace osu.Game.Overlays.Direct Ruleset = ruleset; bindable.ValueChanged += Bindable_ValueChanged; + bindable.DisabledChanged += isDisabled => this.FadeColour(isDisabled ? Color4.Gray : Color4.White, 300); Bindable_ValueChanged(bindable.Value); Action = () => bindable.Value = Ruleset; } diff --git a/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs b/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs index 05866f7002..1da51e4a5a 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs @@ -87,8 +87,8 @@ namespace osu.Game.Overlays.Toolbar ruleset.Value = rulesets.AvailableRulesets.FirstOrDefault(); } - public override bool HandleKeyboardInput => !ruleset.Disabled; - public override bool HandleMouseInput => !ruleset.Disabled; + public override bool HandleKeyboardInput => !ruleset.Disabled && base.HandleKeyboardInput; + public override bool HandleMouseInput => !ruleset.Disabled && base.HandleMouseInput; private void disabledChanged(bool isDisabled) => this.FadeColour(isDisabled ? Color4.Gray : Color4.White, 300);