peng3d/window.py
def changeMenu(self,menu):
        """
        Changes to the given menu.
        
        ``menu`` must be a valid menu name that is currently known.
        
        .. versionchanged:: 1.2a1
           
           The push/pop handlers have been deprecated in favor of the new :py:meth:`Menu.on_enter() <peng3d.menu.Menu.on_enter>`\ , :py:meth:`Menu.on_exit() <peng3d.menu.Menu.on_exit>`\ , etc. events.
        """
        if menu not in self.menus:
            raise ValueError("Menu %s does not exist!"%menu)
        elif menu == self.activeMenu:
            return # Ignore double menu activation to prevent bugs in menu initializer
        old = self.activeMenu
        self.activeMenu = menu
        if old is not None:
            self.menus[old].on_exit(menu)
            self.menus[old].doAction("exit")
            #self.pop_handlers()
        self.menu.on_enter(old)
        self.menu.doAction("enter")
        self.peng.sendEvent("peng3d:window.menu.change",{"peng":self.peng,"window":self,"old":old,"menu":menu})
def changeMenu(self,menu):
        """
        Changes to the given menu.
        
        ``menu`` must be a valid menu name that is currently known.
        
        .. versionchanged:: 1.2a1
           
           The push/pop handlers have been deprecated in favor of the new :py:meth:`Menu.on_enter() <peng3d.menu.Menu.on_enter>`\ , :py:meth:`Menu.on_exit() <peng3d.menu.Menu.on_exit>`\ , etc. events.
        """
        if menu not in self.menus:
            raise ValueError("Menu %s does not exist!"%menu)
        elif menu == self.activeMenu:
            return # Ignore double menu activation to prevent bugs in menu initializer
        old = self.activeMenu
        self.activeMenu = menu
        if old is not None:
            self.menus[old].on_exit(menu)
            self.menus[old].doAction("exit")
            #self.pop_handlers()
        self.menu.on_enter(old)
        self.menu.doAction("enter")
        self.peng.sendEvent("peng3d:window.menu.change",{"peng":self.peng,"window":self,"old":old,"menu":menu})
def changeMenu ( self , menu ) : if menu not in self . menus : raise ValueError ( "Menu %s does not exist!" % menu ) elif menu == self . activeMenu : return # Ignore double menu activation to prevent bugs in menu initializer old = self . activeMenu self . activeMenu = menu if old is not None : self . menus [ old ] . on_exit ( menu ) self . menus [ old ] . doAction ( "exit" ) #self.pop_handlers() self . menu . on_enter ( old ) self . menu . doAction ( "enter" ) self . peng . sendEvent ( "peng3d:window.menu.change" , { "peng" : self . peng , "window" : self , "old" : old , "menu" : menu } )
Changes to the given menu.
        
        ``menu`` must be a valid menu name that is currently known.
        
        .. versionchanged:: 1.2a1
           
           The push/pop handlers have been deprecated in favor of the new :py:meth:`Menu.on_enter() <peng3d.menu.Menu.on_enter>`\ , :py:meth:`Menu.on_exit() <peng3d.menu.Menu.on_exit>`\ , etc. events.
Changes to the given menu . menu must be a valid menu name that is currently known . .. versionchanged :: 1 . 2a1 The push / pop handlers have been deprecated in favor of the new : py : meth : Menu . on_enter () <peng3d . menu . Menu . on_enter > \ : py : meth : Menu . on_exit () <peng3d . menu . Menu . on_exit > \ etc . events .