*** empty log message ***

This commit is contained in:
David Rose 2001-01-10 18:56:39 +00:00
parent 8f889510a6
commit 62fc8c17dc
4 changed files with 20 additions and 4 deletions

View File

@ -5,7 +5,7 @@ import GuiLabel
import GuiButton
import Vec3
guiMgr = GuiManager.GuiManager.getPtr(base.win, base.mak.node())
guiMgr = GuiManager.GuiManager.getPtr(base.win, base.mak.node(), base.renderGui.node())
font = (loader.loadModelOnce("phase_3/models/fonts/ttf-comic")).node()
class Button(DirectObject):

View File

@ -4,7 +4,7 @@ import GuiManager
import GuiFrame
import Vec3
guiMgr = GuiManager.GuiManager.getPtr(base.win, base.mak.node())
guiMgr = GuiManager.GuiManager.getPtr(base.win, base.mak.node(), base.renderGui.node())
font = (loader.loadModelOnce("phase_3/models/fonts/ttf-comic")).node()
class Frame(DirectObject):

View File

@ -3,7 +3,7 @@ from DirectObject import *
import GuiSign
import GuiManager
guiMgr = GuiManager.GuiManager.getPtr(base.win, base.mak.node())
guiMgr = GuiManager.GuiManager.getPtr(base.win, base.mak.node(), base.renderGui.node())
class Sign(DirectObject):

View File

@ -49,7 +49,6 @@ class ShowBase:
self.dataRoot.node(),
self.initialState)
self.render2d = NodePath(setupPanda2d(self.win))
# This is a list of cams associated with the display region's cameras
self.camList = []
for camera in self.cameraList:
@ -57,6 +56,23 @@ class ShowBase:
# Set the default camera
self.cam = self.camera.find('**/+Camera')
# Set up a 2-d layer for drawing things behind Gui labels.
self.render2d = NodePath(setupPanda2d(self.win))
# Set up another 2-d layer for drawing the Gui labels themselves.
self.renderGui = NodePath(setupPanda2d(self.win))
# Set up an auxiliary 3-d layer for rendering floating heads
# or other 3-d objects on top of text or widgets in the 2-d
# layer. We set it up with a camera that specifically shares
# the projection with the default camera, so that when we
# change the default camera's parameters, it changes this one
# too.
self.renderAux = NodePath(NamedNode('renderAux'))
self.camAux = self.renderAux.attachNewNode(Camera('camAux'))
self.camAux.node().shareProjection(self.cam.node().getProjection())
addRenderLayer(self.win, self.renderAux.node(), self.camAux.node())
# We create both a MouseAndKeyboard object and a MouseWatcher object
# for the window. The MouseAndKeyboard generates mouse events and
# mouse button/keyboard events; the MouseWatcher passes them through