mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 00:43:22 +08:00
Remove local implementation of bindable in OsuCheckbox (#5046)
Remove local implementation of bindable in OsuCheckbox
This commit is contained in:
commit
f766068e17
@ -4,7 +4,6 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Audio.Sample;
|
using osu.Framework.Audio.Sample;
|
||||||
using osu.Framework.Bindables;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
@ -15,17 +14,6 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
public class OsuCheckbox : Checkbox
|
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 CheckedColor { get; set; } = Color4.Cyan;
|
||||||
public Color4 UncheckedColor { get; set; } = Color4.White;
|
public Color4 UncheckedColor { get; set; } = Color4.White;
|
||||||
public int FadeDuration { get; set; }
|
public int FadeDuration { get; set; }
|
||||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
new PlayerCheckbox
|
new PlayerCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Show floating comments",
|
LabelText = "Show floating comments",
|
||||||
Bindable = config.GetBindable<bool>(OsuSetting.FloatingComments)
|
Current = config.GetBindable<bool>(OsuSetting.FloatingComments)
|
||||||
},
|
},
|
||||||
new FocusedTextBox
|
new FocusedTextBox
|
||||||
{
|
{
|
||||||
|
@ -25,6 +25,6 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,9 +47,9 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
{
|
{
|
||||||
dimSliderBar.Bindable = config.GetBindable<double>(OsuSetting.DimLevel);
|
dimSliderBar.Bindable = config.GetBindable<double>(OsuSetting.DimLevel);
|
||||||
blurSliderBar.Bindable = config.GetBindable<double>(OsuSetting.BlurLevel);
|
blurSliderBar.Bindable = config.GetBindable<double>(OsuSetting.BlurLevel);
|
||||||
showStoryboardToggle.Bindable = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
|
showStoryboardToggle.Current = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
|
||||||
beatmapSkinsToggle.Bindable = config.GetBindable<bool>(OsuSetting.BeatmapSkins);
|
beatmapSkinsToggle.Current = config.GetBindable<bool>(OsuSetting.BeatmapSkins);
|
||||||
beatmapHitsoundsToggle.Bindable = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds);
|
beatmapHitsoundsToggle.Current = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user