*** empty log message ***

This commit is contained in:
David Rose 2001-04-07 01:49:55 +00:00
parent ffd517c79b
commit 8f9fce64ed
2 changed files with 20 additions and 11 deletions

View File

@ -30,7 +30,7 @@ class DialogBox(OnscreenPanel.OnscreenPanel):
self.isLoaded = 0
# initialize our OnscreenPanel essence
# NOTE: all db's have the same name so we can kill tem easily
# NOTE: all db's have the same name so we can kill them easily
OnscreenPanel.OnscreenPanel.__init__(self, "globalDialog")
return None
@ -74,7 +74,7 @@ class DialogBox(OnscreenPanel.OnscreenPanel):
# create OK and CANCEL buttons
self.makeButton("OK", pos = (-0.325, -0.25),
func = self.__handleOk)
self.makeButton("CANCEL", pos = (0.2, -0.25),
self.makeButton("Cancel", pos = (0.2, -0.25),
func = self.__handleCancel)
else:
# create a centered OK button

View File

@ -124,17 +124,9 @@ class OnscreenPanel(PandaObject.PandaObject, NodePath):
# Otherwise, it's a model to instance.
self.panelGeom = geom.instanceTo(self)
# Set up the panel as its own mouse region so mouse clicks on
# the panel don't inadvertently drive the toon around.
self.geomRect = geomRect
self.panelRegion = MouseWatcherRegion(uniqueName, 0, 0, 0, 0)
self.panelRegion.setRelative(self.panelGeom,
geomRect[0], geomRect[1],
geomRect[2], geomRect[3])
centerX = (rect[0] + rect[1]) / 2.0
centerY = (rect[2] + rect[3]) / 2.0
self.setPos(centerX, 0, centerY)
NodePath.setPos(self, centerX, 0, centerY)
# Scale and position the geometry to fill up our desired
# rectangle.
@ -160,6 +152,22 @@ class OnscreenPanel(PandaObject.PandaObject, NodePath):
self.panelGeom.setY(100)
self.panelGeom.arc().setTransition(dw, 2)
# Set up the panel as its own mouse region so mouse clicks on
# the panel don't inadvertently drive the toon around. This
# must be done after the panelGeom has been scaled
# appropriately, above.
self.geomRect = geomRect
self.panelRegion = MouseWatcherRegion(uniqueName, 0, 0, 0, 0)
self.panelRegion.setRelative(self.panelGeom,
geomRect[0], geomRect[1],
geomRect[2], geomRect[3])
# *** Temporary try/except to support old Pandas.
try:
self.panelRegion.setSort(self.panelDrawOrder)
except:
pass
def cleanup(self):
"""cleanup(self):
@ -360,3 +368,4 @@ class OnscreenPanel(PandaObject.PandaObject, NodePath):
self.geomRect[2], self.geomRect[3])