浏览代码

*** empty log message ***

Mark Mine 24 年之前
父节点
当前提交
a87118746f
共有 2 个文件被更改,包括 10 次插入2 次删除
  1. 0 2
      direct/src/gui/DialogBox.py
  2. 10 0
      direct/src/showbase/Transitions.py

+ 0 - 2
direct/src/gui/DialogBox.py

@@ -1,2 +0,0 @@
-from ToontownDialog import *
-

+ 10 - 0
direct/src/showbase/Transitions.py

@@ -93,6 +93,16 @@ class Transitions:
         self.fade.reparentTo(aspect2d)
         self.fade.reparentTo(aspect2d)
         self.fade.setColor(0,0,0,alpha)
         self.fade.setColor(0,0,0,alpha)
 
 
+    def guiFadeScreen(self, alpha=0.5):
+        """
+        Put a semitransparent screen over the camera plane
+        to darken out the world. Useful for drawing attention to
+        a dialog box for instance
+        """
+        self.noTransitions()
+        self.fade.reparentTo(guiTop, 100)
+        self.fade.setColor(0,0,0,alpha)
+
     def fadeOutTask(self, task, time=0.3, noFade=1):
     def fadeOutTask(self, task, time=0.3, noFade=1):
         """
         """
         As a sequence: Fade out, execute the given task, then do a noFade
         As a sequence: Fade out, execute the given task, then do a noFade