public CategoryElement CreateCategoryElement(string text, Color color, MenuInterface categoryInterface, Action onOpen, string subtitleText = "") { CategoryElement categoryElement = new CategoryElement(text, color, categoryInterface, this, onOpen, subtitleText); this.categoryElements.Add(categoryElement); this.SetElementInterface(categoryElement); this.menuElements.Add(categoryElement); return(categoryElement); }
public CategoryElement(string text, Color color, MenuInterface category, MenuInterface parentInterface, Action onOpen, string subtitleText = "") : base(text, color, subtitleText) { this.m_Interface = category; this.m_Interface.parentInterface = parentInterface; this.onOpen = onOpen; }