using System; using UnityEngine; public class WindowContentListParent : MonoBehaviour { private void Awake() { } private void Start() { BoxCollider[] componentsInChildren = base.GetComponentsInChildren(); this.scrollView = base.GetComponentInChildren(); if (this.scrollView != null && (this.scrollView.horizontalScrollBar != null || this.scrollView.verticalScrollBar != null)) { this.targetProgressBar = ((!(this.scrollView.horizontalScrollBar != null)) ? this.scrollView.verticalScrollBar : this.scrollView.horizontalScrollBar); foreach (BoxCollider boxCollider in componentsInChildren) { UIDragScrollView component = boxCollider.GetComponent(); if (!(component == null)) { if (component.scrollView == this.scrollView && component.GetComponentInChildren() == null) { this.dragMatBoxCollider = boxCollider; break; } } } } } private void Update() { if (this.dragMatBoxCollider == null) { return; } this.dragMatBoxCollider.enabled = (this.targetProgressBar.alpha == 1f); } private BoxCollider dragMatBoxCollider; private UIScrollView scrollView; private UIProgressBar targetProgressBar; }