Esempio n. 1
0
 internal GridComponent(GridComponentSpec spec, T item)
 {
     Alignment  = spec.Alignment;
     Item       = item;
     Column     = spec.Column;
     ColumnSpan = spec.ColumnSpan;
     Margin     = spec.Margin;
     Row        = spec.Row;
     RowSpan    = spec.RowSpan;
 }
Esempio n. 2
0
 /// <summary>
 /// Adds a child to this panel.
 /// </summary>
 /// <param name="child">The child to add.</param>
 /// <param name="spec">The location where the child will be placed.</param>
 /// <returns>This panel for call chaining.</returns>
 public PGridPanel AddChild(IUIComponent child, GridComponentSpec spec)
 {
     if (child == null)
     {
         throw new ArgumentNullException("child");
     }
     if (spec == null)
     {
         throw new ArgumentNullException("spec");
     }
     children.Add(new GridComponent <IUIComponent>(spec, child));
     return(this);
 }
Esempio n. 3
0
 /// <summary>
 /// Adds a component to this layout. Components added through other means to the
 /// transform will not be laid out at all!
 /// </summary>
 /// <param name="child">The child to add.</param>
 /// <param name="spec">The location where the child will be placed.</param>
 public void AddComponent(GameObject child, GridComponentSpec spec)
 {
     if (child == null)
     {
         throw new ArgumentNullException("child");
     }
     if (spec == null)
     {
         throw new ArgumentNullException("spec");
     }
     children.Add(new GridComponent <GameObject>(spec, child));
     child.SetParent(gameObject);
 }