mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 15:57:24 +08:00
Split out interfaces from RulesetInputManager
and improve xmldoc
This commit is contained in:
parent
c8e081c2b6
commit
084354a8dc
21
osu.Game/Rulesets/UI/ICanAttachHUDPieces.cs
Normal file
21
osu.Game/Rulesets/UI/ICanAttachHUDPieces.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// 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.Game.Screens.Play.HUD;
|
||||||
|
using osu.Game.Screens.Play.HUD.ClicksPerSecond;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.UI
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A target (generally always <see cref="DrawableRuleset"/>) which can attach various skinnable components.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Attach methods will give the target permission to prepare the component into a usable state, usually via
|
||||||
|
/// calling methods on the component (attaching various gameplay devices).
|
||||||
|
/// </remarks>
|
||||||
|
public interface ICanAttachHUDPieces
|
||||||
|
{
|
||||||
|
void Attach(KeyCounterController keyCounter);
|
||||||
|
void Attach(ClicksPerSecondCalculator calculator);
|
||||||
|
}
|
||||||
|
}
|
15
osu.Game/Rulesets/UI/IHasRecordingHandler.cs
Normal file
15
osu.Game/Rulesets/UI/IHasRecordingHandler.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
// 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.Input;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.UI
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Expose the <see cref="ReplayRecorder"/> in a capable <see cref="InputManager"/>.
|
||||||
|
/// </summary>
|
||||||
|
public interface IHasRecordingHandler
|
||||||
|
{
|
||||||
|
public ReplayRecorder Recorder { set; }
|
||||||
|
}
|
||||||
|
}
|
16
osu.Game/Rulesets/UI/IHasReplayHandler.cs
Normal file
16
osu.Game/Rulesets/UI/IHasReplayHandler.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// 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.Input;
|
||||||
|
using osu.Game.Input.Handlers;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.UI
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Expose the <see cref="ReplayInputHandler"/> in a capable <see cref="InputManager"/>.
|
||||||
|
/// </summary>
|
||||||
|
public interface IHasReplayHandler
|
||||||
|
{
|
||||||
|
ReplayInputHandler? ReplayInputHandler { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -225,29 +225,6 @@ namespace osu.Game.Rulesets.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Expose the <see cref="ReplayInputHandler"/> in a capable <see cref="InputManager"/>.
|
|
||||||
/// </summary>
|
|
||||||
public interface IHasReplayHandler
|
|
||||||
{
|
|
||||||
ReplayInputHandler ReplayInputHandler { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IHasRecordingHandler
|
|
||||||
{
|
|
||||||
public ReplayRecorder Recorder { set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Supports attaching various HUD pieces.
|
|
||||||
/// Keys will be populated automatically and a receptor will be injected inside.
|
|
||||||
/// </summary>
|
|
||||||
public interface ICanAttachHUDPieces
|
|
||||||
{
|
|
||||||
void Attach(KeyCounterController keyCounter);
|
|
||||||
void Attach(ClicksPerSecondCalculator calculator);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class RulesetInputManagerInputState<T> : InputState
|
public class RulesetInputManagerInputState<T> : InputState
|
||||||
where T : struct
|
where T : struct
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user