mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:57:52 +08:00
Remove no longer necessary interface type
This commit is contained in:
parent
f9dd3f6def
commit
e8770b84cd
@ -213,7 +213,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
|
||||
AddStep("attempt seek", () =>
|
||||
{
|
||||
InputManager.MoveMouseTo(getSongProgress() as Drawable);
|
||||
InputManager.MoveMouseTo(getSongProgress());
|
||||
InputManager.Click(MouseButton.Left);
|
||||
});
|
||||
|
||||
|
@ -121,7 +121,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
AddUntilStep("all interactive elements removed", () => this.ChildrenOfType<Player>().All(p =>
|
||||
!p.ChildrenOfType<PlayerSettingsOverlay>().Any() &&
|
||||
!p.ChildrenOfType<HoldForMenuButton>().Any() &&
|
||||
p.ChildrenOfType<ISongProgressBar>().SingleOrDefault()?.Interactive == false));
|
||||
p.ChildrenOfType<ArgonSongProgressBar>().SingleOrDefault()?.Interactive == false));
|
||||
|
||||
AddStep("restore config hud visibility", () => config.SetValue(OsuSetting.HUDVisibilityMode, originalConfigValue));
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD
|
||||
{
|
||||
public partial class ArgonSongProgressBar : SliderBar<double>, ISongProgressBar
|
||||
public partial class ArgonSongProgressBar : SliderBar<double>
|
||||
{
|
||||
private readonly float baseHeight;
|
||||
private readonly float catchupBaseDepth;
|
||||
|
@ -1,20 +0,0 @@
|
||||
// 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 System;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD
|
||||
{
|
||||
public interface ISongProgressBar
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether the progress bar should allow interaction, ie. to perform seek operations.
|
||||
/// </summary>
|
||||
public bool Interactive { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Action which is invoked when a seek is requested, with the proposed millisecond value for the seek operation.
|
||||
/// </summary>
|
||||
public Action<double>? OnSeek { get; set; }
|
||||
}
|
||||
}
|
@ -13,16 +13,16 @@ using osu.Framework.Threading;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD
|
||||
{
|
||||
public partial class SongProgressBar : SliderBar<double>, ISongProgressBar
|
||||
public partial class SongProgressBar : SliderBar<double>
|
||||
{
|
||||
/// <summary>
|
||||
/// Action which is invoked when a seek is requested, with the proposed millisecond value for the seek operation.
|
||||
/// </summary>
|
||||
public Action<double>? OnSeek { get; set; }
|
||||
|
||||
private readonly Box fill;
|
||||
private readonly Container handleBase;
|
||||
private readonly Container handleContainer;
|
||||
|
||||
private bool showHandle;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the progress bar should allow interaction, ie. to perform seek operations.
|
||||
/// </summary>
|
||||
public bool Interactive
|
||||
{
|
||||
get => showHandle;
|
||||
@ -57,6 +57,12 @@ namespace osu.Game.Screens.Play.HUD
|
||||
set => CurrentNumber.Value = value;
|
||||
}
|
||||
|
||||
private readonly Box fill;
|
||||
private readonly Container handleBase;
|
||||
private readonly Container handleContainer;
|
||||
|
||||
private bool showHandle;
|
||||
|
||||
public SongProgressBar(float barHeight, float handleBarHeight, Vector2 handleSize)
|
||||
{
|
||||
CurrentNumber.MinValue = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user