コード例 #1
0
        public static bool IsCulled(ref ScrollViewCullData cull, float height = 25)
        {
            cull.scrollWindowPosY += height;

            float scrollWindowHeight = cull.windowHeight - cull.rectStartScrollY;

            if (cull.scrollWindowPosY < cull.updatedScrollViewY || cull.scrollWindowPosY > cull.updatedScrollViewY + scrollWindowHeight)
            {
                cull.culledSpaceY += height;
                return(true);
            }
            else
            {
                if (cull.culledSpaceY > 0)
                {
                    GUILayout.Space(cull.culledSpaceY);
                    cull.culledSpaceY = 0;
                }
                return(false);
            }
        }
コード例 #2
0
 public bool IsScrollViewAtEnd(ScrollViewCullData cull)
 {
     return(scrollView.y == cull.scrollWindowPosY);
 }
コード例 #3
0
 public void SetScrollViewToEnd(ScrollViewCullData cull)
 {
     scrollView.y = cull.scrollWindowPosY;
 }