TMALIGN -> TextNode.A*

This commit is contained in:
David Rose 2002-03-13 21:52:25 +00:00
parent c554e8e9d9
commit 7346c65f35
4 changed files with 11 additions and 11 deletions

View File

@ -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)

View File

@ -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),

View File

@ -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

View File

@ -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