Browse Source

Add self.a2dBackground

aignacio_sf 18 years ago
parent
commit
872f08f70c
1 changed files with 5 additions and 3 deletions
  1. 5 3
      direct/src/showbase/ShowBase.py

+ 5 - 3
direct/src/showbase/ShowBase.py

@@ -222,9 +222,9 @@ class ShowBase(DirectObject.DirectObject):
 
         # Open the default rendering window.
         if self.windowType != 'none':
-	    props = WindowProperties.getDefault()
-	    if (self.config.GetBool('read-raw-mice', 0)):
-	        props.setRawMice(1)
+            props = WindowProperties.getDefault()
+            if (self.config.GetBool('read-raw-mice', 0)):
+                props.setRawMice(1)
             self.openDefaultWindow(startDirect = False, props=props)
 
         self.loader = Loader.Loader(self)
@@ -824,6 +824,8 @@ class ShowBase(DirectObject.DirectObject):
         self.aspect2d = self.render2d.attachNewNode(PGTop("aspect2d"))
         self.aspect2d.setScale(1.0 / aspectRatio, 1.0, 1.0)
 
+        self.a2dBackground = self.aspect2d.attachNewNode("a2dBackground") 
+
         # It's important to know the bounds of the aspect2d screen.
         self.a2dTop = 1.0
         self.a2dBottom = -1.0