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:
parent
d783998c81
commit
7ca2a431e6
@ -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,
|
||||
|
@ -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)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -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);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user