From 26649ce20dc3af123e0d04bcd4bd33bae6d5abcb Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Fri, 21 Feb 2020 10:02:09 -0500 Subject: [PATCH] Draw debug output within the TV-safe area. Details here: https://docs.microsoft.com/en-us/windows/uwp/design/devices/designing-for-tv#tv-safe-area GitOrigin-RevId: 6bd4e9805a078f6b21cc40fc633c36cde371b6e6 --- Shared/Debug.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Shared/Debug.cs b/Shared/Debug.cs index 963f7f4..0bab3ed 100644 --- a/Shared/Debug.cs +++ b/Shared/Debug.cs @@ -100,9 +100,13 @@ namespace SemiColinGames { if (!Enabled) { return; } - int y = 10; + // UI should start at least 48px from the left edge of the screen, and 27 from the top, as per: + // https://docs.microsoft.com/en-us/windows/uwp/design/devices/designing-for-tv#tv-safe-area + // Can test this on actual Xbox via: + // Settings > Launch Settings > Display & Sound > Resolution > 720p. + int y = 27; foreach (var toast in toasts) { - spriteBatch.DrawString(Textures.DebugFont, toast, new Vector2(10, y), Color.Teal); + spriteBatch.DrawString(Textures.DebugFont, toast, new Vector2(48, y), Color.Teal); y += 30; } }