Пример #1
0
        public void Initialize(string screenName)
        {
            this.menuSystem = new MenuSystem(Stage.LoadingStage.GetQB<ControlsQB>());
            this.menuSystem.Initialize();

            if (!string.IsNullOrEmpty(screenName))
            {
                this.firstScreenName = screenName;
                this.firstScreen = GetGameScreenByName(screenName);
                menuSystem.AddScreen(firstScreen);
            }
        }
Пример #2
0
		/// <summary>
		/// Adds a new menu to the menu manager.
		/// </summary>
		public void AddScreen(GameScreen screen)
		{
			screen.MenuSystem = this;
			screen.IsExiting = false;

			// If we have a graphics device, tell the menu to load content.
			if (isInitialized)
			{
				screen.LoadContent();
			}

			menus.AddLast(screen);
		}