peng3d/gui/layered.py
def addLayer(self,layer,z_index=None):
        """
        Adds the given layer at the given Z Index.
        
        If ``z_index`` is not given, the Z Index specified by the layer will be used.
        """
        if z_index is None:
            z_index = layer.z_index
        i = 0
        for l,z in self.layers:
            if z>z_index:
                break
            i+=1
        self._layers[layer.name]=layer
        self.layers.insert(i,[layer,z_index])
def addLayer(self,layer,z_index=None):
        """
        Adds the given layer at the given Z Index.
        
        If ``z_index`` is not given, the Z Index specified by the layer will be used.
        """
        if z_index is None:
            z_index = layer.z_index
        i = 0
        for l,z in self.layers:
            if z>z_index:
                break
            i+=1
        self._layers[layer.name]=layer
        self.layers.insert(i,[layer,z_index])
def addLayer ( self , layer , z_index = None ) : if z_index is None : z_index = layer . z_index i = 0 for l , z in self . layers : if z > z_index : break i += 1 self . _layers [ layer . name ] = layer self . layers . insert ( i , [ layer , z_index ] )
Adds the given layer at the given Z Index.
        
        If ``z_index`` is not given, the Z Index specified by the layer will be used.
Adds the given layer at the given Z Index . If z_index is not given the Z Index specified by the layer will be used .