예제 #1
0
 private void AddCloseHandler(MyGuiScreenBase previousScreen, MyGuiScreenLogo logoScreen, Action afterLogosAction)
 {
     previousScreen.Closed += (screen) =>
     {
         if (!screen.Cancelled)
         {
             AddScreen(logoScreen);
         }
         else
         {
             afterLogosAction();
         }
     };
 }
예제 #2
0
        public void BackToIntroLogos(Action afterLogosAction)
        {
            MyScreenManager.CloseAllScreensNowExcept(null);

            string[] logos = new string[]
            {
                //"Textures\\Logo\\keen_swh",
                //"Textures\\Logo\\game",
                //"Textures\\Logo\\vrage",
            };

            MyGuiScreenBase previousScreen = null;

            foreach (var logo in logos)
            {
                var logoScreen = new MyGuiScreenLogo(logo);
                if (previousScreen != null)
                {
                    AddCloseHandler(previousScreen, logoScreen, afterLogosAction);
                }
                else
                {
                    AddScreen(logoScreen);
                }

                previousScreen = logoScreen;
            }

            if (previousScreen != null)
            {
                previousScreen.Closed += (screen) => afterLogosAction();
            }
            else
            {
                afterLogosAction();
            }
        }
예제 #3
0
 private void AddCloseHandler(MyGuiScreenBase previousScreen, MyGuiScreenLogo logoScreen, Action afterLogosAction)
 {
     previousScreen.Closed += (screen) =>
     {
         if (!screen.Cancelled)
             AddScreen(logoScreen);
         else
             afterLogosAction();
     };
 }
예제 #4
0
        public void BackToIntroLogos(Action afterLogosAction)
        {
            MyScreenManager.CloseAllScreensNowExcept(null);

            string[] logos = new string[]
            {
                //"Textures\\Logo\\keen_swh",
                //"Textures\\Logo\\game",
                //"Textures\\Logo\\vrage",
            };

            MyGuiScreenBase previousScreen = null;

            foreach (var logo in logos)
            {
                var logoScreen = new MyGuiScreenLogo(logo);
                if (previousScreen != null)
                    AddCloseHandler(previousScreen, logoScreen, afterLogosAction);
                else
                    AddScreen(logoScreen);

                previousScreen = logoScreen;
            }

            if (previousScreen != null)
                previousScreen.Closed += (screen) => afterLogosAction();
            else
                afterLogosAction();
        }