Move OsuUserInputManager out from nested class

This commit is contained in:
Dean Herbert
2021-05-28 02:45:04 +09:00
parent b4c13d837d
commit fe6b1936cb
2 changed files with 38 additions and 32 deletions

View File

@ -407,37 +407,5 @@ namespace osu.Game
contextFactory.FlushConnections();
}
private class OsuUserInputManager : UserInputManager
{
protected override MouseButtonEventManager CreateButtonEventManagerFor(MouseButton button)
{
switch (button)
{
case MouseButton.Right:
return new RightMouseManager(button);
}
return base.CreateButtonEventManagerFor(button);
}
private class RightMouseManager : MouseButtonEventManager
{
public RightMouseManager(MouseButton button)
: base(button)
{
}
public override bool EnableDrag => true; // allow right-mouse dragging for absolute scroll in scroll containers.
public override bool EnableClick => false;
public override bool ChangeFocusOnClick => false;
}
}
public void Migrate(string path)
{
contextFactory.FlushConnections();
(Storage as OsuStorage)?.Migrate(Host.GetStorage(path));
}
}
}