1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:17:26 +08:00

changing song select background blur setting to boolean

This commit is contained in:
Jérémiah DÉCOMBE 2023-01-24 09:19:53 +01:00
parent d783998c81
commit 7ca2a431e6
3 changed files with 8 additions and 8 deletions

View File

@ -60,7 +60,7 @@ namespace osu.Game.Configuration
SetDefault(OsuSetting.ToolbarClockDisplayMode, ToolbarClockDisplayMode.Full);
SetDefault(OsuSetting.SongSelectBackgoundBlurLevel, 1f, 0, 1f, 0.01f);
SetDefault(OsuSetting.SongSelectBackgoundBlur, true);
// Online settings
SetDefault(OsuSetting.Username, string.Empty);
@ -341,7 +341,7 @@ namespace osu.Game.Configuration
ChatDisplayHeight,
BeatmapListingCardSize,
ToolbarClockDisplayMode,
SongSelectBackgoundBlurLevel,
SongSelectBackgoundBlur,
Version,
ShowFirstRunSetup,
ShowConvertedBeatmaps,

View File

@ -43,10 +43,10 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
Current = config.GetBindable<ModSelectHotkeyStyle>(OsuSetting.ModSelectHotkeyStyle),
ClassicDefault = ModSelectHotkeyStyle.Classic
},
new SettingsSlider<float>
new SettingsCheckbox
{
LabelText = UserInterfaceStrings.SongSelectBackgroundBlurLevel,
Current = config.GetBindable<float>(OsuSetting.SongSelectBackgoundBlurLevel)
Current = config.GetBindable<bool>(OsuSetting.SongSelectBackgoundBlur)
}
};
}

View File

@ -125,12 +125,12 @@ namespace osu.Game.Screens.Select
[Resolved]
internal IOverlayManager? OverlayManager { get; private set; }
private Bindable<float> backgroundBlurLevel { get; set; } = new BindableFloat();
private Bindable<bool> backgroundBlurLevel { get; set; } = new BindableBool();
[BackgroundDependencyLoader(true)]
private void load(AudioManager audio, OsuColour colours, ManageCollectionsDialog? manageCollectionsDialog, DifficultyRecommender? recommender, OsuConfigManager config)
{
backgroundBlurLevel = config.GetBindable<float>(OsuSetting.SongSelectBackgoundBlurLevel);
backgroundBlurLevel = config.GetBindable<bool>(OsuSetting.SongSelectBackgoundBlur);
backgroundBlurLevel.BindValueChanged(e =>
{
if (this.IsCurrentScreen())
@ -138,7 +138,7 @@ namespace osu.Game.Screens.Select
ApplyToBackground(background =>
{
background.IgnoreUserSettings.Value = true;
background.BlurAmount.Value = e.NewValue * BACKGROUND_BLUR;
background.BlurAmount.Value = e.NewValue ? BACKGROUND_BLUR : 0;
});
}
}, true);
@ -758,7 +758,7 @@ namespace osu.Game.Screens.Select
ApplyToBackground(backgroundModeBeatmap =>
{
backgroundModeBeatmap.Beatmap = beatmap;
backgroundModeBeatmap.BlurAmount.Value = backgroundBlurLevel.Value * BACKGROUND_BLUR;
backgroundModeBeatmap.BlurAmount.Value = backgroundBlurLevel.Value ? BACKGROUND_BLUR : 0f;
backgroundModeBeatmap.FadeColour(Color4.White, 250);
});