Ver código fonte

fix problem with setShadow after creation

David Rose 22 anos atrás
pai
commit
78164ebad6
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      direct/src/gui/OnscreenText.py

+ 2 - 2
direct/src/gui/OnscreenText.py

@@ -328,8 +328,8 @@ class OnscreenText(PandaObject, NodePath):
         self.textNode.freeze()
         self.textNode.freeze()
         if shadow[3] != 0:
         if shadow[3] != 0:
             # If we have a shadow color, create a shadow.
             # If we have a shadow color, create a shadow.
-            self.textNode.setShadowColor(*shadow)
-            self.textNode.setShadow(*shadowOffset)
+            self.textNode.setShadowColor(shadow[0], shadow[1], shadow[2], shadow[3])
+            self.textNode.setShadow(0.04, 0.04)
         else:
         else:
             # Otherwise, remove the shadow.
             # Otherwise, remove the shadow.
             self.textNode.clearShadow()
             self.textNode.clearShadow()