Apply conditionals directly rather than using an in-between property

This commit is contained in:
Dean Herbert
2018-01-16 20:34:14 +09:00
parent e7a0a02466
commit 5e1cd8ddc4
5 changed files with 11 additions and 15 deletions

View File

@ -87,9 +87,8 @@ namespace osu.Game.Overlays.Toolbar
ruleset.Value = rulesets.AvailableRulesets.FirstOrDefault();
}
public override bool HandleKeyboardInput => handleInput;
public override bool HandleMouseInput => handleInput;
private bool handleInput => !ruleset.Disabled;
public override bool HandleKeyboardInput => !ruleset.Disabled;
public override bool HandleMouseInput => !ruleset.Disabled;
private void disabledChanged(bool isDisabled) => this.FadeColour(isDisabled ? Color4.Gray : Color4.White, 300);