mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 09:02:58 +08:00
Use IBindable<>
This commit is contained in:
parent
266873740d
commit
32b36f2883
@ -23,7 +23,9 @@ namespace osu.Game.Input
|
||||
/// <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 @@ namespace osu.Game.Input
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
IsIdle.Value = TimeSpentIdle > timeToIdle;
|
||||
isIdle.Value = TimeSpentIdle > timeToIdle;
|
||||
}
|
||||
|
||||
public bool OnPressed(PlatformAction action) => updateLastInteractionTime();
|
||||
|
@ -28,7 +28,7 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
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
Block a user