def update(self, pbar):
        '''Updates the widget to show the next marker or the first marker when
        finished'''

        if pbar.finished:
            return self.markers[0]

        self.curmark = (self.curmark + 1) % len(self.markers)
        return self.markers[self.curmark]
Updates the widget to show the next marker or the first marker when
        finished
metadrive/render_pipeline/rplibs/progressbar/widgets.py