public MenuElement(string label, bool enabled = true, XGUIAction action = null, List<MenuElement> children = null) { Label = label; Enabled = enabled; if (action != null) Action = action; if (children != null) m_Children = children; }
public void AddChild(MenuElement element) { if (HasAction) { m_Action = null; m_Children = new List<MenuElement>(); } m_Children.Add(element); }