private void OnClickNewWorld(MyGuiControlButton sender)
 {
     if (MyFakes.ENABLE_TUTORIAL_PROMPT && MySandboxGame.Config.NeedShowTutorialQuestion)
     {
         MyGuiSandbox.AddScreen(MyGuiSandbox.CreateMessageBox(buttonType : MyMessageBoxButtonsType.YES_NO,
                                                              messageText : MyTexts.Get(MyPerGameSettings.EnableTutorials ? MySpaceTexts.MessageBoxTextTutorialQuestion : MyCommonTexts.MessageBoxTextGuideQuestion),
                                                              messageCaption : MyTexts.Get(MySpaceTexts.MessageBoxCaptionTutorial),
                                                              callback : delegate(MyGuiScreenMessageBox.ResultEnum val)
         {
             if (val == MyGuiScreenMessageBox.ResultEnum.YES)
             {
                 MyAnalyticsHelper.ReportTutorialScreen("FirstTime");
                 MyGuiSandbox.OpenUrlWithFallback(MySteamConstants.URL_GUIDE_DEFAULT, "Steam Guide");
             }
             else
             {
                 MyGuiSandbox.AddScreen(MyGuiSandbox.CreateScreen <MyGuiScreenStartSandbox>());
             }
         }));
         MySandboxGame.Config.NeedShowTutorialQuestion = false;
         MySandboxGame.Config.Save();
     }
     else
     {
         MyGuiSandbox.AddScreen(MyGuiSandbox.CreateScreen <MyGuiScreenStartSandbox>());
     }
 }
Example #2
0
 public void OnTutorialClick(MyGuiControlButton sender)
 {
     MyAnalyticsHelper.ReportTutorialScreen("TutorialsButtonClicked");
     MyGuiSandbox.AddScreen(MyGuiSandbox.CreateScreen(MyPerGameSettings.GUI.TutorialScreen));
 }