예제 #1
0
        private void SetupSpaceshipScreen(MyShipController ship)
        {
            m_lightsControlHelper.SetEntity(ship);
            m_dampingControlHelper.SetEntity(ship);
            m_landingGearsControlHelper.SetEntity(ship);
            m_connectorControlHelper.SetEntity(ship);
            m_reactorsControlHelper.SetEntity(ship);
            m_showBuildScreenControlHelper.SetEntity(ship);
            m_showTerminalControlHelper.SetEntity(ship);

            m_controlMenu = new MyGuiScreenControlMenu();

            m_controlMenu.AddItem(m_showTerminalControlHelper);
            m_controlMenu.AddItem(m_showBuildScreenControlHelper);

            m_controlMenu.AddItem(m_quickLoadControlHelper);
            m_controlMenu.AddItem(m_hudToggleControlHelper);

            m_controlMenu.AddItem(m_lightsControlHelper);
            m_controlMenu.AddItem(m_dampingControlHelper);
            m_controlMenu.AddItem(m_landingGearsControlHelper);
            m_controlMenu.AddItem(m_connectorControlHelper);
            m_controlMenu.AddItem(m_reactorsControlHelper);

            m_controlMenu.AddItem(m_cameraModeControlHelper);
        }
        private void AddUseObjectControl(MyCharacter character)
        {
            MyCharacterDetectorComponent detectorComponent = character.Components.Get <MyCharacterDetectorComponent>();

            if (detectorComponent != null)
            {
                if (detectorComponent.UseObject is MyUseObjectDoorTerminal ||
                    detectorComponent.UseObject is MyUseObjectTerminal ||
                    detectorComponent.UseObject is MyUseObjectTextPanel)
                {
                    m_terminalControlHelper.SetLabel(MySpaceTexts.ControlMenuItemLabel_ShowControlPanel);
                    m_controlMenu.AddItem(m_terminalControlHelper);
                }
                else if (detectorComponent.UseObject is MyUseObjectInventory)
                {
                    m_terminalControlHelper.SetLabel(MySpaceTexts.ControlMenuItemLabel_OpenInventory);
                    m_controlMenu.AddItem(m_terminalControlHelper);
                }
                else if (detectorComponent.UseObject is MyUseObjectPanelButton)
                {
                    m_terminalControlHelper.SetLabel(MySpaceTexts.ControlMenuItemLabel_SetupButtons);
                    m_controlMenu.AddItem(m_terminalControlHelper);
                }
                //else if (character.IsUseObjectOfType<MyUseObjectWardrobe>())
                //{
                //    m_terminalControlHelper.SetLabel(MySpaceTexts.ControlMenuItemLabel_Wardrobe);
                //    m_controlMenu.AddItem(m_terminalControlHelper);
                //}
            }
        }
 private void AddUseObjectControl(MyCharacter character)
 {
     if (character.IsUseObjectOfType <MyUseObjectDoorTerminal>() ||
         character.IsUseObjectOfType <MyUseObjectTerminal>() ||
         character.IsUseObjectOfType <MyUseObjectTextPanel>())
     {
         m_terminalControlHelper.SetLabel(MySpaceTexts.ControlMenuItemLabel_ShowControlPanel);
         m_controlMenu.AddItem(m_terminalControlHelper);
     }
     else if (character.IsUseObjectOfType <MyUseObjectInventory>())
     {
         m_terminalControlHelper.SetLabel(MySpaceTexts.ControlMenuItemLabel_OpenInventory);
         m_controlMenu.AddItem(m_terminalControlHelper);
     }
     else if (character.IsUseObjectOfType <MyUseObjectPanelButton>())
     {
         m_terminalControlHelper.SetLabel(MySpaceTexts.ControlMenuItemLabel_SetupButtons);
         m_controlMenu.AddItem(m_terminalControlHelper);
     }
     //else if (character.IsUseObjectOfType<MyUseObjectWardrobe>())
     //{
     //    m_terminalControlHelper.SetLabel(MySpaceTexts.ControlMenuItemLabel_Wardrobe);
     //    m_controlMenu.AddItem(m_terminalControlHelper);
     //}
 }
        private void SetupCharacterScreen(MyCharacter character)
        {
            m_lightsControlHelper.SetEntity(character);
            m_dampingControlHelper.SetEntity(character);
            m_broadcastingControlHelper.SetEntity(character);
            m_helmetControlHelper.SetEntity(character);
            m_jetpackControlHelper.SetEntity(character);
            m_showBuildScreenControlHelper.SetEntity(character);
            m_showTerminalControlHelper.SetEntity(character);
            m_suicideControlHelper.SetCharacter(character);
            m_terminalControlHelper.SetCharacter(character);

            m_controlMenu = new MyGuiScreenControlMenu();

            m_controlMenu.AddItem(m_showTerminalControlHelper);
            m_controlMenu.AddItem(m_showBuildScreenControlHelper);

            if (MyCubeBuilder.Static.ShipCreationIsActivated)
            {
                m_controlMenu.AddItem(m_enableStationRotationControlHelper);
            }

            m_controlMenu.AddItem(m_quickLoadControlHelper);
            m_controlMenu.AddItem(m_hudToggleControlHelper);

            m_controlMenu.AddItem(m_jetpackControlHelper);
            m_controlMenu.AddItem(m_lightsControlHelper);
            m_controlMenu.AddItem(m_dampingControlHelper);
            m_controlMenu.AddItem(m_helmetControlHelper);
            m_controlMenu.AddItem(m_broadcastingControlHelper);

            m_controlMenu.AddItem(m_cameraModeControlHelper);

            AddUseObjectControl(character);

            if (MySession.Static.SurvivalMode)
            {
                m_controlMenu.AddItem(m_suicideControlHelper);
            }
        }
        private void SetupCharacterScreen(MyCharacter character)
        {
            m_lightsControlHelper.SetEntity(character);
            m_dampingControlHelper.SetEntity(character);
            m_broadcastingControlHelper.SetEntity(character);
            m_helmetControlHelper.SetEntity(character);
            m_jetpackControlHelper.SetEntity(character);
            m_showBuildScreenControlHelper.SetEntity(character);
            m_showTerminalControlHelper.SetEntity(character);
            m_suicideControlHelper.SetCharacter(character);
            m_terminalControlHelper.SetCharacter(character);

            m_controlMenu = new MyGuiScreenControlMenu();

            m_controlMenu.AddItem(m_showTerminalControlHelper);
            m_controlMenu.AddItem(m_showBuildScreenControlHelper);

            m_controlMenu.AddItem(m_quickLoadControlHelper);
            m_controlMenu.AddItem(m_hudToggleControlHelper);

            m_controlMenu.AddItem(m_jetpackControlHelper);
            m_controlMenu.AddItem(m_lightsControlHelper);
            m_controlMenu.AddItem(m_dampingControlHelper);
            m_controlMenu.AddItem(m_helmetControlHelper);
            m_controlMenu.AddItem(m_broadcastingControlHelper);

            m_controlMenu.AddItem(m_cameraModeControlHelper);

            AddUseObjectControl(character);

            if (MySession.Static.SurvivalMode)
                m_controlMenu.AddItem(m_suicideControlHelper);
        }
        private void SetupSpaceshipScreen(MyShipController ship)
        {
            m_lightsControlHelper.SetEntity(ship);
            m_dampingControlHelper.SetEntity(ship);
            m_landingGearsControlHelper.SetEntity(ship);
            m_reactorsControlHelper.SetEntity(ship);
            m_showBuildScreenControlHelper.SetEntity(ship);
            m_showTerminalControlHelper.SetEntity(ship);

            m_controlMenu = new MyGuiScreenControlMenu();

            m_controlMenu.AddItem(m_showTerminalControlHelper);
            m_controlMenu.AddItem(m_showBuildScreenControlHelper);

            m_controlMenu.AddItem(m_quickLoadControlHelper);
            m_controlMenu.AddItem(m_hudToggleControlHelper);

            m_controlMenu.AddItem(m_lightsControlHelper);
            m_controlMenu.AddItem(m_dampingControlHelper);
            m_controlMenu.AddItem(m_landingGearsControlHelper);
            m_controlMenu.AddItem(m_reactorsControlHelper);

            m_controlMenu.AddItem(m_cameraModeControlHelper);
        }
        private void SetupCharacterScreen(MyCharacter character)
        {
            m_lightsControlHelper.SetEntity(character);
            m_dampingControlHelper.SetEntity(character);
            m_broadcastingControlHelper.SetEntity(character);
            m_helmetControlHelper.SetEntity(character);
            m_jetpackControlHelper.SetEntity(character);
            m_showBuildScreenControlHelper.SetEntity(character);
            m_showTerminalControlHelper.SetEntity(character);
            m_suicideControlHelper.SetCharacter(character);
            m_terminalControlHelper.SetCharacter(character);

            m_controlMenu = new MyGuiScreenControlMenu();

            m_controlMenu.AddItem(m_showTerminalControlHelper);
            m_controlMenu.AddItem(m_showBuildScreenControlHelper);

            if (MyCubeBuilder.Static.ShipCreationIsActivated)
            {
                m_controlMenu.AddItem(m_enableStationRotationControlHelper);
            }

            m_controlMenu.AddItem(m_colorPickerControlHelper);

            if (MySession.Static.IsScenario)
                m_controlMenu.AddItem(m_briefingMenuControlHelper);

            m_controlMenu.AddItem(m_quickLoadControlHelper);
            m_controlMenu.AddItem(m_hudToggleControlHelper);

            m_controlMenu.AddItem(m_jetpackControlHelper);
            m_controlMenu.AddItem(m_lightsControlHelper);
            m_controlMenu.AddItem(m_dampingControlHelper);
            m_controlMenu.AddItem(m_helmetControlHelper);
            m_controlMenu.AddItem(m_broadcastingControlHelper);

            m_controlMenu.AddItem(m_cameraModeControlHelper);

            AddUseObjectControl(character);

            if (MySession.Static.SurvivalMode)
                m_controlMenu.AddItem(m_suicideControlHelper);
        }