コード例 #1
0
 public override void Activate()
 {
     MyScreenManager.CloseScreen(typeof(MyGuiScreenControlMenu));
     MyGuiSandbox.AddScreen
     (
         MyGuiScreenGamePlay.ActiveGameplayScreen = MyGuiSandbox.CreateScreen(MyPerGameSettings.GUI.ToolbarConfigScreen, 0, m_entity as MyShipController)
     );
 }
コード例 #2
0
 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));
            }
        }
コード例 #4
0
        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);
 }
コード例 #6
0
 public override void Activate()
 {
     MyScreenManager.CloseScreen(typeof(MyGuiScreenControlMenu));
     MyGuiSandbox.AddScreen(new Sandbox.Game.Screens.MyGuiScreenBriefing());
 }
コード例 #7
0
 public override void Activate()
 {
     MyScreenManager.CloseScreen(typeof(MyGuiScreenControlMenu));
     MyCubeBuilder.Static.EnableStationRotation();
 }
コード例 #8
0
 public override void Activate()
 {
     MyScreenManager.CloseScreen(typeof(MyGuiScreenControlMenu));
     m_character.UseTerminal();
 }
コード例 #9
0
 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();
 }