/// <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>(); }