public override void Activate()
 {
     MyScreenManager.CloseScreen(typeof(MyGuiScreenControlMenu));
     MyGuiSandbox.AddScreen
     (
         MyGuiScreenGamePlay.ActiveGameplayScreen = MyGuiSandbox.CreateScreen(MyPerGameSettings.GUI.ToolbarConfigScreen, 0, m_entity as MyShipController)
     );
 }
 public override void Activate()
 {
     MyScreenManager.CloseScreen(typeof(MyGuiScreenControlMenu));
     if (Sync.IsServer)
     {
         MyGuiScreenGamePlay.Static.ShowLoadMessageBox(MySession.Static.CurrentPath);
     }
     else
     {
         MyGuiScreenGamePlay.Static.ShowReconnectMessageBox();
     }
 }
예제 #3
0
        public override void UpdateAfterSimulation()
        {
            base.UpdateAfterSimulation();
            if (IsBeingHacked)
            {
                PrivateDescription.Clear();
                SendChangeDescriptionMessage(PrivateDescription, false);
            }
            ResourceSink.Update();
            if (IsFunctional && IsWorking)
            {
                if (ShowTextOnScreen && IsInRange() == false)
                {
                    if (!m_isOutofRange)
                    {
                        m_isOutofRange = true;
                        ReleaseRenderTexture();
                    }
                    return;
                }

                if (ShowTextOnScreen && (NeedsToDrawText() || m_isOutofRange || m_forceUpdateText))
                {
                    m_descriptionChanged     = false;
                    m_forceUpdateText        = false;
                    m_fontColorChanged       = false;
                    m_fontSizeChanged        = false;
                    m_backgroundColorChanged = false;
                    m_fontChanged            = false;
                    Render.RenderTextToTexture(ShowTextFlag == ShowTextOnScreenFlag.PUBLIC ? m_publicDescription.ToString() : m_privateDescription.ToString(),
                                               FontSize * BlockDefinition.TextureResolution / DEFAULT_RESOLUTION, FontColor, BackgroundColor,
                                               BlockDefinition.TextureResolution, BlockDefinition.TextureAspectRadio);
                    FailedToRenderTexture = false;
                }

                m_isOutofRange = false;

                if (ShowTextOnScreen == false)
                {
                    UpdateTexture();
                }
            }
            else if (IsOpen)
            {
                SendChangeOpenMessage(false);
                if (m_textBox != null)
                {
                    m_textBox.CloseScreen();
                    //m_textBox = null;
                }
                MyScreenManager.CloseScreen(typeof(MyGuiScreenTerminal));
            }
        }
        public override void RecreateControls(bool constructor)
        {
            base.RecreateControls(constructor);
            // Mini loading screen
            MyGuiSandbox.AddScreen(
                new MyGuiScreenProgressAsync(
                    MyCommonTexts.LoadingPleaseWait,
                    null,
                    RunRefreshAsync,
                    (result, async) => { RefreshCampaignList(); MyScreenManager.CloseScreen(typeof(MyGuiScreenProgressAsync)); }
                    )
                );

            AddCaption(MyCommonTexts.ScreenMenuButtonCampaign);

            InitCampaignList();
            InitRightSide();

            m_campaignTypesGroup.SelectByKey(0);
        }
예제 #5
0
 private bool ReloadScreen()
 {
     MyScreenManager.CloseScreen(typeof(MyGuiScreenNewGame));
     MyScreenManager.AddScreen(new MyGuiScreenNewGame());
     return(true);
 }
 public override void Activate()
 {
     MyScreenManager.CloseScreen(typeof(MyGuiScreenControlMenu));
     MyGuiSandbox.AddScreen(new Sandbox.Game.Screens.MyGuiScreenBriefing());
 }
 public override void Activate()
 {
     MyScreenManager.CloseScreen(typeof(MyGuiScreenControlMenu));
     MyCubeBuilder.Static.EnableStationRotation();
 }
 public override void Activate()
 {
     MyScreenManager.CloseScreen(typeof(MyGuiScreenControlMenu));
     m_character.UseTerminal();
 }
 public override void Activate()
 {
     MyScreenManager.CloseScreen(typeof(MyGuiScreenControlMenu));
     MyGuiSandbox.AddScreen(MyGuiScreenGamePlay.ActiveGameplayScreen = new MyGuiScreenColorPicker());
 }
예제 #10
0
 public override void Activate()
 {
     MyScreenManager.CloseScreen(typeof(MyGuiScreenControlMenu));
     m_entity.ShowTerminal();
 }