1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:33:20 +08:00

Remove unnecessary bindable

This commit is contained in:
Dean Herbert 2024-01-29 02:13:39 +09:00
parent f4dd84fa77
commit 462dab3c90
No known key found for this signature in database
2 changed files with 8 additions and 12 deletions

View File

@ -86,11 +86,14 @@ namespace osu.Game.Screens.Play.HUD
};
}
protected override void LoadComplete()
public override bool Interactive
{
base.LoadComplete();
InteractiveBindable.BindValueChanged(i => handleBase.FadeTo(i.NewValue ? 1 : 0, 200), true);
get => base.Interactive;
set
{
base.Interactive = value;
handleBase.FadeTo(value ? 1 : 0, 200);
}
}
protected override void Update()

View File

@ -3,7 +3,6 @@
using System;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;
using osu.Framework.Threading;
@ -35,13 +34,7 @@ namespace osu.Game.Screens.Play.HUD
/// <summary>
/// Whether the progress bar should allow interaction, ie. to perform seek operations.
/// </summary>
public bool Interactive
{
get => InteractiveBindable.Value;
set => InteractiveBindable.Value = value;
}
protected readonly BindableBool InteractiveBindable = new BindableBool();
public virtual bool Interactive { get; set; }
public double StartTime { get; set; }