Refactor ReplayInputHandler creation for more flexibility.

This commit is contained in:
Dean Herbert
2017-03-31 15:59:53 +09:00
parent 0f4b98ce73
commit fa7c72a099
13 changed files with 84 additions and 119 deletions

View File

@ -14,6 +14,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using osu.Game.Modes.Replays;
using osu.Game.Modes.Scoring;
namespace osu.Game.Modes.UI
@ -68,6 +69,10 @@ namespace osu.Game.Modes.UI
/// </summary>
/// <returns>The input manager.</returns>
protected virtual KeyConversionInputManager CreateKeyConversionInputManager() => new KeyConversionInputManager();
protected virtual FramedReplayInputHandler CreateReplayInputHandler(Replay replay) => new FramedReplayInputHandler(replay);
public void SetReplay(Replay replay) => InputManager.ReplayInputHandler = CreateReplayInputHandler(replay);
}
/// <summary>