From 59cfeb67c471bef0c974b99c8b0636aa505f8706 Mon Sep 17 00:00:00 2001 From: Salman Alshamrani Date: Tue, 17 Dec 2024 02:49:49 -0500 Subject: [PATCH] Add text logging in active state test scene Visual indicators do not help when the app is sent to the background. --- .../Visual/Platform/TestSceneActiveState.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/osu.Framework.Tests/Visual/Platform/TestSceneActiveState.cs b/osu.Framework.Tests/Visual/Platform/TestSceneActiveState.cs index 0a3113a5a3..8cf5e195fb 100644 --- a/osu.Framework.Tests/Visual/Platform/TestSceneActiveState.cs +++ b/osu.Framework.Tests/Visual/Platform/TestSceneActiveState.cs @@ -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; @@ -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); }