mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Use IBindable<>
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user