mirror of
https://github.com/ppy/osu
synced 2025-01-05 05:39:49 +00:00
change background dim from integer to double
This commit is contained in:
parent
db72bfe03b
commit
1d2f19b5a2
@ -24,7 +24,7 @@ namespace osu.Game.Configuration
|
||||
|
||||
Set(OsuConfig.MenuCursorSize, 1.0, 0.5f, 2);
|
||||
Set(OsuConfig.GameplayCursorSize, 1.0, 0.5f, 2);
|
||||
Set(OsuConfig.DimLevel, 30, 0, 100);
|
||||
Set(OsuConfig.DimLevel, 0.3, 0, 1);
|
||||
|
||||
Set(OsuConfig.MouseDisableButtons, false);
|
||||
Set(OsuConfig.MouseDisableWheel, false);
|
||||
|
@ -18,10 +18,10 @@ namespace osu.Game.Overlays.Options.Sections.Gameplay
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new OptionSlider<int>
|
||||
new OptionSlider<double>
|
||||
{
|
||||
LabelText = "Background dim",
|
||||
Bindable = (BindableInt)config.GetBindable<int>(OsuConfig.DimLevel)
|
||||
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.DimLevel)
|
||||
},
|
||||
new OptionEnumDropdown<ProgressBarType>
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
#region User Settings
|
||||
|
||||
private Bindable<int> dimLevel;
|
||||
private Bindable<double> dimLevel;
|
||||
private Bindable<bool> mouseWheelDisabled;
|
||||
private Bindable<double> userAudioOffset;
|
||||
|
||||
@ -77,7 +77,7 @@ namespace osu.Game.Screens.Play
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuConfigManager config, OsuGame osu)
|
||||
{
|
||||
dimLevel = config.GetBindable<int>(OsuConfig.DimLevel);
|
||||
dimLevel = config.GetBindable<double>(OsuConfig.DimLevel);
|
||||
mouseWheelDisabled = config.GetBindable<bool>(OsuConfig.MouseDisableWheel);
|
||||
|
||||
Ruleset rulesetInstance;
|
||||
@ -316,11 +316,11 @@ namespace osu.Game.Screens.Play
|
||||
base.OnEntering(last);
|
||||
|
||||
(Background as BackgroundScreenBeatmap)?.BlurTo(Vector2.Zero, 1500, EasingTypes.OutQuint);
|
||||
Background?.FadeTo((100f - dimLevel) / 100, 1500, EasingTypes.OutQuint);
|
||||
Background?.FadeTo(1 - (float)dimLevel, 1500, EasingTypes.OutQuint);
|
||||
|
||||
Content.Alpha = 0;
|
||||
|
||||
dimLevel.ValueChanged += newDim => Background?.FadeTo((100f - newDim) / 100, 800);
|
||||
dimLevel.ValueChanged += newDim => Background?.FadeTo(1 - (float)newDim, 800);
|
||||
|
||||
Content.ScaleTo(0.7f);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user