Skip to content

Commit

Permalink
Add text logging in active state test scene
Browse files Browse the repository at this point in the history
Visual indicators do not help when the app is sent to the background.
  • Loading branch information
frenzibyte committed Dec 17, 2024
1 parent 555f00b commit 59cfeb6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion osu.Framework.Tests/Visual/Platform/TestSceneActiveState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Logging;
using osu.Framework.Platform;
using osuTK.Graphics;

Expand Down Expand Up @@ -49,7 +50,12 @@ protected override void LoadComplete()
},
};

isActive.BindValueChanged(active => isActiveBox.Colour = active.NewValue ? Color4.Green : Color4.Red, true);
isActive.BindValueChanged(active =>
{
Logger.Log($"Game activity changed from {active.OldValue} to {active.NewValue}");
isActiveBox.Colour = active.NewValue ? Color4.Green : Color4.Red;
}, true);

cursorInWindow?.BindValueChanged(active => cursorInWindowBox.Colour = active.NewValue ? Color4.Green : Color4.Red, true);
}

Expand Down

0 comments on commit 59cfeb6

Please sign in to comment.