public virtual void createAllList() { Debug.LogWarning(" REFRESHING UI LIST VIEW"); clearList(); // DRAW ALL INCOMING SEGMENTS foreach (var segment in DataBridge.instance.all_incoming_segments().Reverse()) { if (segment.Value.segmentState != (long)SegmentState.paired) { GameObject o = Instantiate(listElementPrefab.gameObject, container.transform); UIListElement element = o.GetComponent <UIListElement>(); element.id = segment.Value.segment_id; element.isIncoming = true; element.updateElement(segment.Value.segment_id); listElements.Add(element.id, element); } } // DRAW ALL USER SEGMENTS foreach (var segment in DataBridge.instance.all_user_segments().Reverse()) { if (segment.Value.segmentState != (long)SegmentState.paired) { GameObject o; o = Instantiate(listElementPrefab.gameObject, container.transform); UIListElement element = o.GetComponent <UIListElement>(); element.id = segment.Key; element.isIncoming = false; element.updateElement(segment.Value.segment_id); listElements.Add(element.id, element); } else { GameObject o = Instantiate(paired_listeElementPrefab.gameObject, container.transform); UIListElement element = o.GetComponent <UIListElement>(); element.id = segment.Value.segment_id; element.isIncoming = false; element.updateElement(segment.Value.segment_id); listElements.Add(element.id, element); } } }
public void createIncomingList() { Debug.LogWarning(" REFRESHING UI LIST VIEW"); clearList(); foreach (var segment in DataBridge.instance.all_incoming_segments().Reverse()) { if (segment.Value.segmentState != (long)SegmentState.paired) { GameObject o = Instantiate(listElementPrefab.gameObject, container.transform); UIListElement element = o.GetComponent <UIListElement>(); element.id = segment.Value.segment_id; element.isIncoming = true; element.updateElement(segment.Value.segment_id); listElements.Add(element.id, element); } } }