Apply peppy's suggestions

This commit is contained in:
jvyden
2021-04-16 05:53:27 -04:00
parent d760e81a91
commit ec0211809f
4 changed files with 21 additions and 18 deletions

View File

@ -22,7 +22,7 @@ namespace osu.Game.Tests.Visual.Components
private IdleTrackingBox[] boxes;
public SessionStatics sessionStatics;
private SessionStatics sessionStatics;
[SetUp]
public void SetUp() => Schedule(() =>
@ -175,6 +175,7 @@ namespace osu.Game.Tests.Visual.Components
public IdleTrackingBox(int timeToIdle, SessionStatics statics)
{
Box box;
Alpha = 0.6f;
@ -182,7 +183,7 @@ namespace osu.Game.Tests.Visual.Components
InternalChildren = new Drawable[]
{
idleTracker = new GameIdleTracker(timeToIdle, statics),
idleTracker = new GameIdleTracker(timeToIdle),
box = new Box
{
Colour = Color4.White,
@ -190,7 +191,11 @@ namespace osu.Game.Tests.Visual.Components
},
};
idleTracker.IsIdle.BindValueChanged(idle => box.Colour = idle.NewValue ? Color4.White : Color4.Black, true);
idleTracker.IsIdle.BindValueChanged(idle =>
{
box.Colour = idle.NewValue ? Color4.White : Color4.Black;
if (idle.NewValue) statics.ResetValues();
}, true);
}
}
}