From 16f489ac5b4a1b336d3de8fbc508f6cdf66711e6 Mon Sep 17 00:00:00 2001 From: Drew C <31282527+drewc5131@users.noreply.github.com> Date: Tue, 1 Sep 2020 11:17:01 +0200 Subject: [PATCH] showbase: Parent the OSD to a2dTopLeft The Y position is set to -0.1 as the original value was 0.9, so it was intended to be about 1 unit down from the top. Closes #977 --- direct/src/showbase/OnScreenDebug.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/direct/src/showbase/OnScreenDebug.py b/direct/src/showbase/OnScreenDebug.py index 1a5756c078..da38db5301 100755 --- a/direct/src/showbase/OnScreenDebug.py +++ b/direct/src/showbase/OnScreenDebug.py @@ -38,9 +38,9 @@ class OnScreenDebug: print("failed to load OnScreenDebug font %s" % fontPath) font = TextNode.getDefaultFont() self.onScreenText = OnscreenText.OnscreenText( - pos = (-1.0, 0.9), fg=fgColor, bg=bgColor, - scale = (fontScale, fontScale, 0.0), align = TextNode.ALeft, - mayChange = 1, font = font) + parent = base.a2dTopLeft, pos = (0.0, -0.1), + fg=fgColor, bg=bgColor, scale = (fontScale, fontScale, 0.0), + align = TextNode.ALeft, mayChange = 1, font = font) # Make sure readout is never lit or drawn in wireframe DirectUtil.useDirectRenderStyle(self.onScreenText)