New Arduino library: MenuSystem

olikraus:
So this means, I need to write a procedure which renders the menu on an output device. This procedure also has to take care to highlight the "current" menu item, correct?

Thanks for clarification,
Oliver

Yes, you need to render the menu to a device. Bear in mind that this library manages which item is current for you, and that is the only item you should display. This means that you can only show one option on your output device at a time. If you want to display all menu items and highlight the current one, this library isn't for you. I've written some pseudo-code below to explain this, I hope it makes sense:

def process_input():
  if next_button_pressed:
    menusystem.next()
  else if prev_button_pressed:
    menusystem.prev()
  else if select_button_pressed:
    menusystem.select()
  else if back_button_pressed:
    menusystem.back()

def update_menu():
  current_item_text = menusystem.get_current_menu_name()
  output_device.write(current_item_text)

def loop():
  process_input()
  update_menu()