mirror of
https://github.com/ppy/osu.git
synced 2026-05-13 21:13:39 +08:00
Add flag to allow backwards seeks in tests
This commit is contained in:
@@ -81,6 +81,19 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
public override IFrameStableClock FrameStableClock => frameStabilityContainer;
|
||||
|
||||
private bool allowBackwardsSeeks;
|
||||
|
||||
public override bool AllowBackwardsSeeks
|
||||
{
|
||||
get => allowBackwardsSeeks;
|
||||
set
|
||||
{
|
||||
allowBackwardsSeeks = value;
|
||||
if (frameStabilityContainer != null)
|
||||
frameStabilityContainer.AllowBackwardsSeeks = value;
|
||||
}
|
||||
}
|
||||
|
||||
private bool frameStablePlayback = true;
|
||||
|
||||
internal override bool FrameStablePlayback
|
||||
@@ -178,6 +191,7 @@ namespace osu.Game.Rulesets.UI
|
||||
InternalChild = frameStabilityContainer = new FrameStabilityContainer(GameplayStartTime)
|
||||
{
|
||||
FrameStablePlayback = FrameStablePlayback,
|
||||
AllowBackwardsSeeks = AllowBackwardsSeeks,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
FrameStableComponents,
|
||||
@@ -463,6 +477,12 @@ namespace osu.Game.Rulesets.UI
|
||||
/// </summary>
|
||||
internal abstract bool FrameStablePlayback { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a replay is not attached, we usually block any backwards seeks.
|
||||
/// This will bypass the check. Should only be used for tests.
|
||||
/// </summary>
|
||||
public abstract bool AllowBackwardsSeeks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The mods which are to be applied.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user