Exemplo n.º 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])
    )
Exemplo n.º 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])
    )
Exemplo n.º 3
0
Arquivo: ui.py Projeto: itsapi/pycraft
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])
Exemplo n.º 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])