mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 08:03:52 +09:00
Add snap color option for osu!mania
This commit is contained in:
@ -1,15 +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 osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Game.Rulesets.Mania.Configuration;
|
||||
using osu.Game.Rulesets.Mania.UI;
|
||||
using osu.Game.Tests.Visual;
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.Tests
|
||||
{
|
||||
public abstract class ManiaInputTestScene : OsuTestScene
|
||||
{
|
||||
[Cached]
|
||||
protected readonly Bindable<ManiaColourCode> configColourCode = new Bindable<ManiaColourCode>();
|
||||
private readonly Container<Drawable> content;
|
||||
protected override Container<Drawable> Content => content ?? base.Content;
|
||||
|
||||
@ -18,6 +24,13 @@ namespace osu.Game.Rulesets.Mania.Tests
|
||||
base.Content.Add(content = new LocalInputManager(keys));
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(RulesetConfigCache configCache)
|
||||
{
|
||||
var config = (ManiaRulesetConfigManager)configCache.GetConfigFor(Ruleset.Value.CreateInstance());
|
||||
config.BindWith(ManiaRulesetSetting.ColourCode, configColourCode);
|
||||
}
|
||||
|
||||
private class LocalInputManager : ManiaInputManager
|
||||
{
|
||||
public LocalInputManager(int variant)
|
||||
|
Reference in New Issue
Block a user