Example #1
0
        public override void Apply(ManagedComponent.ComponentAttributes componentAttributes)
        {
            var attributes = componentAttributes as ComponentAttributes;

            if (!attributes)
            {
                return;
            }

            ContentSizeFitter.horizontalFit = attributes.HorizontalFit;
            ContentSizeFitter.verticalFit   = attributes.VerticalFit;
        }
Example #2
0
        public override void Apply(ManagedComponent.ComponentAttributes componentAttributes)
        {
            var attributes = componentAttributes as ComponentAttributes;

            if (!attributes)
            {
                return;
            }

            LayoutElement.minWidth        = attributes.MinimalWidth;
            LayoutElement.minHeight       = attributes.MinimalHeight;
            LayoutElement.preferredWidth  = attributes.PreferredWidth;
            LayoutElement.preferredHeight = attributes.PreferredHeight;
            LayoutElement.flexibleWidth   = attributes.FlexibleWidth;
            LayoutElement.flexibleHeight  = attributes.FlexibleHeight;
        }
Example #3
0
        public override void Apply(ManagedComponent.ComponentAttributes componentAttributes)
        {
            var attributes = componentAttributes as ComponentAttributes;

            if (!attributes)
            {
                return;
            }

            Text.fontStyle          = attributes.FontStyle;
            Text.font               = attributes.Font;
            Text.fontSize           = attributes.FontSize;
            Text.color              = attributes.Color;
            Text.alignment          = attributes.Alignment;
            Text.text               = attributes.Content;
            Text.horizontalOverflow = HorizontalWrapMode.Overflow;
        }
Example #4
0
        public override void Apply(ManagedComponent.ComponentAttributes componentAttributes)
        {
            var attributes = componentAttributes as ComponentAttributes;

            if (!attributes)
            {
                return;
            }

            Direction                          = attributes.Direction;
            LayoutGroup.padding                = attributes.RectOffset;
            LayoutGroup.childAlignment         = attributes.ChildrenAlignment;
            LayoutGroup.spacing                = attributes.Spacing;
            LayoutGroup.childControlHeight     = attributes.ControlChildHeight;
            LayoutGroup.childControlWidth      = attributes.ControlChildWidth;
            LayoutGroup.childForceExpandHeight = attributes.ForceExpandChildHeight;
            LayoutGroup.childForceExpandWidth  = attributes.ForceExpandChildWidth;
        }
Example #5
0
        public override void Apply(ManagedComponent.ComponentAttributes componentAttributes)
        {
            var attributes = componentAttributes as ComponentAttributes;

            if (!attributes)
            {
                return;
            }

            GridLayoutGroup.padding        = attributes.RectOffset;
            GridLayoutGroup.childAlignment = attributes.ChildrenAlignment;
            GridLayoutGroup.spacing        = attributes.Spacing;
            GridLayoutGroup.startCorner    = attributes.StartCorner;
            GridLayoutGroup.cellSize       = attributes.CellSize;
            GridLayoutGroup.startAxis      = new Dictionary <Direction, GridLayoutGroup.Axis>()
            {
                { Direction.Horizontal, Axis.Horizontal },
                { Direction.Vertical, Axis.Vertical }
            }[attributes.StartAxis];
            GridLayoutGroup.constraint      = attributes.Constraint;
            GridLayoutGroup.constraintCount = attributes.ConstraintCount;
            GridLayoutGroup.autoWidth       = attributes.AutoWidth;
        }