1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-29 02:52:54 +08:00
osu-lazer/osu.Game/Rulesets/BindableRulesetSelector.cs

27 lines
737 B
C#
Raw Normal View History

2019-06-18 05:23:00 +08:00
// 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)
{
2019-06-18 06:11:05 +08:00
Current.BindTo(parentRuleset);
Current.BindValueChanged(OnRulesetChanged);
2019-06-18 05:23:00 +08:00
}
2019-06-18 06:11:05 +08:00
protected virtual void OnRulesetChanged(ValueChangedEvent<RulesetInfo> e)
2019-06-18 05:23:00 +08:00
{
2019-06-18 06:11:05 +08:00
if (Current.Disabled)
2019-06-18 05:23:00 +08:00
{
2019-06-18 06:11:05 +08:00
return;
2019-06-18 05:23:00 +08:00
}
}
}
}