1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 12:45:09 +08:00

Remove local implementation of bindable in OsuCheckbox (#5046)

Remove local implementation of bindable in OsuCheckbox
This commit is contained in:
Dean Herbert 2019-06-21 21:08:09 +09:00 committed by GitHub
commit f766068e17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 17 deletions

View File

@ -4,7 +4,6 @@
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.Events;
@ -15,17 +14,6 @@ namespace osu.Game.Graphics.UserInterface
{
public class OsuCheckbox : Checkbox
{
private Bindable<bool> bindable;
public Bindable<bool> Bindable
{
set
{
bindable = value;
Current.BindTo(bindable);
}
}
public Color4 CheckedColor { get; set; } = Color4.Cyan;
public Color4 UncheckedColor { get; set; } = Color4.White;
public int FadeDuration { get; set; }

View File

@ -20,7 +20,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
new PlayerCheckbox
{
LabelText = "Show floating comments",
Bindable = config.GetBindable<bool>(OsuSetting.FloatingComments)
Current = config.GetBindable<bool>(OsuSetting.FloatingComments)
},
new FocusedTextBox
{

View File

@ -25,6 +25,6 @@ namespace osu.Game.Screens.Play.PlayerSettings
}
[BackgroundDependencyLoader]
private void load(OsuConfigManager config) => mouseButtonsCheckbox.Bindable = config.GetBindable<bool>(OsuSetting.MouseDisableButtons);
private void load(OsuConfigManager config) => mouseButtonsCheckbox.Current = config.GetBindable<bool>(OsuSetting.MouseDisableButtons);
}
}

View File

@ -47,9 +47,9 @@ namespace osu.Game.Screens.Play.PlayerSettings
{
dimSliderBar.Bindable = config.GetBindable<double>(OsuSetting.DimLevel);
blurSliderBar.Bindable = config.GetBindable<double>(OsuSetting.BlurLevel);
showStoryboardToggle.Bindable = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
beatmapSkinsToggle.Bindable = config.GetBindable<bool>(OsuSetting.BeatmapSkins);
beatmapHitsoundsToggle.Bindable = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds);
showStoryboardToggle.Current = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
beatmapSkinsToggle.Current = config.GetBindable<bool>(OsuSetting.BeatmapSkins);
beatmapHitsoundsToggle.Current = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds);
}
}
}