//string menuTitle = "Slides Menu"; /// <summary> /// Constructor fills in the menu contents. /// </summary> public SlideMenuScreen() : base("Slides Menu") { slides = new List<SlideScreen>(); currentSlideIndex = 0; SlideScreen firstSlide = new SlideScreen(this); slides.Add(firstSlide); _isPlayingSlideshow = false; _playWatch = new Stopwatch(); // Create our menu entries. MenuEntry playSlideMenuEntry = new MenuEntry("Play Slides"); MenuEntry exitMenuEntry = new MenuEntry("Exit"); MenuEntry slidesMenuEntry = new MenuEntry("Slides"); // Hook up menu event handlers playSlideMenuEntry.Selected += PlayMenuEntrySelected; exitMenuEntry.Selected += OnCancel; slidesMenuEntry.Selected += SlidesMenuEntrySelected; // Add entries to the menu. MenuEntries.Add(slidesMenuEntry); MenuEntries.Add(playSlideMenuEntry); MenuEntries.Add(exitMenuEntry); }
/// <summary> NewSlide(PlayerIndex playerIndex) or /// Creates a newSlide with passing the playerIndex parameter to the screenManager. /// note: this method takes O(n) ..... /// </summary> public void NewSlide() { //insert newSlide after the current slide SlideScreen slide = new SlideScreen(this); slides.Insert(currentSlideIndex +1, slide); currentSlideIndex++; ScreenManager.AddScreen(slide,ScreenManager.currentPlayerIndex);//adding a screen with 'null' for player index allows any player to control the screen but allows commands to be multiplied! }
/// <summary> NewSlide(PlayerIndex playerIndex) or /// Creates a newSlide with passing the playerIndex parameter to the screenManager. /// note: this method takes O(n) ..... /// </summary> public void NewSlide(PlayerIndex playerIndex) { //insert newSlide after the current slide SlideScreen slide = new SlideScreen(this); slides.Insert(currentSlideIndex +1, slide); currentSlideIndex++; ScreenManager.AddScreen(slide, playerIndex); }/*