Browse Source

*** empty log message ***

Joe Shochet 25 years ago
parent
commit
a43b3e1df7
2 changed files with 8 additions and 3 deletions
  1. 8 2
      direct/src/gui/OnscreenText.py
  2. 0 1
      direct/src/task/Task.py

+ 8 - 2
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)

+ 0 - 1
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)