Ejemplo n.º 1
0
        public virtual UIItem AddItem(string duplicateItemName, string itemName, Transform parentTransform)
        {
            UIItem item    = GetItem(duplicateItemName);
            UIItem newItem = item.Clone();

            newItem.SetName(itemName);
            newItem.SetParent(this);
            newItem.transform.SetParent(parentTransform);
            return(AddItem(newItem));
        }
Ejemplo n.º 2
0
        public virtual UIItem AddItem(UIItem item, Transform parentTransform = null)
        {
            mItems.Add(item);

            if (parentTransform != null)
            {
                item.transform.SetParent(parentTransform);
                item.SetParent(this);
            }

            return(item);
        }
Ejemplo n.º 3
0
        protected virtual void Init(Transform gameObjectTransform)
        {
            mItems = new List <UIItem> ();

            foreach (Transform child in gameObjectTransform)
            {
                UIItem item = child.GetComponent <UIItem> ();
                mItems.Add(item);

                item.SetParent(this);
            }

            SetVisibility(_Visible);
            SetDisabled(_Disable);
        }
Ejemplo n.º 4
0
        protected virtual void Init(Transform gameObjectTransform)
        {
            mItems = new List <UIItem> ();

            foreach (Transform child in gameObjectTransform)
            {
                UIItem item = child.GetComponent <UIItem> ();
                mItems.Add(item);

                item.SetParent(this);
            }

            if (!_Visible)
            {
                SetVisibility(false);
            }
            if (!_Interactive)
            {
                SetInteractive(false);
            }

            mInteractive = _Interactive;
            mVisible     = _Visible;
        }