peng3d/gui/container.py
def draw(self):
        """
        Draws the submenu and its background.
        
        Note that this leaves the OpenGL state set to 2d drawing and may modify the scissor settings.
        """
        if not self.visible:
            # Simple visibility check, has to be tested to see if it works properly
            return
        
        if not isinstance(self.submenu,Container):
            glEnable(GL_SCISSOR_TEST)
            glScissor(*self.pos+self.size)
        
        SubMenu.draw(self)
        
        if not isinstance(self.submenu,Container):
            glDisable(GL_SCISSOR_TEST)
def draw(self):
        """
        Draws the submenu and its background.
        
        Note that this leaves the OpenGL state set to 2d drawing and may modify the scissor settings.
        """
        if not self.visible:
            # Simple visibility check, has to be tested to see if it works properly
            return
        
        if not isinstance(self.submenu,Container):
            glEnable(GL_SCISSOR_TEST)
            glScissor(*self.pos+self.size)
        
        SubMenu.draw(self)
        
        if not isinstance(self.submenu,Container):
            glDisable(GL_SCISSOR_TEST)
Draws the submenu and its background.
        
        Note that this leaves the OpenGL state set to 2d drawing and may modify the scissor settings.