From 4335175d94b559e36a68d5007108e983b4d770f7 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 5 Apr 2001 22:44:38 +0000 Subject: [PATCH] *** empty log message *** --- direct/src/gui/OnscreenPanel.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/direct/src/gui/OnscreenPanel.py b/direct/src/gui/OnscreenPanel.py index b182e5423e..87abad86c0 100644 --- a/direct/src/gui/OnscreenPanel.py +++ b/direct/src/gui/OnscreenPanel.py @@ -191,6 +191,9 @@ class OnscreenPanel(PandaObject.PandaObject, NodePath): """show(self): Show everything and hang hooks """ + if not self.panelSetup: + return 0 + NodePath.show(self) # show the buttons that are meant to be shown @@ -206,6 +209,9 @@ class OnscreenPanel(PandaObject.PandaObject, NodePath): """hide(self): Hide everything and remove hooks """ + if not self.panelSetup: + return 0 + NodePath.hide(self) # hide the shown buttons and remove all hooks @@ -241,6 +247,8 @@ class OnscreenPanel(PandaObject.PandaObject, NodePath): when cleanup() is called. """ + assert self.panelSetup + if label == None: label = name if drawOrder == None: @@ -290,6 +298,8 @@ class OnscreenPanel(PandaObject.PandaObject, NodePath): """ + assert self.panelSetup + if drawOrder == None: drawOrder = self.panelDrawOrder + 10 if font == None: @@ -336,6 +346,7 @@ class OnscreenPanel(PandaObject.PandaObject, NodePath): managed buttons along with it. """ + assert self.panelSetup NodePath.setPos(self, x, y, z) for button in self.panelButtons: