Skip to content

Commit a9ab00e

Browse files
committed
Only show second debug window when running a debug build, and clearly label it
1 parent 8ff21ab commit a9ab00e

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

Intersect.Client.Core/Interface/MutableInterface.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
using Intersect.Client.Framework.Gwen;
12
using Intersect.Client.Framework.Gwen.Control;
23
using Intersect.Client.Interface.Debugging;
4+
using Intersect.Client.Localization;
35
using Intersect.Reflection;
46

57
namespace Intersect.Client.Interface;
@@ -46,8 +48,18 @@ private static DebugWindow EnsureDebugWindowInitialized(Base parent)
4648
_debugWindow ??= new DebugWindow(parent);
4749
_debugWindow.Parent = parent;
4850

49-
_debugWindow2 ??= new DebugWindow(parent);
51+
#if DEBUG
52+
if (_debugWindow2 is null)
53+
{
54+
_debugWindow2 = new DebugWindow(parent)
55+
{
56+
Alignment = [Alignments.Top, Alignments.Right],
57+
Title = Strings.Debug.TitleX.ToString(2),
58+
};
59+
_debugWindow2.PostLayout.Enqueue(window => window.Alignment = [], _debugWindow2);
60+
}
5061
_debugWindow2.Parent = parent;
62+
#endif
5163

5264
return _debugWindow;
5365
}

Intersect.Client.Core/Localization/Strings.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,9 @@ public partial struct Debug
10451045
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
10461046
public static LocalizedString Title = @"Debug";
10471047

1048+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
1049+
public static LocalizedString TitleX = @"Debug #{0}";
1050+
10481051
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
10491052
public static LocalizedString TabLabelGPU = @"GPU";
10501053

0 commit comments

Comments
 (0)