Exemplo n.º 1
0
        protected override void RemovePopup(PopupObject po)
        {
            ItemPopupObject ipo = (ItemPopupObject)po;

            ipo.ActivateElements(false);
            base.RemovePopup(po);
        }
Exemplo n.º 2
0
        private ItemPopupObject CreatePopup()
        {
            RectTransform popup        = Instantiate(popupPrefab, transform, false);
            Image         UIImage      = popup.GetComponent <Image>();
            Material      materialCopy = Instantiate(UIImage.material);

            UIImage.material = materialCopy;
            ItemPopupObject po = new ItemPopupObject(popup,
                                                     materialCopy,
                                                     popup.GetChild(0).GetComponent <Image>(),
                                                     popup.GetChild(1).GetChild(0).GetComponent <Text>(),
                                                     popup.GetChild(1).GetChild(1).GetComponent <Text>());

            popup.anchoredPosition += Vector2.down * po.Height;
            inactivePopups.Add(po);
            po.ActivateElements(false);
            return(po);
        }