public KeyControl(KeyRebindTab parent, BoundKeyFunction function)
            {
                Function = function;
                var name = new Label
                {
                    Text = Loc.GetString(
                        $"ui-options-function-{CaseConversion.PascalToKebab(function.FunctionName)}"),
                    HorizontalExpand    = true,
                    HorizontalAlignment = HAlignment.Left
                };

                BindButton1 = new BindButton(parent, this, StyleBase.ButtonOpenRight);
                BindButton2 = new BindButton(parent, this, StyleBase.ButtonOpenLeft);
                ResetButton = new Button {
                    Text = Loc.GetString("ui-options-bind-reset"), StyleClasses = { StyleBase.ButtonCaution }
                };

                var hBox = new BoxContainer
                {
                    Orientation = LayoutOrientation.Horizontal,
                    Children    =
                    {
                        new Control {
                            MinSize = (5, 0)
                        },
        void ReleaseDesignerOutlets()
        {
            if (GuidLabel != null)
            {
                GuidLabel.Dispose();
                GuidLabel = null;
            }

            if (InvokeButton != null)
            {
                InvokeButton.Dispose();
                InvokeButton = null;
            }

            if (ExecuteButton != null)
            {
                ExecuteButton.Dispose();
                ExecuteButton = null;
            }

            if (BindButton != null)
            {
                BindButton.Dispose();
                BindButton = null;
            }
        }
Beispiel #3
0
                public KeyControl(KeyRebindControl parent, string niceName, BoundKeyFunction function)
                {
                    Function = function;
                    var name = new Label
                    {
                        Text = Loc.GetString(niceName),
                        SizeFlagsHorizontal = SizeFlags.Expand
                    };

                    BindButton1 = new BindButton(parent, this, StyleBase.ButtonOpenRight);
                    BindButton2 = new BindButton(parent, this, StyleBase.ButtonOpenLeft);
                    ResetButton = new Button {
                        Text = "Reset", StyleClasses = { StyleBase.ButtonCaution }
                    };

                    var hBox = new HBoxContainer
                    {
                        Children =
                        {
                            new Control {
                                CustomMinimumSize = (5, 0)
                            },
Beispiel #4
0
                public KeyControl(KeyRebindControl parent, string niceName, BoundKeyFunction function)
                {
                    Function = function;
                    var name = new Label
                    {
                        Text                = Loc.GetString(niceName),
                        HorizontalExpand    = true,
                        HorizontalAlignment = HAlignment.Left
                    };

                    BindButton1 = new BindButton(parent, this, StyleBase.ButtonOpenRight);
                    BindButton2 = new BindButton(parent, this, StyleBase.ButtonOpenLeft);
                    ResetButton = new Button {
                        Text = Loc.GetString("Reset"), StyleClasses = { StyleBase.ButtonCaution }
                    };

                    var hBox = new HBoxContainer
                    {
                        Children =
                        {
                            new Control {
                                MinSize = (5, 0)
                            },