Beispiel #1
0
 /// <summary>
 /// Creates an instance of a panel and adds it as a subpanel
 /// </summary>
 /// <param name="parentPanel">The panel to add this one to</param>
 /// <param name="pos">The position of this panel relative to the origin</param>
 public Panel(Panel parentPanel, Vector2 pos)
 {
     this.offset = pos;
     parentPanel.addSubPanel(this);
     subPanels = new List<Panel>();
 }
Beispiel #2
0
 /// <summary>
 /// Add a sub panel to this one
 /// </summary>
 /// <param name="subPanel"></param>
 public void addSubPanel(Panel subPanel)
 {
     subPanel.Origin = this.Position;
     subPanels.Add(subPanel);
 }