/// <summary>
 /// Vtlaceni noveho okna na zasobnik a jeho nasledne vykresleni a stare okno pauznout
 /// </summary>
 /// <param name="newScreen"></param>
 public void PushMessage(GameScreen newScreen)
 {
     drawOrder += drawOrderInc;
     newScreen.DrawOrder = drawOrder;
     gameScreens.Push(newScreen);
     Game.Components.Add(newScreen);
     OnScreenChange += newScreen.ScreenChange;
     if (OnScreenChange != null)
         OnScreenChange(this, new ScreenEventArgs(newScreen, true));
 }
 /// <summary>
 /// Smazani zasobniku oken a nastaveni prvniho noveho okna na zasobnik a jeho vykresleni
 /// </summary>
 /// <param name="newScreen"></param>
 public void ChangeScreens(GameScreen newScreen)
 {
     MouseInput.Flush();
     KeyboardInput.Flush();
     while (gameScreens.Count > 0)
         RemoveScreen();
     newScreen.DrawOrder = startDrawOrder;
     drawOrder = startDrawOrder;
     AddScreen(newScreen);
     if (OnScreenChange != null)
         OnScreenChange(this, new ScreenEventArgs(newScreen, false));
 }
 public ScreenEventArgs(GameScreen gameScreen, bool isMessage)
 {
     GameScreen = gameScreen;
     IsMessage = isMessage;
 }
 /// <summary>
 /// Vtlaceni noveho okna na zasobnik a jeho nasledne vykresleni a stare okno odvykreslit
 /// </summary>
 /// <param name="newScreen"></param>
 public void PushScreen(GameScreen newScreen)
 {
     drawOrder += drawOrderInc;
     newScreen.DrawOrder = drawOrder;
     AddScreen(newScreen);
     if (OnScreenChange != null)
         OnScreenChange(this, new ScreenEventArgs(newScreen, false));
 }
 /// <summary>
 /// Pridani okna do zasobniku a nastaveni delegata pro zmenu okna
 /// </summary>
 /// <param name="newScreen"></param>
 private void AddScreen(GameScreen newScreen)
 {
     gameScreens.Push(newScreen);
     Game.Components.Add(newScreen);
     OnScreenChange += newScreen.ScreenChange;
 }