From e8ea030e66c70cc1fec8d4eb259c031fc9b3496f Mon Sep 17 00:00:00 2001 From: mercury233 Date: Thu, 11 Apr 2019 10:39:53 +0800 Subject: [PATCH] fix the first result dont appear in hi-res screen --- Assets/SibylSystem/MonoHelpers/SuperScrollView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/SibylSystem/MonoHelpers/SuperScrollView.cs b/Assets/SibylSystem/MonoHelpers/SuperScrollView.cs index 41896efe..e7e88adf 100644 --- a/Assets/SibylSystem/MonoHelpers/SuperScrollView.cs +++ b/Assets/SibylSystem/MonoHelpers/SuperScrollView.cs @@ -241,12 +241,12 @@ public class SuperScrollView caculateMoveFloat(); float now = panel.clipOffset.y + moveFloat; scrollBar.value = now / maxFloat; - float min = -panel.clipOffset.y - 500; + float min = -panel.clipOffset.y - (Screen.height / 2 + 100); if (Math.Abs(min - lastMin) > 40 || Items.Count<100||lastForce) { lastForce = false; lastMin = min; - float max = -panel.clipOffset.y + panel.GetViewSize().y + 500; + float max = -panel.clipOffset.y + panel.GetViewSize().y + (Screen.height / 2 + 100); for (int i = 0; i < Items.Count; i++) { if (i >= (int)(min / heightOfEach) && i <= (int)(max / heightOfEach))