From 7346c65f35b49ad7c30864896e13ee9ca111c0b5 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 13 Mar 2002 21:52:25 +0000 Subject: [PATCH] TMALIGN -> TextNode.A* --- direct/src/directtools/DirectSession.py | 6 +++--- direct/src/gui/DirectDialog.py | 2 +- direct/src/gui/DirectEntry.py | 2 +- direct/src/gui/OnscreenText.py | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/direct/src/directtools/DirectSession.py b/direct/src/directtools/DirectSession.py index 6f36eedeb2..08c7680a71 100644 --- a/direct/src/directtools/DirectSession.py +++ b/direct/src/directtools/DirectSession.py @@ -65,7 +65,7 @@ class DirectSession(PandaObject): self.selectedNPReadout = OnscreenText.OnscreenText( pos = (-1.0, -0.9), bg=Vec4(1,1,1,1), - scale = 0.05, align = TMALIGNLEFT, + scale = 0.05, align = TextNode.ALeft, mayChange = 1, font = self.font) # Make sure readout is never lit or drawn in wireframe useDirectRenderStyle(self.selectedNPReadout) @@ -73,7 +73,7 @@ class DirectSession(PandaObject): self.activeParentReadout = OnscreenText.OnscreenText( pos = (-1.0, -0.975), bg=Vec4(1,1,1,1), - scale = 0.05, align = TMALIGNLEFT, + scale = 0.05, align = TextNode.ALeft, mayChange = 1, font = self.font) # Make sure readout is never lit or drawn in wireframe useDirectRenderStyle(self.activeParentReadout) @@ -81,7 +81,7 @@ class DirectSession(PandaObject): self.directMessageReadout = OnscreenText.OnscreenText( pos = (-1.0, 0.9), bg=Vec4(1,1,1,1), - scale = 0.05, align = TMALIGNLEFT, + scale = 0.05, align = TextNode.ALeft, mayChange = 1, font = self.font) # Make sure readout is never lit or drawn in wireframe useDirectRenderStyle(self.directMessageReadout) diff --git a/direct/src/gui/DirectDialog.py b/direct/src/gui/DirectDialog.py index d1603075b2..9d54b7f078 100644 --- a/direct/src/gui/DirectDialog.py +++ b/direct/src/gui/DirectDialog.py @@ -86,7 +86,7 @@ class DirectDialog(DirectFrame): ('pos', (0, 0.1, 0), None), ('pad', (0.1, 0.1), None), ('text', '', None), - ('text_align', TMALIGNLEFT, None), + ('text_align', TextNode.ALeft, None), ('text_scale', 0.06, None), ('image', getDefaultDialogGeom(), None), ('relief', None, None), diff --git a/direct/src/gui/DirectEntry.py b/direct/src/gui/DirectEntry.py index 8da6438147..0988cebf2d 100644 --- a/direct/src/gui/DirectEntry.py +++ b/direct/src/gui/DirectEntry.py @@ -63,7 +63,7 @@ class DirectEntry(DirectFrame): # The PGEntry which will use the TextNode to generate geometry text = '', # PGEntry assumes left alignment - align = TMALIGNLEFT, + align = TextNode.ALeft, font = font, scale = 1, # Don't get rid of the text node diff --git a/direct/src/gui/OnscreenText.py b/direct/src/gui/OnscreenText.py index 487192c764..ccea27f3ec 100644 --- a/direct/src/gui/OnscreenText.py +++ b/direct/src/gui/OnscreenText.py @@ -70,7 +70,7 @@ class OnscreenText(PandaObject, NodePath): text. If the fourth value, a, is nonzero, a frame is created around the text. - align: one of TMALIGNLEFT, TMALIGNRIGHT, or TMALIGNCENTER. + align: one of TextNode.ALeft, TextNode.ARight, or TextNode.ACenter. wordwrap: either the width to wordwrap the text at, or None to specify no automatic word wrapping. @@ -105,7 +105,7 @@ class OnscreenText(PandaObject, NodePath): bg = bg or (0, 0, 0, 0) shadow = shadow or (0, 0, 0, 0) frame = frame or (0, 0, 0, 0) - align = align or TMALIGNCENTER + align = align or TextNode.ACenter elif style == ScreenTitle: scale = scale or 0.15 @@ -113,7 +113,7 @@ class OnscreenText(PandaObject, NodePath): bg = bg or (0, 0, 0, 0) shadow = shadow or (0, 0, 0, 1) frame = frame or (0, 0, 0, 0) - align = align or TMALIGNCENTER + align = align or TextNode.ACenter elif style == ScreenPrompt: scale = scale or 0.1 @@ -121,7 +121,7 @@ class OnscreenText(PandaObject, NodePath): bg = bg or (0, 0, 0, 0) shadow = shadow or (0, 0, 0, 1) frame = frame or (0, 0, 0, 0) - align = align or TMALIGNCENTER + align = align or TextNode.ACenter elif style == NameConfirm: scale = scale or 0.1 @@ -129,7 +129,7 @@ class OnscreenText(PandaObject, NodePath): bg = bg or (0, 0, 0, 0) shadow = shadow or (0, 0, 0, 0) frame = frame or (0, 0, 0, 0) - align = align or TMALIGNCENTER + align = align or TextNode.ACenter elif style == BlackOnWhite: scale = scale or 0.1 @@ -137,7 +137,7 @@ class OnscreenText(PandaObject, NodePath): bg = bg or (1, 1, 1, 1) shadow = shadow or (0, 0, 0, 0) frame = frame or (0, 0, 0, 0) - align = align or TMALIGNCENTER + align = align or TextNode.ACenter else: raise ValueError