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); } }
/// <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); }