private static void OpenScreen(MyGuiScreenEnterSectorMap openAfterSuccessfulEnter, List<MyMwcSectorIdentifier> sectors)
 {
     if (openAfterSuccessfulEnter != null)
     {
         openAfterSuccessfulEnter.AddLoadSectorIdentifiersResponse(sectors);
         MyGuiManager.AddScreen(openAfterSuccessfulEnter);
     }
 }
Example #2
0
 private static void OpenScreen(MyGuiScreenEnterSectorMap openAfterSuccessfulEnter, List <MyMwcSectorIdentifier> sectors)
 {
     if (openAfterSuccessfulEnter != null)
     {
         openAfterSuccessfulEnter.AddLoadSectorIdentifiersResponse(sectors);
         MyGuiManager.AddScreen(openAfterSuccessfulEnter);
     }
 }
        void ChooseSandbox(MyMwcStartSessionRequestTypeEnum sessionRequestType, bool global)
        {
            MyMwcSectorTypeEnum sectorType = MyMwcClientServer.GetSectorTypeFromSessionType(sessionRequestType);

            var selectSectorScreen = new MyGuiScreenEnterSectorMap(m_closeAfterSuccessfulEnter, sessionRequestType, MyTextsWrapperEnum.StartGameInProgressPleaseWait, MyConfig.LastSandboxSector);
            selectSectorScreen.CustomLoadAction = StartSandbox;

            bool isOfficialSandbox = sessionRequestType == MyMwcStartSessionRequestTypeEnum.SANDBOX_FRIENDS && global;

            if (isOfficialSandbox)
            {
                selectSectorScreen.SetSectorSourceAction(MyLocalCache.GetOfficialMultiplayerSectorIdentifiers);
                MyGuiManager.AddScreen(selectSectorScreen);
            }
            else
            {
                MyGuiScreenMainMenu.AddLoginScreen(new MyGuiScreenLoadSectorIdentifiersProgress(sectorType, global, selectSectorScreen));
            }
        }
        void ChooseSandbox(MyMwcStartSessionRequestTypeEnum sessionRequestType, bool global)
        {
            MyMwcSectorTypeEnum sectorType = MyMwcClientServer.GetSectorTypeFromSessionType(sessionRequestType);

            var selectSectorScreen = new MyGuiScreenEnterSectorMap(m_closeAfterSuccessfulEnter, sessionRequestType, MyTextsWrapperEnum.StartGameInProgressPleaseWait, MyConfig.LastSandboxSector);

            selectSectorScreen.CustomLoadAction = StartSandbox;

            bool isOfficialSandbox = sessionRequestType == MyMwcStartSessionRequestTypeEnum.SANDBOX_FRIENDS && global;

            if (isOfficialSandbox)
            {
                selectSectorScreen.SetSectorSourceAction(MyLocalCache.GetOfficialMultiplayerSectorIdentifiers);
                MyGuiManager.AddScreen(selectSectorScreen);
            }
            else
            {
                MyGuiScreenMainMenu.AddLoginScreen(new MyGuiScreenLoadSectorIdentifiersProgress(sectorType, global, selectSectorScreen));
            }
        }
 public MyGuiScreenLoadSectorIdentifiersProgress(MyMwcSectorTypeEnum sectorType, bool global, MyGuiScreenEnterSectorMap openAfterSuccessfulEnter)
     :this(sectorType, global, new Action<List<MyMwcSectorIdentifier>>((sectors) => OpenScreen(openAfterSuccessfulEnter, sectors)))
 {
 }
Example #6
0
 public MyGuiScreenLoadSectorIdentifiersProgress(MyMwcSectorTypeEnum sectorType, bool global, MyGuiScreenEnterSectorMap openAfterSuccessfulEnter)
     : this(sectorType, global, new Action <List <MyMwcSectorIdentifier> >((sectors) => OpenScreen(openAfterSuccessfulEnter, sectors)))
 {
 }