Browse Source

added background to self.readout

Dave Schuyler 25 years ago
parent
commit
b6d8f2a81a
1 changed files with 28 additions and 28 deletions
  1. 28 28
      direct/src/directtools/DirectSession.py

+ 28 - 28
direct/src/directtools/DirectSession.py

@@ -45,7 +45,7 @@ class DirectSession(PandaObject):
         self.ancestry = []
         self.ancestry = []
         self.ancestryIndex = 0
         self.ancestryIndex = 0
 
 
-        self.readout = OnscreenText.OnscreenText( pos = (0.1, -0.95) )
+        self.readout = OnscreenText.OnscreenText( pos = (0.1, -0.95), bg=Vec4(1,1,1,1))
         # Make sure readout is never lit or drawn in wireframe
         # Make sure readout is never lit or drawn in wireframe
         useDirectRenderStyle(self.readout)
         useDirectRenderStyle(self.readout)
         # self.readout.textNode.setCardColor(0.5, 0.5, 0.5, 0.5)
         # self.readout.textNode.setCardColor(0.5, 0.5, 0.5, 0.5)
@@ -115,31 +115,31 @@ class DirectSession(PandaObject):
     def enable(self):
     def enable(self):
         # Make sure old tasks are shut down
         # Make sure old tasks are shut down
         self.disable()
         self.disable()
-	# Start all display region context tasks
+        # Start all display region context tasks
         self.drList.spawnContextTask()
         self.drList.spawnContextTask()
-	# Turn on mouse Flying
-	self.cameraControl.enableMouseFly()
+        # Turn on mouse Flying
+        self.cameraControl.enableMouseFly()
         # Turn on object manipulation
         # Turn on object manipulation
         self.manipulationControl.enableManipulation()
         self.manipulationControl.enableManipulation()
         # Make sure list of selected items is reset
         # Make sure list of selected items is reset
         self.selected.reset()
         self.selected.reset()
-	# Accept appropriate hooks
-	self.enableKeyEvents()
-	self.enableMouseEvents()
-	self.enableActionEvents()
+        # Accept appropriate hooks
+        self.enableKeyEvents()
+        self.enableMouseEvents()
+        self.enableActionEvents()
         # Set flag
         # Set flag
         self.fEnabled = 1
         self.fEnabled = 1
 
 
     def disable(self):
     def disable(self):
-	# Shut down all display region context tasks
+        # Shut down all display region context tasks
         self.drList.removeContextTask()
         self.drList.removeContextTask()
-	# Turn off camera fly
-	self.cameraControl.disableMouseFly()
+        # Turn off camera fly
+        self.cameraControl.disableMouseFly()
         # Turn off object manipulation
         # Turn off object manipulation
         self.manipulationControl.disableManipulation()
         self.manipulationControl.disableManipulation()
-	self.disableKeyEvents()
-	self.disableMouseEvents()
-	self.disableActionEvents()
+        self.disableKeyEvents()
+        self.disableMouseEvents()
+        self.disableActionEvents()
         # Set flag
         # Set flag
         self.fEnabled = 0
         self.fEnabled = 0
 
 
@@ -150,21 +150,21 @@ class DirectSession(PandaObject):
             self.enable()
             self.enable()
 
 
     def minimumConfiguration(self):
     def minimumConfiguration(self):
-	# Remove context task
+        # Remove context task
         self.drList.removeContextTask()
         self.drList.removeContextTask()
-	# Turn off camera fly
-	self.cameraControl.disableMouseFly()
-	# Ignore keyboard and action events
-	self.disableKeyEvents()
-	self.disableActionEvents()
-	# But let mouse events pass through
-	self.enableMouseEvents()
+        # Turn off camera fly
+        self.cameraControl.disableMouseFly()
+        # Ignore keyboard and action events
+        self.disableKeyEvents()
+        self.disableActionEvents()
+        # But let mouse events pass through
+        self.enableMouseEvents()
 
 
     def destroy(self):
     def destroy(self):
-	self.disable()
+        self.disable()
 
 
     def reset(self):
     def reset(self):
-	self.enable()
+        self.enable()
 
 
     # EVENT FUNCTIONS
     # EVENT FUNCTIONS
     def enableActionEvents(self):
     def enableActionEvents(self):
@@ -192,7 +192,7 @@ class DirectSession(PandaObject):
             self.ignore(event)
             self.ignore(event)
 
 
     def inputHandler(self, input):
     def inputHandler(self, input):
-	# Deal with keyboard and mouse input
+        # Deal with keyboard and mouse input
         if input == 'mouse1':
         if input == 'mouse1':
             messenger.send('handleMouse1')
             messenger.send('handleMouse1')
         elif input == 'mouse1-up':
         elif input == 'mouse1-up':
@@ -393,8 +393,8 @@ class DirectSession(PandaObject):
 
 
     def showAllDescendants(self, nodePath = render):
     def showAllDescendants(self, nodePath = render):
         """ Show the level and its descendants """
         """ Show the level and its descendants """
-	nodePath.showAllDescendants()
-	nodePath.hideCollisionSolids()
+        nodePath.showAllDescendants()
+        nodePath.hideCollisionSolids()
 
 
     def upAncestry(self):
     def upAncestry(self):
         if self.ancestry:
         if self.ancestry:
@@ -509,7 +509,7 @@ class DirectSession(PandaObject):
         self.widget.reparentTo(direct.group)
         self.widget.reparentTo(direct.group)
 
 
     def hideReadout(self):
     def hideReadout(self):
-	self.readout.reparentTo(hidden)
+        self.readout.reparentTo(hidden)
 
 
     def toggleWidgetVis(self):
     def toggleWidgetVis(self):
         self.widget.toggleWidget()
         self.widget.toggleWidget()