Example #1
0
        //  TODO: This is just temporary method that launches editor. Later must be differentiate according to what user picked
        void Run(MyMwcStartSessionRequestTypeEnum sessionRequestType, bool global)
        {
            MyMwcSectorTypeEnum sectorType = MyMwcClientServer.GetSectorTypeFromSessionType(sessionRequestType);

            MyGuiManager.AddScreen(new MyGuiScreenLoadSectorIdentifiersProgress(sectorType, global, new MyGuiScreenEnterSectorMap(m_closeAfterSuccessfulEnter,
                                                                                                                                  sessionRequestType, MyTextsWrapperEnum.StartEditorInProgressPleaseWait, MyConfig.LastSandboxSector)));
        }
        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));
            }
        }