示例#1
0
        /// <summary>
        /// Constructs a new MenuSelection and adds it to this Menu
        /// </summary>
        /// <param name="option">Represents an expected user input for this MenuSelection</param>
        /// <param name="text">A string which should be displayed beside the option that describes what the option should accomplish</param>
        /// <param name="colour">The colour the new MenuSelection should be, defaults to white</param>
        public void AddMenuSelection(string option, string text, MenuColours colour = MenuColours.DEFAULT)
        {
            MenuSelection newItem = new MenuSelection(option, text, colour);

            MenuSelections.Add(newItem);
        }
示例#2
0
 /// <summary>
 /// Adds a new MenuSelection to this Menu
 /// </summary>
 /// <param name="selection">The new MenuSelection to add to this Menu</param>
 public void AddMenuSelection(MenuSelection selection)
 {
     MenuSelections.Add(selection);
 }