Fix some pieces of SettingsItem getting dimmed twice when disabled

This commit is contained in:
Dean Herbert
2020-03-23 13:11:40 +09:00
parent aefd2fd847
commit 3a3df06e0b
2 changed files with 16 additions and 10 deletions

View File

@ -8,16 +8,14 @@ namespace osu.Game.Overlays.Settings
{
public class SettingsCheckbox : SettingsItem<bool>
{
private OsuCheckbox checkbox;
private string labelText;
protected override Drawable CreateControl() => checkbox = new OsuCheckbox();
protected override Drawable CreateControl() => new OsuCheckbox();
public override string LabelText
{
get => labelText;
set => checkbox.LabelText = labelText = value;
set => ((OsuCheckbox)Control).LabelText = labelText = value;
}
}
}