mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
*** empty log message ***
This commit is contained in:
parent
eab6f0393b
commit
a43b3e1df7
@ -16,14 +16,20 @@ class OnscreenText(PandaObject, NodePath):
|
|||||||
|
|
||||||
# make a text node
|
# make a text node
|
||||||
self.textNode = textNode = TextNode()
|
self.textNode = textNode = TextNode()
|
||||||
|
# Freeze the node while we set all the properties
|
||||||
|
textNode.freeze()
|
||||||
textNode.setBillboard(0)
|
textNode.setBillboard(0)
|
||||||
textNode.setTextColor(0.0, 0.0, 0.0, 1.0)
|
textNode.setTextColor(0.0, 0.0, 0.0, 1.0)
|
||||||
textNode.setCardColor(1.0, 1.0, 1.0, 1.0)
|
textNode.setCardColor(1.0, 1.0, 1.0, 1.0)
|
||||||
textNode.setCardAsMargin(0.1, 0.1, 0.1, 0.1)
|
textNode.setCardAsMargin(0.1, 0.1, 0.1, 0.1)
|
||||||
textNode.setFrameColor(0.0, 0.0, 0.0, 1.0)
|
# textNode.setFrameColor(0.0, 0.0, 0.0, 1.0)
|
||||||
textNode.setFrameAsMargin(0.1, 0.1, 0.1, 0.1)
|
# textNode.setFrameAsMargin(0.15, 0.15, 0.15, 0.15)
|
||||||
textNode.setFont(OnscreenText.Font)
|
textNode.setFont(OnscreenText.Font)
|
||||||
textNode.setText(string)
|
textNode.setText(string)
|
||||||
|
textNode.clearCardBorder()
|
||||||
|
textNode.clearFrame()
|
||||||
|
# Ok, now update the node
|
||||||
|
textNode.thaw()
|
||||||
|
|
||||||
# put the text node into the 2d scene graph
|
# put the text node into the 2d scene graph
|
||||||
textNodePath = render2d.attachNewNode(textNode)
|
textNodePath = render2d.attachNewNode(textNode)
|
||||||
|
@ -213,7 +213,6 @@ class TaskManager:
|
|||||||
self.taskList.remove(task)
|
self.taskList.remove(task)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
# TODO: upon death
|
|
||||||
if task.uponDeath:
|
if task.uponDeath:
|
||||||
task.uponDeath(task)
|
task.uponDeath(task)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user