diff --git a/direct/src/gui/OnscreenText.py b/direct/src/gui/OnscreenText.py index 6f9405dde6..2e5df5ab94 100644 --- a/direct/src/gui/OnscreenText.py +++ b/direct/src/gui/OnscreenText.py @@ -16,14 +16,20 @@ class OnscreenText(PandaObject, NodePath): # make a text node self.textNode = textNode = TextNode() + # Freeze the node while we set all the properties + textNode.freeze() textNode.setBillboard(0) textNode.setTextColor(0.0, 0.0, 0.0, 1.0) textNode.setCardColor(1.0, 1.0, 1.0, 1.0) textNode.setCardAsMargin(0.1, 0.1, 0.1, 0.1) - textNode.setFrameColor(0.0, 0.0, 0.0, 1.0) - textNode.setFrameAsMargin(0.1, 0.1, 0.1, 0.1) + # textNode.setFrameColor(0.0, 0.0, 0.0, 1.0) + # textNode.setFrameAsMargin(0.15, 0.15, 0.15, 0.15) textNode.setFont(OnscreenText.Font) textNode.setText(string) + textNode.clearCardBorder() + textNode.clearFrame() + # Ok, now update the node + textNode.thaw() # put the text node into the 2d scene graph textNodePath = render2d.attachNewNode(textNode) diff --git a/direct/src/task/Task.py b/direct/src/task/Task.py index 67a4876017..6eae346391 100644 --- a/direct/src/task/Task.py +++ b/direct/src/task/Task.py @@ -213,7 +213,6 @@ class TaskManager: self.taskList.remove(task) except: pass - # TODO: upon death if task.uponDeath: task.uponDeath(task)