mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Add replay statistics frames to FramedReplayInputHandler
This commit is contained in:
@ -9,6 +9,7 @@ using osu.Framework.Input.StateChanges;
|
||||
using osu.Framework.Input.StateChanges.Events;
|
||||
using osu.Framework.Input.States;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Game.Rulesets.Replays;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osuTK;
|
||||
|
||||
@ -79,5 +80,38 @@ namespace osu.Game.Input.Handlers
|
||||
PressedActions = pressedActions;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An <see cref="IInput"/> that is triggered when a frame containing replay statistics arrives.
|
||||
/// </summary>
|
||||
public class ReplayStatisticsFrameInput : IInput
|
||||
{
|
||||
/// <summary>
|
||||
/// The frame containing the statistics.
|
||||
/// </summary>
|
||||
public ReplayFrame Frame;
|
||||
|
||||
public void Apply(InputState state, IInputStateChangeHandler handler)
|
||||
{
|
||||
handler.HandleInputStateChange(new ReplayStatisticsFrameEvent(state, this, Frame));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An <see cref="InputStateChangeEvent"/> that is triggered when a frame containing replay statistics arrives.
|
||||
/// </summary>
|
||||
public class ReplayStatisticsFrameEvent : InputStateChangeEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// The frame containing the statistics.
|
||||
/// </summary>
|
||||
public readonly ReplayFrame Frame;
|
||||
|
||||
public ReplayStatisticsFrameEvent(InputState state, IInput input, ReplayFrame frame)
|
||||
: base(state, input)
|
||||
{
|
||||
Frame = frame;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user