mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 13:23:22 +08:00
Add setting to enable/disable hit error visibility
This commit is contained in:
parent
ee5568e596
commit
a59a14c9e6
@ -79,6 +79,7 @@ namespace osu.Game.Configuration
|
||||
Set(OsuSetting.ShowInterface, true);
|
||||
Set(OsuSetting.ShowHealthDisplayWhenCantFail, true);
|
||||
Set(OsuSetting.KeyOverlay, false);
|
||||
Set(OsuSetting.ScoreMeter, ScoreMeterType.HitError);
|
||||
|
||||
Set(OsuSetting.FloatingComments, false);
|
||||
|
||||
@ -132,6 +133,7 @@ namespace osu.Game.Configuration
|
||||
BlurLevel,
|
||||
ShowStoryboard,
|
||||
KeyOverlay,
|
||||
ScoreMeter,
|
||||
FloatingComments,
|
||||
ShowInterface,
|
||||
ShowHealthDisplayWhenCantFail,
|
||||
|
@ -1,12 +1,16 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace osu.Game.Configuration
|
||||
{
|
||||
public enum ScoreMeterType
|
||||
{
|
||||
[Description("None")]
|
||||
None,
|
||||
Colour,
|
||||
Error
|
||||
|
||||
[Description("Hit Error")]
|
||||
HitError
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,11 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
LabelText = "Always show key overlay",
|
||||
Bindable = config.GetBindable<bool>(OsuSetting.KeyOverlay)
|
||||
},
|
||||
new SettingsEnumDropdown<ScoreMeterType>
|
||||
{
|
||||
LabelText = "Score meter type",
|
||||
Bindable = config.GetBindable<ScoreMeterType>(OsuSetting.ScoreMeter)
|
||||
},
|
||||
new SettingsEnumDropdown<ScoringMode>
|
||||
{
|
||||
LabelText = "Score display mode",
|
||||
|
@ -17,6 +17,7 @@ using osu.Framework.Graphics.Colour;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using System.Linq;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD
|
||||
{
|
||||
@ -40,6 +41,8 @@ namespace osu.Game.Screens.Play.HUD
|
||||
private readonly FillFlowContainer bar;
|
||||
private readonly Queue<double> judgementOffsets = new Queue<double>();
|
||||
|
||||
private readonly Bindable<ScoreMeterType> type = new Bindable<ScoreMeterType>();
|
||||
|
||||
public HitErrorDisplay(bool mirrored = false)
|
||||
{
|
||||
this.mirrored = mirrored;
|
||||
@ -65,6 +68,12 @@ namespace osu.Game.Screens.Play.HUD
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
config.BindWith(OsuSetting.ScoreMeter, type);
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
@ -103,6 +112,21 @@ namespace osu.Game.Screens.Play.HUD
|
||||
Height = (float)((HitWindows.Meh - HitWindows.Good) / (HitWindows.Meh * 2))
|
||||
}
|
||||
});
|
||||
|
||||
type.BindValueChanged(onTypeChanged, true);
|
||||
}
|
||||
|
||||
private void onTypeChanged(ValueChangedEvent<ScoreMeterType> type)
|
||||
{
|
||||
switch (type.NewValue)
|
||||
{
|
||||
case ScoreMeterType.None:
|
||||
this.FadeOut(200, Easing.OutQuint);
|
||||
break;
|
||||
case ScoreMeterType.HitError:
|
||||
this.FadeIn(200, Easing.OutQuint);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnNewJudgement(JudgementResult newJudgement)
|
||||
|
Loading…
Reference in New Issue
Block a user