当前位置: 首页>>代码示例>>C#>>正文


C# GUI.MyGuiControlCheckbox类代码示例

本文整理汇总了C#中Sandbox.Graphics.GUI.MyGuiControlCheckbox的典型用法代码示例。如果您正苦于以下问题:C# MyGuiControlCheckbox类的具体用法?C# MyGuiControlCheckbox怎么用?C# MyGuiControlCheckbox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MyGuiControlCheckbox类属于Sandbox.Graphics.GUI命名空间,在下文中一共展示了MyGuiControlCheckbox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BuildControls

        public void BuildControls()
        {
            MyGuiControlParent parent = new MyGuiControlParent(size: new Vector2(Size.Value.X - 0.05f, Size.Value.Y-0.1f));
            MyGuiControlScrollablePanel scrollPanel = new MyGuiControlScrollablePanel(parent);
            scrollPanel.ScrollbarVEnabled = true;
            scrollPanel.Size = new Vector2(Size.Value.X - 0.05f, 0.8f);
            Controls.Add(scrollPanel);

            Vector2 buttonSize = MyGuiConstants.BACK_BUTTON_SIZE;
            Vector2 buttonsOrigin = m_size.Value / 2 - new Vector2(0.23f, 0.03f);

            //AddCaption(MySpaceTexts.ScreenCaptionAdvancedSettings);
            // Ok/Cancel
            m_okButton = new MyGuiControlButton(position: buttonsOrigin - new Vector2(0.01f, 0f), size: buttonSize, text: MyTexts.Get(MyCommonTexts.Ok), onButtonClick: OkButtonClicked, originAlign: MyGuiDrawAlignEnum.HORISONTAL_RIGHT_AND_VERTICAL_BOTTOM);
            m_cancelButton = new MyGuiControlButton(position: buttonsOrigin + new Vector2(0.01f, 0f), size: buttonSize, text: MyTexts.Get(MyCommonTexts.Cancel), onButtonClick: CancelButtonClicked, originAlign: MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_BOTTOM);
            Controls.Add(m_okButton);
            Controls.Add(m_cancelButton);

            float buttonsOffset = 0.055f;

            var canJoinrunningLabel = MakeLabel(MySpaceTexts.ScenarioSettings_CanJoinRunning);
            m_canJoinRunning = new MyGuiControlCheckbox();
            m_canJoinRunning.Position = new Vector2(-scrollPanel.Size.X / 2 + buttonsOffset, -scrollPanel.Size.Y / 2 + buttonsOffset);
            canJoinrunningLabel.Position = new Vector2(m_canJoinRunning.Position.X + buttonsOffset, m_canJoinRunning.Position.Y);
            m_canJoinRunning.IsChecked = MySession.Static.Settings.CanJoinRunning;
            parent.Controls.Add(m_canJoinRunning);
            parent.Controls.Add(canJoinrunningLabel);

            CloseButtonEnabled = true;
        }
开发者ID:2asoft,项目名称:SpaceEngineers,代码行数:30,代码来源:MyGuiScreenAdvancedScenarioSettings.cs

示例2: RecreateControls

        public override void RecreateControls(bool constructor)
        {
            base.RecreateControls(constructor);

            base.m_position = new Vector2(MyGuiManager.GetMaxMouseCoord().X - 0.25f, 0.5f);

            var layout = new MyLayoutVertical(this, 35f);

            layout.Advance(20);

            {
                layout.Add(new MyGuiControlLabel(text: MyTexts.GetString(MyCommonTexts.BotSettingsScreen_Title)), MyAlignH.Center);
            }

            layout.Advance(30);

            {
                var enableDebuggingCheckBox = new MyGuiControlCheckbox(isChecked: MyDebugDrawSettings.DEBUG_DRAW_BOTS);
                enableDebuggingCheckBox.IsCheckedChanged += enableDebuggingCheckBox_IsCheckedChanged;
                layout.Add(new MyGuiControlLabel(text: MyTexts.GetString(MyCommonTexts.BotSettingsScreen_EnableBotsDebugging)), MyAlignH.Left, advance: false);
                layout.Add(enableDebuggingCheckBox, MyAlignH.Right);
            }

            layout.Advance(15);

            {
                MyGuiControlButton nextButton = new MyGuiControlButton(
                    text: MyTexts.Get(MyCommonTexts.BotSettingsScreen_NextBot),
                    onButtonClick: nextButton_OnButtonClick);
                MyGuiControlButton previousButton = new MyGuiControlButton(
                    text: MyTexts.Get(MyCommonTexts.BotSettingsScreen_PreviousBot),
                    onButtonClick: previousButton_OnButtonClick);
                layout.Add(nextButton, previousButton);
            }

            layout.Advance(30);

            {
                layout.Add(new MyGuiControlButton(text: MyTexts.Get(MyCommonTexts.Close), onButtonClick: OnCloseClicked), MyAlignH.Center);
            }
        }
开发者ID:2asoft,项目名称:SpaceEngineers,代码行数:41,代码来源:MyGuiScreenBotSettings.cs

示例3: MyGuiControlOnOffSwitch

        // mk:TODO Modify MyGuiControlList to allow different alignments and remove scale from this control.
        public MyGuiControlOnOffSwitch(
            bool initialValue = false,
            String onText = null,
            String offText = null)
        : base(canHaveFocus: true)
        {
            m_onButton = new MyGuiControlCheckbox(
                visualStyle: MyGuiControlCheckboxStyleEnum.SwitchOnOffLeft,
                originAlign: MyGuiDrawAlignEnum.HORISONTAL_RIGHT_AND_VERTICAL_CENTER);

            m_offButton = new MyGuiControlCheckbox(
                visualStyle: MyGuiControlCheckboxStyleEnum.SwitchOnOffRight,
                originAlign: MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER);

            m_onLabel = new MyGuiControlLabel(
                position: new Vector2(m_onButton.Size.X * -0.5f, 0.0f),
                text: onText ?? MyTexts.GetString(MySpaceTexts.SwitchText_On),
                originAlign: MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER);

            m_offLabel = new MyGuiControlLabel(
                position: new Vector2(m_onButton.Size.X * 0.5f, 0.0f),
                text: offText ?? MyTexts.GetString(MySpaceTexts.SwitchText_Off),
                originAlign: MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER);

            // Set the size to contain the 2 buttons and space between them.
            // Buttons should not overlap, otherwise this will give us wrong results.
            Size = new Vector2(m_onButton.Size.X + m_offButton.Size.X, Math.Max(m_onButton.Size.Y, m_offButton.Size.Y));

            Elements.Add(m_onButton);
            Elements.Add(m_offButton);
            Elements.Add(m_onLabel);
            Elements.Add(m_offLabel);

            m_value = initialValue;
            UpdateButtonState();
        }
开发者ID:fluxit,项目名称:SpaceEngineers,代码行数:37,代码来源:MyGuiControlOnOffSwitch.cs

示例4: AddGeneralControls

        private void AddGeneralControls()
        {
            m_allControls[MyGuiControlTypeEnum.General] = new List<MyGuiControlBase>();


            MyGuiControlLabel tmp = MakeLabel(2f, MyCommonTexts.InvertMouseX);
            m_allControls[MyGuiControlTypeEnum.General].Add(MakeLabel(2f, MyCommonTexts.InvertMouseX));
            m_allControls[MyGuiControlTypeEnum.General].Add(MakeLabel(3f, MyCommonTexts.InvertMouseY));
            m_allControls[MyGuiControlTypeEnum.General].Add(MakeLabel(4f, MyCommonTexts.MouseSensitivity));

            m_invertMouseXCheckbox = new MyGuiControlCheckbox(
                     position: m_controlsOriginRight + 2 * MyGuiConstants.CONTROLS_DELTA,
                     isChecked: MyInput.Static.GetMouseXInversion(),
                     originAlign: MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER);

            m_allControls[MyGuiControlTypeEnum.General].Add(m_invertMouseXCheckbox);


            m_invertMouseYCheckbox = new MyGuiControlCheckbox(
                 position: m_controlsOriginRight + 3 * MyGuiConstants.CONTROLS_DELTA,
                 isChecked: MyInput.Static.GetMouseYInversion(),
                 originAlign: MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER);

            m_allControls[MyGuiControlTypeEnum.General].Add(m_invertMouseYCheckbox);

            m_mouseSensitivitySlider = new MyGuiControlSlider(
                position: m_controlsOriginRight + 4 * MyGuiConstants.CONTROLS_DELTA,
                minValue: 0.0f,
                maxValue: 3.0f,
                defaultValue: MyInput.Static.GetMouseSensitivity(),
                originAlign: MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER);
            m_allControls[MyGuiControlTypeEnum.General].Add(m_mouseSensitivitySlider);

            if (MyFakes.ENABLE_JOYSTICK_SETTINGS)
            {
                const float multiplierJoystick = 6.5f;
                const float multiplierSensitivity = 8;
                const float multiplierExponent = 9;
                const float multiplierDeadzone = 10;

                m_allControls[MyGuiControlTypeEnum.General].Add(MakeLabel(multiplierJoystick, MyCommonTexts.Joystick));
                m_allControls[MyGuiControlTypeEnum.General].Add(MakeLabel(multiplierSensitivity, MyCommonTexts.JoystickSensitivity));
                m_allControls[MyGuiControlTypeEnum.General].Add(MakeLabel(multiplierExponent, MyCommonTexts.JoystickExponent));
                m_allControls[MyGuiControlTypeEnum.General].Add(MakeLabel(multiplierDeadzone, MyCommonTexts.JoystickDeadzone));

                m_joystickCombobox = new MyGuiControlCombobox(m_controlsOriginRight + multiplierJoystick * MyGuiConstants.CONTROLS_DELTA + new Vector2(MyGuiConstants.COMBOBOX_MEDIUM_SIZE.X / 2.0f, 0));
                m_joystickCombobox.ItemSelected += OnSelectJoystick;
                AddJoysticksToComboBox();
                m_joystickCombobox.Enabled = !MyFakes.ENFORCE_CONTROLLER || !MyInput.Static.IsJoystickConnected();
                m_allControls[MyGuiControlTypeEnum.General].Add(m_joystickCombobox);

                m_joystickSensitivitySlider = new MyGuiControlSlider(
                    position: m_controlsOriginRight + multiplierSensitivity * MyGuiConstants.CONTROLS_DELTA + new Vector2(MyGuiConstants.COMBOBOX_MEDIUM_SIZE.X / 2.0f, 0),
                    minValue: 0.1f,
                    maxValue: 6.0f);
                m_joystickSensitivitySlider.Value = MyInput.Static.GetJoystickSensitivity();
                m_allControls[MyGuiControlTypeEnum.General].Add(m_joystickSensitivitySlider);

                m_joystickExponentSlider = new MyGuiControlSlider(
                    position: m_controlsOriginRight + multiplierExponent * MyGuiConstants.CONTROLS_DELTA + new Vector2(MyGuiConstants.COMBOBOX_MEDIUM_SIZE.X / 2.0f, 0),
                    minValue: 1.0f,
                    maxValue: 8.0f);
                m_joystickExponentSlider.Value = MyInput.Static.GetJoystickExponent();
                m_allControls[MyGuiControlTypeEnum.General].Add(m_joystickExponentSlider);

                m_joystickDeadzoneSlider = new MyGuiControlSlider(
                    position: m_controlsOriginRight + multiplierDeadzone * MyGuiConstants.CONTROLS_DELTA + new Vector2(MyGuiConstants.COMBOBOX_MEDIUM_SIZE.X / 2.0f, 0),
                    minValue: 0.0f,
                    maxValue: 0.5f);
                m_joystickDeadzoneSlider.Value = MyInput.Static.GetJoystickDeadzone();
                m_allControls[MyGuiControlTypeEnum.General].Add(m_joystickDeadzoneSlider);
            }

        }
开发者ID:stanhebben,项目名称:SpaceEngineers,代码行数:74,代码来源:MyGuiScreenOptionsControls.cs

示例5: RecreateControls

        public override void RecreateControls(bool constructor)
        {
            if (!constructor)
                return;

            base.RecreateControls(constructor);

            AddCaption(MyTexts.GetString(MyCommonTexts.ScreenCaptionGraphicsOptions));

            const float TEXT_SCALE = Sandbox.Graphics.GUI.MyGuiConstants.DEFAULT_TEXT_SCALE * 0.85f;

            var labelRenderer               = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MySpaceTexts.ScreenGraphicsOptions_Renderer));
            var labelHwCursor               = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MyCommonTexts.HardwareCursor));
            var labelFov                    = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MyCommonTexts.FieldOfView));
            var labelFovDefault             = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MyCommonTexts.DefaultFOV));
            var labelRenderInterpolation    = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MyCommonTexts.RenderIterpolation));
            var labelAntiAliasing           = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_AntiAliasing));
            var labelShadowMapResolution    = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MySpaceTexts.ScreenGraphicsOptions_ShadowMapResolution));
            var labelMultithreadedRendering = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_MultiThreadedRendering));
            //var labelTonemapping            = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_Tonemapping));
            var labelTextureQuality         = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_TextureQuality));
            var labelVoxelQuality           = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MySpaceTexts.ScreenGraphicsOptions_VoxelQuality));
            var labelAnisotropicFiltering   = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_AnisotropicFiltering));
            var labelGraphicsPresets        = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_QualityPreset));
            var labelFoliageDetails         = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_FoliageDetails));
            var labelGrassDensity           = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MyCommonTexts.WorldSettings_GrassDensity));
            var labelEnableDamageEffects    = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MySpaceTexts.EnableDamageEffects));

            var labelVegetationDistance = new MyGuiControlLabel(textScale: TEXT_SCALE, text: MyTexts.GetString(MyCommonTexts.WorldSettings_VegetationDistance));

            m_comboRenderer               = new MyGuiControlCombobox(toolTip: MyTexts.GetString(MySpaceTexts.ToolTipVideoOptionsRenderer));
            m_comboGraphicsPresets        = new MyGuiControlCombobox();
            m_comboAntialiasing           = new MyGuiControlCombobox();
            m_comboShadowMapResolution    = new MyGuiControlCombobox();
            m_comboTextureQuality         = new MyGuiControlCombobox();
            m_comboAnisotropicFiltering   = new MyGuiControlCombobox();
            m_checkboxHardwareCursor      = new MyGuiControlCheckbox(toolTip: MyTexts.GetString(MyCommonTexts.ToolTipVideoOptionsHardwareCursor));
            m_checkboxRenderInterpolation = new MyGuiControlCheckbox(toolTip: MyTexts.GetString(MyCommonTexts.ToolTipVideoOptionRenderIterpolation));
            //m_checkboxMultithreadedRender = new MyGuiControlCheckbox();
            //m_checkboxTonemapping         = new MyGuiControlCheckbox();
            m_checkboxEnableDamageEffects = new MyGuiControlCheckbox(toolTip: MyTexts.GetString(MySpaceTexts.ToolTipVideoOptionsEnableDamageEffects));
            m_sliderFov                   = new MyGuiControlSlider(toolTip: MyTexts.GetString(MyCommonTexts.ToolTipVideoOptionsFieldOfView),
                labelText: new StringBuilder("{0}").ToString(),
                labelSpaceWidth: 0.035f,
                labelScale: TEXT_SCALE,
                labelFont: MyFontEnum.Blue,
                defaultValue: MathHelper.ToDegrees(MySandboxGame.Config.FieldOfView));

            m_comboVoxelQuality = new MyGuiControlCombobox();

            m_comboFoliageDetails = new MyGuiControlCombobox();
            m_grassDensitySlider = new MyGuiControlSlider(minValue: 0f, maxValue: 10f,
                labelText: new StringBuilder("{0}").ToString(),
                labelSpaceWidth: 0.035f,
                labelScale: TEXT_SCALE,
                labelFont: MyFontEnum.Blue,
                defaultValue: MySandboxGame.Config.GrassDensityFactor);

            /* Vegetation View Distance */

            m_vegetationViewDistance = new MyGuiControlSliderBase(
                props: new MyGuiSliderPropertiesExponential(100, 10 * 1000, 10, true),
                labelSpaceWidth: 0.063f,
                labelScale: TEXT_SCALE,
                labelFont: MyFontEnum.Blue);
            m_vegetationViewDistance.DefaultRatio = m_vegetationViewDistance.Propeties.ValueToRatio(MySandboxGame.Config.VegetationDrawDistance);

            var okButton = new MyGuiControlButton(text: MyTexts.Get(MyCommonTexts.Ok), onButtonClick: OnOkClick);
            var cancelButton = new MyGuiControlButton(text: MyTexts.Get(MyCommonTexts.Cancel), onButtonClick: OnCancelClick);

            m_comboGraphicsPresets.AddItem((int)PresetEnum.Low, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_QualityPreset_Low));
            m_comboGraphicsPresets.AddItem((int)PresetEnum.Medium, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_QualityPreset_Medium));
            m_comboGraphicsPresets.AddItem((int)PresetEnum.High, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_QualityPreset_High));
            m_comboGraphicsPresets.AddItem((int)PresetEnum.Custom, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_QualityPreset_Custom));

            m_comboAntialiasing.AddItem((int)MyAntialiasingMode.NONE, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_AntiAliasing_None));
            m_comboAntialiasing.AddItem((int)MyAntialiasingMode.FXAA, "FXAA");
            //m_comboAntialiasing.AddItem((int)MyAntialiasingMode.MSAA_2, "MSAA 2x");
            //m_comboAntialiasing.AddItem((int)MyAntialiasingMode.MSAA_4, "MSAA 4x");
            //m_comboAntialiasing.AddItem((int)MyAntialiasingMode.MSAA_8, "MSAA 8x");

            m_comboShadowMapResolution.AddItem((int)MyShadowsQuality.DISABLED, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_ShadowMapResolution_Disabled));
            m_comboShadowMapResolution.AddItem((int)MyShadowsQuality.LOW, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_ShadowMapResolution_Low));
            m_comboShadowMapResolution.AddItem((int)MyShadowsQuality.MEDIUM, MyTexts.GetString(MySpaceTexts.ScreenGraphicsOptions_ShadowMapResolution_Medium));
            m_comboShadowMapResolution.AddItem((int)MyShadowsQuality.HIGH, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_ShadowMapResolution_High));

            m_comboTextureQuality.AddItem((int)MyTextureQuality.LOW, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_TextureQuality_Low));
            m_comboTextureQuality.AddItem((int)MyTextureQuality.MEDIUM, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_TextureQuality_Medium));
            m_comboTextureQuality.AddItem((int)MyTextureQuality.HIGH, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_TextureQuality_High));

            m_comboAnisotropicFiltering.AddItem((int)MyTextureAnisoFiltering.NONE, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_AnisotropicFiltering_Off));
            m_comboAnisotropicFiltering.AddItem((int)MyTextureAnisoFiltering.ANISO_1, "1x");
            m_comboAnisotropicFiltering.AddItem((int)MyTextureAnisoFiltering.ANISO_4, "4x");
            m_comboAnisotropicFiltering.AddItem((int)MyTextureAnisoFiltering.ANISO_8, "8x");
            m_comboAnisotropicFiltering.AddItem((int)MyTextureAnisoFiltering.ANISO_16, "16x");

            m_comboFoliageDetails.AddItem((int)MyFoliageDetails.DISABLED, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_FoliageDetails_Disabled));
            m_comboFoliageDetails.AddItem((int)MyFoliageDetails.LOW, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_FoliageDetails_Low));
            m_comboFoliageDetails.AddItem((int)MyFoliageDetails.MEDIUM, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_FoliageDetails_Medium));
            m_comboFoliageDetails.AddItem((int)MyFoliageDetails.HIGH, MyTexts.GetString(MyCommonTexts.ScreenGraphicsOptions_FoliageDetails_High));
//.........这里部分代码省略.........
开发者ID:rem02,项目名称:SpaceEngineers,代码行数:101,代码来源:MyGuiScreenOptionsGraphics.cs

示例6: MakeCheckbox

 private MyGuiControlCheckbox MakeCheckbox(Vector2 position, MyStringId tooltip)
 {
     var checkbox = new MyGuiControlCheckbox(position: position, originAlign: MyGuiDrawAlignEnum.HORISONTAL_RIGHT_AND_VERTICAL_CENTER, toolTip: MyTexts.GetString(tooltip));
     checkbox.IsCheckedChanged += OnCheckboxChanged;
     return checkbox;
 }
开发者ID:Krulac,项目名称:SpaceEngineers,代码行数:6,代码来源:MyGuiScreenWorkshopTags.cs

示例7: SoloChanged

 void SoloChanged(MyGuiControlCheckbox checkbox)
 {
     if (m_canUpdateValues)
     {
         if (checkbox.IsChecked)
             MyAudio.Static.SoloCue = m_currentCue;
         else
             MyAudio.Static.SoloCue = null;
     }
 }
开发者ID:fluxit,项目名称:SpaceEngineers,代码行数:10,代码来源:MyGuiScreenDebugAudio.cs

示例8: HideEmptyRight_Checked

        private void HideEmptyRight_Checked(MyGuiControlCheckbox obj)
        {
            if (m_rightFilterType == MyInventoryOwnerTypeEnum.Character)
                return;

            SearchInList(m_blockSearchRight, m_rightOwnersControl, obj.IsChecked);
        }
开发者ID:ChristianHeinz71,项目名称:SpaceEngineers,代码行数:7,代码来源:MyTerminalInventoryController.cs

示例9: pivotBtn_IsCheckedChanged

 void pivotBtn_IsCheckedChanged(MyGuiControlCheckbox obj)
 {
     MyCubeGrid.ShowGridPivot = obj.IsChecked;
 }
开发者ID:fluxit,项目名称:SpaceEngineers,代码行数:4,代码来源:MyTerminalInfoController.cs

示例10: centerBtn_IsCheckedChanged

 void centerBtn_IsCheckedChanged(MyGuiControlCheckbox obj)
 {
     MyCubeGrid.ShowCenterOfMass = obj.IsChecked;
 }
开发者ID:fluxit,项目名称:SpaceEngineers,代码行数:4,代码来源:MyTerminalInfoController.cs

示例11: showGravityGizmos_IsCheckedChanged

 void showGravityGizmos_IsCheckedChanged(MyGuiControlCheckbox obj)
 {
     MyCubeGrid.ShowGravityGizmos = obj.IsChecked;
 }
开发者ID:fluxit,项目名称:SpaceEngineers,代码行数:4,代码来源:MyTerminalInfoController.cs

示例12: showAntenaGizmos_IsCheckedChanged

 void showAntenaGizmos_IsCheckedChanged(MyGuiControlCheckbox obj)
 {
     MyCubeGrid.ShowAntennaGizmos = obj.IsChecked;
 }
开发者ID:fluxit,项目名称:SpaceEngineers,代码行数:4,代码来源:MyTerminalInfoController.cs

示例13: BuildControls


//.........这里部分代码省略.........
            // Add controls in pairs; label first, control second. They will be laid out automatically this way.
            Controls.Add(nameLabel);
            Controls.Add(m_nameTextbox);
            Controls.Add(descriptionLabel);
            Controls.Add(m_descriptionTextbox);

            Controls.Add(gameModeLabel);
            Controls.Add(m_creativeModeButton);

            if (MyFakes.ENABLE_NEW_SOUNDS)
            {
                Controls.Add(soundModeLabel);
                Controls.Add(m_soundModeCombo);
            }

            Controls.Add(onlineModeLabel);
            Controls.Add(m_onlineMode);
            Controls.Add(m_maxPlayersLabel);
            Controls.Add(m_maxPlayersSlider);

            if (MyFakes.ENABLE_METEOR_SHOWERS)
            {
                Controls.Add(environmentLabel);
                Controls.Add(m_environment);
            }

            if (m_isNewGame && MyFakes.ENABLE_PLANETS == false)
            {
                Controls.Add(m_asteroidAmountLabel);
                Controls.Add(m_asteroidAmountCombo);
            }

            var autoSaveLabel = MakeLabel(MyCommonTexts.WorldSettings_AutoSave);
            m_autoSave = new MyGuiControlCheckbox();
            m_autoSave.SetToolTip(new StringBuilder().AppendFormat(MyCommonTexts.ToolTipWorldSettingsAutoSave, MyObjectBuilder_SessionSettings.DEFAULT_AUTOSAVE_IN_MINUTES).ToString());
            Controls.Add(autoSaveLabel);
            Controls.Add(m_autoSave);

            var scenarioEditModeLabel = MakeLabel(MySpaceTexts.WorldSettings_ScenarioEditMode);
            m_scenarioEditMode = new MyGuiControlCheckbox();
            m_scenarioEditMode.SetToolTip(MyTexts.GetString(MySpaceTexts.ToolTipWorldSettings_ScenarioEditMode));

            Controls.Add(scenarioEditModeLabel);
            Controls.Add(m_scenarioEditMode);

#if !XB1 // XB1_NOWORKSHOP
            if (!MyFakes.XB1_PREVIEW)
                if (MyFakes.ENABLE_WORKSHOP_MODS)
                    Controls.Add(mods);
#endif // !XB1

            Controls.Add(advanced);

            if (m_isNewGame && MyFakes.ENABLE_PLANETS == true)
            {
                Controls.Add(m_worldGeneratorButton);
            }

            float labelSize = 0.20f;

            float MARGIN_TOP = 0.12f;
            float MARGIN_BOTTOM = 0.12f;
            float MARGIN_LEFT = m_isNewGame ? 0.315f : 0.08f;
            float MARGIN_RIGHT = m_isNewGame ? 0.075f : 0.045f;

            // Automatic layout.
开发者ID:rem02,项目名称:SpaceEngineers,代码行数:67,代码来源:MyGuiScreenWorldSettings.cs

示例14: ApplyTypeGroupSelectionChange

        private void ApplyTypeGroupSelectionChange(
            MyGuiControlRadioButtonGroup obj,
            ref bool showsGrid,
            MyGuiControlList targetControlList,
            MyInventoryOwnerTypeEnum? filterType,
            MyGuiControlRadioButtonGroup filterButtonGroup,
            MyGuiControlCheckbox showEmpty,
            MyGuiControlLabel    showEmptyLabel,
            MyGuiControlTextbox blockSearch,
            MyGuiControlButton  blockSearchClear,
            bool isLeftControllist)
        {
            switch (obj.SelectedButton.VisualStyle)
            {
                case MyGuiControlRadioButtonStyleEnum.FilterCharacter:
                    showsGrid = false;

                    showEmpty.Visible        = false;
                    showEmptyLabel.Visible   = false;
                    blockSearch.Visible      = false;
                    blockSearchClear.Visible = false;

                    targetControlList.Position = (isLeftControllist) ? m_leftControlListPosition : m_rightControlListPosition;
                    targetControlList.Size     = m_controlListFullSize;

                    // hack to allow looting, force user on left and interacted corpse on right
                    if (targetControlList == m_leftOwnersControl)
                        CreateInventoryControlInList(m_userAsOwner, targetControlList);
                    else
                        CreateInventoryControlInList(m_interactedAsOwner, targetControlList);
                    break;

                case MyGuiControlRadioButtonStyleEnum.FilterGrid:
                    showsGrid = true;
                    CreateInventoryControlsInList(m_interactedGridOwners, targetControlList, filterType);

                    showEmpty.Visible        = true;
                    showEmptyLabel.Visible   = true;
                    blockSearch.Visible      = true;
                    blockSearchClear.Visible = true;

                    blockSearch.Text = blockSearch.Text;

                    targetControlList.Position = (isLeftControllist) ? m_leftControlListPosWithSearch : m_rightControlListPosWithSearch;
                    targetControlList.Size     = m_controlListSizeWithSearch;
                    break;

                default:
                    Debug.Assert(false, "Invalid branch!");
                    break;
            }
            foreach (var button in filterButtonGroup)
                button.Visible = button.Enabled = showsGrid;

            RefreshSelectedInventoryItem();

            //GR: Do this to return the scrolbar position to zero. Other solution would be to add it to Scrollbar Init but that would cause other bugs so I commented it out for now
            targetControlList.SetScrollBarPage();
        }
开发者ID:ChristianHeinz71,项目名称:SpaceEngineers,代码行数:59,代码来源:MyTerminalInventoryController.cs

示例15: setDestructibleBlocksBtn_IsCheckedChanged

 void setDestructibleBlocksBtn_IsCheckedChanged(MyGuiControlCheckbox obj)
 {
     m_grid.SyncObject.SetDestructibleBlocks(obj.IsChecked);
 }
开发者ID:fluxit,项目名称:SpaceEngineers,代码行数:4,代码来源:MyTerminalInfoController.cs


注:本文中的Sandbox.Graphics.GUI.MyGuiControlCheckbox类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。