def __init__(self,statusBar,fileName,position=0): GIFAnimationCtrl.__init__(self,statusBar,-1,info.imageFile(fileName)) self._statusBar = statusBar self._fileName = fileName self._position = position self._running = False #backgroundcolour player = self.GetPlayer() player.UseBackgroundColour(True) #position rect = statusBar.GetFieldRect(0) self.SetPosition((rect.x+(rect.width-16)/2, rect.y+(rect.height-16)/2))
def LoadFile(self,fileName): if (hasattr(self,'_fileName') and fileName != self._fileName) and not self._running: GIFAnimationCtrl.LoadFile(self,info.imageFile(fileName)) self._fileName = fileName return True return False