1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-16 05:37:19 +08:00

Setup configuration item for editor hit animations

This commit is contained in:
Dean Herbert 2021-04-21 18:05:40 +09:00
parent c6c91cd9a5
commit 9d8f0c854d
3 changed files with 25 additions and 1 deletions

View File

@ -143,6 +143,7 @@ namespace osu.Game.Configuration
SetDefault(OsuSetting.DiscordRichPresence, DiscordRichPresenceMode.Full);
SetDefault(OsuSetting.EditorWaveformOpacity, 0.25f);
SetDefault(OsuSetting.EditorHitAnimations, false);
}
public OsuConfigManager(Storage storage)
@ -266,6 +267,7 @@ namespace osu.Game.Configuration
GameplayDisableWinKey,
SeasonalBackgroundMode,
EditorWaveformOpacity,
EditorHitAnimations,
DiscordRichPresence,
AutomaticallyDownloadWhenSpectating,
ShowOnlineExplicitContent,

View File

@ -224,9 +224,10 @@ namespace osu.Game.Screens.Edit
},
new MenuItem("View")
{
Items = new[]
Items = new MenuItem[]
{
new WaveformOpacityMenuItem(config.GetBindable<float>(OsuSetting.EditorWaveformOpacity)),
new HitAnimationsMenuItem(config.GetBindable<bool>(OsuSetting.EditorHitAnimations))
}
}
}

View File

@ -0,0 +1,21 @@
// 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 JetBrains.Annotations;
using osu.Framework.Bindables;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Screens.Edit
{
internal class HitAnimationsMenuItem : ToggleMenuItem
{
[UsedImplicitly]
private readonly Bindable<bool> hitAnimations;
public HitAnimationsMenuItem(Bindable<bool> hitAnimations)
: base("Hit animations")
{
State.BindTo(this.hitAnimations = hitAnimations);
}
}
}