Exemplo n.º 1
0
        public CheckBox() : base()
        {
            ToggleMode = true;

            var hBox = new HBoxContainer
            {
                StyleClasses = { StyleClassCheckBox },
                MouseFilter  = MouseFilterMode.Ignore
            };

            AddChild(hBox);

            TextureRect = new TextureRect
            {
                StyleClasses = { StyleClassCheckBox },
                MouseFilter  = MouseFilterMode.Ignore
            };
            hBox.AddChild(TextureRect);

            Label = new Label
            {
                MouseFilter = MouseFilterMode.Ignore
            };
            hBox.AddChild(Label);
        }
Exemplo n.º 2
0
        public AnimatedTextureRect()
        {
            IoCManager.InjectDependencies(this);

            DisplayRect = new TextureRect();
            AddChild(DisplayRect);
        }
Exemplo n.º 3
0
        public OptionButton()
        {
            Prefix     = "";
            OnPressed += _onPressed;

            var hBox = new HBoxContainer
            {
                MouseFilter = MouseFilterMode.Ignore
            };

            AddChild(hBox);

            _popup = new Popup();
            UserInterfaceManager.ModalRoot.AddChild(_popup);
            _popupVBox = new VBoxContainer();
            _popup.AddChild(_popupVBox);

            _label = new Label
            {
                StyleClasses        = { StyleClassOptionButton },
                SizeFlagsHorizontal = SizeFlags.FillExpand,
                MouseFilter         = MouseFilterMode.Ignore
            };
            hBox.AddChild(_label);

            var textureRect = new TextureRect
            {
                StyleClasses      = { StyleClassOptionTriangle },
                SizeFlagsVertical = SizeFlags.ShrinkCenter,
                MouseFilter       = MouseFilterMode.Ignore
            };

            hBox.AddChild(textureRect);
        }
Exemplo n.º 4
0
        public CheckBox() : base()
        {
            ToggleMode = true;

            var hBox = new HBoxContainer
            {
                StyleClasses = { StyleClassCheckBox },
            };

            AddChild(hBox);

            TextureRect = new TextureRect
            {
                StyleClasses = { StyleClassCheckBox },
            };
            hBox.AddChild(TextureRect);

            Label = new Label();
            hBox.AddChild(Label);
        }
Exemplo n.º 5
0
        public CheckBox()
        {
            ToggleMode = true;

            var hBox = new BoxContainer
            {
                Orientation  = BoxContainer.LayoutOrientation.Horizontal,
                StyleClasses = { StyleClassCheckBox },
            };

            AddChild(hBox);

            TextureRect = new TextureRect
            {
                StyleClasses = { StyleClassCheckBox },
            };
            hBox.AddChild(TextureRect);

            Label = new Label();
            hBox.AddChild(Label);
        }