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