浏览代码

use getBackgroundColor

David Rose 23 年之前
父节点
当前提交
eb4812d06c
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      direct/src/directtools/DirectUtil.py
  2. 1 1
      direct/src/tkpanels/DirectSessionPanel.py

+ 1 - 1
direct/src/directtools/DirectUtil.py

@@ -50,7 +50,7 @@ def lerpBackgroundColor(r,g,b,duration):
     t = taskMgr.add(lerpColor, 'lerpBackgroundColor')
     t = taskMgr.add(lerpColor, 'lerpBackgroundColor')
     t.time = 0.0
     t.time = 0.0
     t.duration = duration
     t.duration = duration
-    t.sc = base.win.getGsg().getColorClearValue()
+    t.sc = base.getBackgroundColor()
     t.ec = VBase4(r,g,b,1)
     t.ec = VBase4(r,g,b,1)
 
 
 # Set direct drawing style for an object
 # Set direct drawing style for an object

+ 1 - 1
direct/src/tkpanels/DirectSessionPanel.py

@@ -886,7 +886,7 @@ class DirectSessionPanel(AppShell):
             self.updateGridInfo()
             self.updateGridInfo()
             
             
     def updateEnvironmentInfo(self):
     def updateEnvironmentInfo(self):
-        bkgrdColor = base.win.getGsg().getColorClearValue() * 255.0
+        bkgrdColor = base.getBackgroundColor() * 255.0
         self.backgroundColor.set([bkgrdColor[0],
         self.backgroundColor.set([bkgrdColor[0],
                                   bkgrdColor[1],
                                   bkgrdColor[1],
                                   bkgrdColor[2],
                                   bkgrdColor[2],