暂存
This commit is contained in:
1 parent
038720e7bd
commit
c97bd50f3f
32 files changed
+9899
-3719
No files matched your search
@@ -19,9 +19,10 @@ public class ResultListController : MonoBehaviour
|
||||
// Start is called before the first frame update
|
||||
int pageIndex = 0, pageSize = 20;
|
||||
string name = "";
|
||||
Transform[] contents;
|
||||
void Start()
|
||||
{
|
||||
ApiBase.SetCookie("73385F5F719B610D132C1ECF3E9143272BF15214D57ED91CD7A9DFD832407471535112AAEB8E9271F75D54FBBF2D99F18FA313C1EEA5676F5D722D7FBB07C926BEC5905591BF9AFDDC6336552DF273112C2DA1794E6FA2F465B11FECD2E82E52");
|
||||
//ApiBase.SetCookie("73385F5F719B610D132C1ECF3E9143272BF15214D57ED91CD7A9DFD832407471535112AAEB8E9271F75D54FBBF2D99F18FA313C1EEA5676F5D722D7FBB07C926BEC5905591BF9AFDDC6336552DF273112C2DA1794E6FA2F465B11FECD2E82E52");
|
||||
InitialColor();
|
||||
scroll = transform.Find("ListPanel").Find("Scroll").GetComponent<ScrollRect>();
|
||||
btnMatch = transform.Find("ListPanel").Find("BtnMatch");
|
||||
@@ -32,6 +33,7 @@ public class ResultListController : MonoBehaviour
|
||||
routeContent = routeScroll.Find("Viewport").Find("Content");
|
||||
matchScroll = scrollContent.Find("MatchList");
|
||||
matchContent = matchScroll.Find("Viewport").Find("Content");
|
||||
contents = new Transform[] { routeContent, matchContent};
|
||||
if (btnMatch != null)
|
||||
{
|
||||
btnMatch.GetComponent<Button>().onClick.AddListener(() => StartScroll(0));
|
||||
@@ -45,7 +47,7 @@ public class ResultListController : MonoBehaviour
|
||||
searchInput.Find("Button").GetComponent<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
name = searchInput.GetComponent<InputField>().text;
|
||||
Refresh();
|
||||
Refresh(contents[scrollIndex]);
|
||||
});
|
||||
}
|
||||
if (routeScroll != null)
|
||||
@@ -71,13 +73,13 @@ public class ResultListController : MonoBehaviour
|
||||
}
|
||||
if (scrollrect.verticalNormalizedPosition >= 1)
|
||||
{
|
||||
Refresh();
|
||||
Refresh(contents[scrollIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
private void Refresh()
|
||||
private void Refresh(Transform content)
|
||||
{
|
||||
routeContent.transform.DestroyChildren();
|
||||
content.transform.DestroyChildren();
|
||||
pageIndex = 0;
|
||||
GetList();
|
||||
}
|
||||
@@ -94,8 +96,8 @@ public class ResultListController : MonoBehaviour
|
||||
else
|
||||
{
|
||||
isEnd = false;
|
||||
DisplayRouteResult(r.data,routeContent);
|
||||
DisplayRouteResult(r.data, matchContent);
|
||||
DisplayRouteResult(r.data,contents[scrollIndex]);
|
||||
//DisplayRouteResult(r.data, matchContent);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user