public IIgniteGUIGroup Add(IIgniteGUIElement element) { element.SetParent(this); element.OnSelected(() => this.IsSelected = true); var group = element as IIgniteGUIGroup; if (group != null) { LastNestedGroup = group; } return(this); }
void RegisterToggle(IIgniteGUIElement element) { var toggle = element as IgniteToggle; if (toggle != null) { RegisterToggle(toggle); return; } var group = element as IIgniteGUIGroup; if (group != null) { var toggles = group.Content.GetComponentsInChildren <IgniteToggle>(); if (toggles != null) { foreach (var i in toggles) { RegisterToggle(i); } } } }
IEnumerator DelayAdd(IIgniteGUIElement element) { yield return(null); RegisterToggle(element); }
public override IIgniteGUIGroup Add(IIgniteGUIElement element) { base.Add(element); StartCoroutine(DelayAdd(element)); return(this); }