def METHOD_NAME(stdscr, values: list[str], titles: list[str] = []):
    value_index = 0
    # Start colors in curses
    curses.start_color()
    curses.init_pair(1, curses.COLOR_CYAN, curses.COLOR_BLACK)
    curses.init_pair(2, curses.COLOR_RED, curses.COLOR_BLACK)
    curses.init_pair(3, curses.COLOR_BLACK, curses.COLOR_WHITE)
    curses.init_pair(4, curses.COLOR_WHITE, curses.COLOR_BLACK)
    # Clear and refresh the screen for a blank canvas
    stdscr.erase()
    stdscr.refresh()
    curses.noecho()
    # Render titles
    for i, title in enumerate(titles):
        stdscr.addstr(i, 0, title)
    # Create window for value selection
    win_start = len(titles)
    win: _CursesWindow = curses.newwin(len(values), stdscr.getmaxyx()[1], win_start, 0)
    stdscr.move(win_start, 0)
    # Store last character passed
    k = None
    while True:
        # Initialization
        win.erase()
        # Check value
        if k == curses.KEY_DOWN:
            value_index += 1
        elif k == curses.KEY_UP:
            value_index -= 1
        elif k in [curses.KEY_ENTER, ord("\n"), ord("\r")]:
            return value_index
        # Clamp to within value list
        value_index = min(len(values) - 1, max(0, value_index))
        # Render values
        for i, val in enumerate(values):
            number_str = f"{i + 1}.) "
            win.addstr(i, 0, number_str, curses.color_pair(1))
            win.addstr(i, len(number_str), val, curses.color_pair(4))
        # Move cursor
        win.move(value_index, 0)
        # Refresh the screen
        win.refresh()
        # Wait for next input
        k = stdscr.getch()