mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
*** empty log message ***
This commit is contained in:
parent
8f889510a6
commit
62fc8c17dc
@ -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):
|
||||
|
@ -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):
|
||||
|
@ -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):
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user