Exemplo n.º 1
0
        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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 internal void RemoveChild(REbase child)
 {
     try
     {
         childsList.Remove(child.selector);
     }
     catch (Exception)
     {
     }
 }
Exemplo n.º 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);
        }
Exemplo n.º 5
0
 public OnChildAddedEventArgs(REbase child)
 {
     this.child = child;
 }
Exemplo n.º 6
0
 public void AddChild(REbase child)
 {
     OnChildAdded?.Invoke(this, new OnChildAddedEventArgs(child));
 }
Exemplo n.º 7
0
 protected virtual bool CrateChildCondition(REbase child) => true;