1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 20:22:55 +08:00
osu-lazer/osu.Game/Rulesets/BindableRulesetSelector.cs
2019-06-18 01:11:05 +03:00

27 lines
737 B
C#

// 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;
namespace osu.Game.Rulesets
{
public abstract class BindableRulesetSelector : RulesetSelector
{
[BackgroundDependencyLoader]
private void load(Bindable<RulesetInfo> parentRuleset)
{
Current.BindTo(parentRuleset);
Current.BindValueChanged(OnRulesetChanged);
}
protected virtual void OnRulesetChanged(ValueChangedEvent<RulesetInfo> e)
{
if (Current.Disabled)
{
return;
}
}
}
}