示例#1
0
        protected override void OnDataInitialize(VisualObject vObject)
        {
            ScrollViewObject scrollViewObject = vObject as ScrollViewObject;

            if (scrollViewObject != null)
            {
                scrollViewObject.InnerNodeSize = this.InnerNodeSize;
            }
        }
示例#2
0
    internal void PopulateScrollView()
    {
        foreach (Transform item in scrollObjParent)
        {
            Destroy(item.gameObject);
        }

        //ScrollArray scrollArray = JsonUtility.FromJson<ScrollArray>(CreateFAKEJson());

        ScrollArray scrollArray = JsonUtility.FromJson <ScrollArray>(fragTestReference.GetPairedDeviceListJson());
        int         i           = 0;

        foreach (ScrollObject obj in scrollArray.Devices)
        {
            ScrollViewObject spawnedObj = Instantiate(scrollViewObject, scrollObjParent);
            spawnedObj.SetNameAndMac(obj.Name, obj.MAC, i);
            spawnedObj.ActivateClicks();
            i++;
        }
    }