def __init__(self, startdir, width=None, height=None, noexit=True, switchKeys=False): self.width = width self.height = height print "startdir is", startdir self.dirnav = filenav.FileNav(startdir, sortbyname=True) self.momentum = self.right newdir = self.dirnav.current s = filenav.similarChild(None, newdir) self.imagenav = s self.clock = pygame.time.Clock() self.noexit = noexit self.switchKeys = switchKeys
def nextDir(self): newdir = self.dirnav.next self.imagenav = filenav.similarChild(self.imagenav, newdir) self.view.viewImage(self.imagenav.current)
def prevDir(self): newdir = self.dirnav.previous self.imagenav = filenav.similarChild(self.imagenav, newdir) self.view.viewImage(self.imagenav.current)