Exemplo n.º 1
0
def get_menu_text(element):
    constants = get_constants(element)
    title = ''
    text = ''
    if base_manager.has_title(element):
        title = constants.MENU_TEXT_TITLE_FORMAT.format(get_title(element))

    if base_manager.has_text(element):
        text = base_manager.get_text(element)

    menu_text = constants.MENU_TEXT_FORMAT.format(title, text)

    return menu_text
Exemplo n.º 2
0
def get_branches_choices(paragraph, data_provider=None):
    branches_list = base_manager.get_children(paragraph)
    choices = base_manager.create_empty_list()
    if branches_list is not None:
        branches = list_manager.get_elements(branches_list)
        for branch_reference in branches:
            branch = base_manager.get_element(branch_reference, data_provider)
            text = base_manager.get_text(branch)
            target = branch_manager.get_target(branch)
            action_open = action_manager.get_open_action(target)
            branch_choice = choice_manager.create_choice(text, action_open)
            choices = base_manager.add_element(choices, branch_choice)

    return choices
Exemplo n.º 3
0
def get_text(choice):
    text = base_manager.get_text(choice)
    return text
Exemplo n.º 4
0
def get_text(elements_list):
    text = base_manager.get_text(elements_list, list_const)
    return text
Exemplo n.º 5
0
def get_text(menu):
    text = base_manager.get_text(menu)
    return text