mirror of https://github.com/ppy/osu
Use IBindable<>
This commit is contained in:
parent
266873740d
commit
32b36f2883
|
@ -23,7 +23,9 @@ public class IdleTracker : Component, IKeyBindingHandler<PlatformAction>, IHandl
|
|||
/// <summary>
|
||||
/// Whether the user is currently in an idle state.
|
||||
/// </summary>
|
||||
public BindableBool IsIdle = new BindableBool();
|
||||
public IBindable<bool> IsIdle => isIdle;
|
||||
|
||||
private readonly BindableBool isIdle = new BindableBool();
|
||||
|
||||
/// <summary>
|
||||
/// Intstantiate a new <see cref="IdleTracker"/>.
|
||||
|
@ -38,7 +40,7 @@ public IdleTracker(double timeToIdle)
|
|||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
IsIdle.Value = TimeSpentIdle > timeToIdle;
|
||||
isIdle.Value = TimeSpentIdle > timeToIdle;
|
||||
}
|
||||
|
||||
public bool OnPressed(PlatformAction action) => updateLastInteractionTime();
|
||||
|
|
|
@ -28,7 +28,7 @@ public class ButtonSystem : Container, IStateful<ButtonSystemState>, IKeyBinding
|
|||
{
|
||||
public event Action<ButtonSystemState> StateChanged;
|
||||
|
||||
private readonly BindableBool isIdle = new BindableBool();
|
||||
private readonly IBindable<bool> isIdle = new BindableBool();
|
||||
|
||||
public Action OnEdit;
|
||||
public Action OnExit;
|
||||
|
|
Loading…
Reference in New Issue