public void AddScreen(Screen screen) { screen.ScreenManager = this; //load content if (isInitialized) { screen.Activate(); } screens.Add(screen); screen.ScreenManager = this; }
public void AddScreen(Screen screen) { screen.ScreenManager = this; screen.IsExiting = false; if (isInitialized) { screen.Activate(false); } screens.Add(screen); TouchPanel.EnabledGestures = screen.EnabledGestures; }
/// <summary> /// Adds a new screen to the screen manager. /// </summary> public void AddScreen(Screen screen, PlayerIndex? controllingPlayer) { screen.ControllingPlayer = controllingPlayer; screen.ScreenManager = this; screen.IsExiting = false; // If we have a graphics device, tell the screen to load content. if (isInitialized) { screen.Activate(false); } screens.Add(screen); // update the TouchPanel to respond to gestures this screen is interested in TouchPanel.EnabledGestures = screen.EnabledGestures; }