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);
        }
Beispiel #2
0
        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)
     {
     }
 }
Beispiel #4
0
        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);
        }
Beispiel #5
0
 public OnChildAddedEventArgs(REbase child)
 {
     this.child = child;
 }
Beispiel #6
0
 public void AddChild(REbase child)
 {
     OnChildAdded?.Invoke(this, new OnChildAddedEventArgs(child));
 }
Beispiel #7
0
 protected virtual bool CrateChildCondition(REbase child) => true;