Remove unwanted class and move the bind logic outside the RulesetSelector

This commit is contained in:
Andrei Zavatski
2019-06-24 23:13:28 +03:00
parent 9dedd62d9a
commit 4a05c560cf
3 changed files with 8 additions and 26 deletions

View File

@ -10,14 +10,13 @@ using osuTK.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Game.Rulesets;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Bindables;
using osu.Framework.Input.Events;
using osuTK.Input;
using System.Linq;
namespace osu.Game.Overlays.Toolbar
{
public class ToolbarRulesetSelector : BindableRulesetSelector
public class ToolbarRulesetSelector : RulesetSelector
{
private const float padding = 10;
private readonly Drawable modeButtonLine;
@ -63,6 +62,7 @@ namespace osu.Game.Overlays.Toolbar
});
Current.DisabledChanged += disabledChanged;
Current.ValueChanged += (value) => activeMode.Invalidate();
}
protected override TabFillFlowContainer CreateTabFlow() => new TabFillFlowContainer
@ -92,8 +92,6 @@ namespace osu.Game.Overlays.Toolbar
private readonly Cached activeMode = new Cached();
protected override void OnRulesetChanged(ValueChangedEvent<RulesetInfo> e) => activeMode.Invalidate();
protected override void UpdateAfterChildren()
{
base.UpdateAfterChildren();