MenuScreen

Description

Each menu possibility will be a MenuScreen that will hold an array of menu options that each will be a MenuItem. The MenuScreen will receive input from the MenuManager to cycle through the options and return the selected option.

Relationships

Members

  • List<MenuItem> allOptions - A list that will contain all MenuItem
  • List<MenuItem> menuOptions - A list that will contain each MenuItem option that are accessible
  • int current - An integer that represents the current selected item
  • string menuName - A string representing the name of the menu

Methods

  • AddOption
    • Will add a MenuItem to the array. Will check to make sure that it is not all ready in the array by comparing the name string
  • SelectedOption
  • NextItem
    • Selects the next option in the list (adds 1 to current)
  • PrevItem
    • Selects the previous option in the list (subtracts 1 to current)
  • ReturnName
    • Returns the name of the menu
  • Reset
    • Resets current to 0
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License