protected override bool CrateChildCondition(REbase child) { if (child.isLayoutElement) { return(true); } Debug.LogError("REhorizontalLayout: Layouts only can have layout elements as childs, put any other element inside a REbox to create it"); return(false); }
protected override bool CrateChildCondition(REbase child) { if (child.isLayoutElement) { return(true); } Debug.LogError("REverticalLayout: You are trying to create a " + child.elementType.Name + " inside a layout. Layouts only can have layout elements as childs, put any other element inside a REbox to create it"); return(false); }
internal void RemoveChild(REbase child) { try { childsList.Remove(child.selector); } catch (Exception) { } }
private void CreateChild(REbase child) { if (child == null) { return; } // Only if create child condition is true if (!CrateChildCondition(child)) { return; } if (virtualChildContainer != null) { childsList.Add(child.Draw(virtualChildContainer, selector)); } else { childsList.Add(child.Draw(gameObject, selector)); } AfterCreateChild(child.selector); }
public OnChildAddedEventArgs(REbase child) { this.child = child; }
public void AddChild(REbase child) { OnChildAdded?.Invoke(this, new OnChildAddedEventArgs(child)); }
protected virtual bool CrateChildCondition(REbase child) => true;