add setting to toggle the gameplay cursor trail

This commit is contained in:
Unknown 2019-01-23 14:27:34 +01:00
parent 4d310c3226
commit 481f33d17b
4 changed files with 19 additions and 7 deletions

View File

@ -19,12 +19,14 @@ namespace osu.Game.Rulesets.Osu.Configuration
Set(OsuSetting.SnakingInSliders, true);
Set(OsuSetting.SnakingOutSliders, true);
Set(OsuSetting.ShowCursorTrail, true);
}
}
public enum OsuSetting
{
SnakingInSliders,
SnakingOutSliders
SnakingOutSliders,
ShowCursorTrail
}
}

View File

@ -11,6 +11,7 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Bindings;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Rulesets.Osu.Configuration;
using osu.Game.Skinning;
using osuTK;
using osuTK.Graphics;
@ -23,6 +24,8 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
protected override Container<Drawable> Content => fadeContainer;
private Bindable<bool> showTrail;
private readonly CursorTrail cursorTrail;
private readonly Container<Drawable> fadeContainer;
public GameplayCursor()
@ -32,11 +35,18 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
new CursorTrail { Depth = 1 }
cursorTrail = new CursorTrail { Depth = 1 }
}
};
}
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
showTrail = config.GetBindable<bool>(OsuSetting.ShowCursorTrail);
showTrail.ValueChanged += v => cursorTrail.Alpha = v ? 1 : 0;
}
private int downCount;
private void updateExpandedState()

View File

@ -34,6 +34,11 @@ namespace osu.Game.Rulesets.Osu.UI
LabelText = "Snaking out sliders",
Bindable = config.GetBindable<bool>(OsuSetting.SnakingOutSliders)
},
new SettingsCheckbox
{
LabelText = "Show cursor trail",
Bindable = config.GetBindable<bool>(OsuSetting.ShowCursorTrail)
},
};
}
}

View File

@ -72,9 +72,6 @@ namespace osu.Game.Configuration
Set(GameSetting.MenuParallax, true);
Set(GameSetting.SnakingInSliders, true);
Set(GameSetting.SnakingOutSliders, true);
// Gameplay
Set(GameSetting.DimLevel, 0.3, 0, 1, 0.01);
Set(GameSetting.BlurLevel, 0, 0, 1, 0.01);
@ -150,8 +147,6 @@ namespace osu.Game.Configuration
DisplayStarsMinimum,
DisplayStarsMaximum,
RandomSelectAlgorithm,
SnakingInSliders,
SnakingOutSliders,
ShowFpsDisplay,
ChatDisplayHeight,
Version,