Exemple #1
0
def load():
    """ A menu for selectng a save to load. """
    saves_list = saves.list_saves()
    return menu(
        'Load save',
        ([(save[1]['name'], lambda_gen(saves.load_save, save[0]))
          for save in saves_list] + [back])
    )
Exemple #2
0
def delete():
    """ A menu for selectng a save to delete. """
    saves_list = saves.list_saves()
    return menu(
        'Delete save',
        ([(save[1]['name'], lambda_gen(saves.delete_save, save[0]))
          for save in saves_list] + [back])
    )
Exemple #3
0
def saves_list(func):
    saves_list = saves.list_saves()
    return ([(save[1]['name'], lambda_gen(func, save[0])) for save in saves_list] +
            [() if saves_list else None])
Exemple #4
0
def saves_list(func):
    saves_list = saves.list_saves()
    return ([(save[1]['name'], lambda_gen(func, save[0]))
             for save in saves_list] + [() if saves_list else None])