예제 #1
0
 /// <summary>
 /// Closes the current menu and returns to the previous menu.
 /// </summary>
 public void Close()
 {
     if (previousMenus.Count > 0)
     {
         activeMenu = previousMenus.Pop();
     }
     else
     {
         Exit();
     }
 }
예제 #2
0
 /// <summary>
 /// Closes all menus.
 /// </summary>
 public void Exit()
 {
     activeMenu = null;
     IsActive = false;
 }
예제 #3
0
        public void AddMenu(string name, Menu menu)
        {
            Menus.Add(name, menu);

            activeMenu = menu;
        }