Esempio n. 1
0
        public void Add(AGuiElement element)
        {
            var x = this.direction.X;
            var y = this.direction.Y;

            if (this.lastElement != null)
            {
                var positionBuilder = element.Position.RelativeTo(this.lastElement, x, y, -x, -y);
                if (this.margin.HasValue)
                {
                    element.Margins += this.margin.Value;
                }
                if (element.Margins.Length > 0)
                {
                    positionBuilder.UseMargins();
                }
            }
            else
            {
                element.Position.ParentRelative(-x, -y);
            }

            this.lastElement = element;
            this.margin      = null;
        }
Esempio n. 2
0
        public virtual void Attach(AScene scene, AGuiElement parent)
        {
            this.scene  = scene;
            this.Parent = parent;

            this.Position.Attach(parent);
            this.updateScene();
        }
Esempio n. 3
0
        public override void Attach(AScene scene, AGuiElement parent)
        {
            base.Attach(scene, parent);

            foreach (var child in children)
            {
                scene.AddElement(child, this);
            }
        }
Esempio n. 4
0
        public virtual void Attach(AScene scene, AGuiElement parent)
        {
            this.scene  = scene;
            this.Parent = parent;

            this.Parent.dependentElements.Add(this);
            foreach (var element in this.Position.Dependencies)
            {
                element.dependentElements.Add(this);
            }

            this.SetDepth(parent.Z0 - parent.ZRange, parent.ZRange);
            this.updateScene();
        }
Esempio n. 5
0
 public void AddChild(AGuiElement child)
 {
     this.children.Add(child);
 }
Esempio n. 6
0
 public override void Attach(AScene scene, AGuiElement parent)
 {
     base.Attach(scene, parent);
     this.group.Add(this);
 }