public static MyGuiScreenSelectSandboxProgress CurrentScreen = null; // This is always filled with reference to actual instance of this scree. If there isn't, it's null. public MyGuiScreenSelectSandboxProgress(MyMwcSelectSectorRequestTypeEnum selectSandboxType, MyTextsWrapperEnum progressText, MyGuiScreenBase openAfterSuccessfulEnter, string findPlayerName, AddResponseDelegate responseHandler) : base(progressText, false) { m_selectSandboxType = selectSandboxType; m_backgroundFadeColor = MyGuiConstants.SCREEN_BACKGROUND_FADE_BLANK_DARK_PROGRESS_SCREEN; m_openAfterSuccessfulEnter = openAfterSuccessfulEnter; m_findPlayerName = findPlayerName; CurrentScreen = this; m_responseHandler = responseHandler; }
public static MyGuiScreenSelectSandboxProgress CurrentScreen = null; // This is always filled with reference to actual instance of this scree. If there isn't, it's null. public MyGuiScreenSelectSandboxProgress(MyMwcSelectSectorRequestTypeEnum selectSandboxType, MyTextsWrapperEnum progressText, MyGuiScreenBase openAfterSuccessfulEnter, string findPlayerName, AddResponseDelegate responseHandler) : base(progressText, false) { m_selectSandboxType = selectSandboxType; m_backgroundFadeColor = MyGuiConstants.SCREEN_BACKGROUND_FADE_BLANK_DARK_PROGRESS_SCREEN; m_openAfterSuccessfulEnter = openAfterSuccessfulEnter; m_findPlayerName = findPlayerName; CurrentScreen = this; m_responseHandler = responseHandler; }
void OnFriendsSectorsClick(MyGuiControlButton sender) { var enterFriendSectorMapScreen = new MyGuiScreenEnterFriendSectorMap(MyMwcStartSessionRequestTypeEnum.SANDBOX_FRIENDS, MyTextsWrapperEnum.StartGameInProgressPleaseWait, m_closeAfterSuccessfulEnter); enterFriendSectorMapScreen.CustomLoadAction = sector => StartSandbox(sector); string lastname = MyConfig.LastFriendName; MyMwcSelectSectorRequestTypeEnum startRequest = String.IsNullOrEmpty(lastname) ? MyMwcSelectSectorRequestTypeEnum.RANDOM_FRIENDS : MyMwcSelectSectorRequestTypeEnum.FIND_BY_PLAYER_NAME_FULLTEXT; MyGuiScreenMainMenu.AddLoginScreen(new MyGuiScreenSelectSandboxProgress(startRequest, MyTextsWrapperEnum.SelectSandboxInProgressPleaseWait, enterFriendSectorMapScreen, lastname, enterFriendSectorMapScreen.AddFriendSectorsResponse)); }