Example #1
0
    void updateFunc_3(ScrollItem item, SObject data)
    {
        item.gameObject.SetActive(true);
        DefaultScrollItemData sd = (DefaultScrollItemData)data;

        item.GetComponent <Text>().text = GetLongTextByData(sd);
    }
Example #2
0
        protected override void FillData(ScrollItem item, int index)
        {
            if (!cacheDict.TryGetValue(item, out var elements))
            {
                elements = item.GetComponent <UIElements>();
                cacheDict.Add(item, elements);
            }

            var image    = elements.GetObject <Image>("Icon");
            var itemName = elements.GetObject <Text>("Name");
            var desc     = elements.GetObject <Text>("Desc");
            var desc2    = elements.GetObject <Text>("Desc2");

            if (image != null)
            {
                image.sprite = GetSprite();
            }
            itemName.text = index.ToString();
        }
Example #3
0
    public void ItemBtnExeTrue(ScrollItem inItem, string parStr)
    {
        currentSelectItem = inItem;

        if (lastSelectItem != null && lastSelectItem != currentSelectItem)
        {
            lastSelectItem.imageButton.CleanState();
        }

        lastSelectItem = currentSelectItem;

        trueEvent.Invoke(parStr);

        if (btnCantCtrlInEnd)
        {
            currentSelectItem.GetComponent <Image>().raycastTarget = false;
        }

//      Debug.Log("true"+ inItem.name+"----"+parStr);
    }