Browse Source

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: 6bd4e9805a
master
Colin McMillen 4 years ago
parent
commit
26649ce20d
  1. 8
      Shared/Debug.cs

8
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;
}
}

Loading…
Cancel
Save