mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
delay default parameters
This commit is contained in:
parent
49a8379b8c
commit
01de7cd35a
@ -26,8 +26,8 @@ class OnscreenText(PandaObject, NodePath):
|
||||
frame = None,
|
||||
align = None,
|
||||
wordwrap = None,
|
||||
drawOrder = DirectGuiGlobals.getDefaultDrawOrder(),
|
||||
font = DirectGuiGlobals.getDefaultFont(),
|
||||
drawOrder = None,
|
||||
font = None,
|
||||
parent = aspect2d,
|
||||
sort = 0,
|
||||
mayChange = 0):
|
||||
@ -150,6 +150,9 @@ class OnscreenText(PandaObject, NodePath):
|
||||
# Save some of the parameters for posterity.
|
||||
self.scale = scale
|
||||
self.pos = pos
|
||||
|
||||
if font == None:
|
||||
font = DirectGuiGlobals.getDefaultFont()
|
||||
|
||||
# Freeze the node while we set all the properties
|
||||
textNode.freeze()
|
||||
@ -183,6 +186,9 @@ class OnscreenText(PandaObject, NodePath):
|
||||
scale[0], 1, scale[1]) * Mat4.translateMat(pos[0], 0, pos[1])
|
||||
textNode.setTransform(mat)
|
||||
|
||||
if drawOrder == None:
|
||||
drawOrder = DirectGuiGlobals.getDefaultDrawOrder()
|
||||
|
||||
textNode.setBin('fixed')
|
||||
textNode.setDrawOrder(drawOrder)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user