修改细节
This commit is contained in:
1 parent
a96d538dc1
commit
048538a0c8
78 files changed
+15285
-6903
No files matched your search
@@ -58,8 +58,7 @@ public class ResultListController : MonoBehaviour
|
||||
{
|
||||
UIManager.AddEvent(searchInput.Find("Button").gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
name = searchInput.GetComponent<InputField>().text;
|
||||
Refresh(contents[scrollIndex]);
|
||||
onEndEdit();
|
||||
});
|
||||
//searchInput.Find("Button").GetComponent<Button>().onClick.AddListener(() =>
|
||||
//{
|
||||
@@ -115,16 +114,28 @@ public class ResultListController : MonoBehaviour
|
||||
var index = sindex ?? scrollIndex;
|
||||
if (isEnd[index]) return;
|
||||
var r = await ConfigHelper.mapInterruptRecordApi.GetMapInterruptRecord(name, pageIndex[index], 20,filterOptionDict[index]);
|
||||
|
||||
if (r.result)
|
||||
{
|
||||
if (r.data.Count == 0 && pageIndex[index] != 0)
|
||||
_lock = false;
|
||||
if (r.data.Count == 0)
|
||||
{
|
||||
isEnd[index] = true;
|
||||
if (pageIndex[index] != 0)
|
||||
{
|
||||
isEnd[index] = true;
|
||||
scroll.transform.Find("Error").gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
//contents[index];
|
||||
scroll.transform.Find("Error").gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
isEnd[index] = false;
|
||||
DisplayRouteResult(r.data, contents[index],index);
|
||||
scroll.transform.Find("Error").gameObject.SetActive(false);
|
||||
//DisplayRouteResult(r.data, matchContent);
|
||||
}
|
||||
}
|
||||
@@ -154,9 +165,21 @@ public class ResultListController : MonoBehaviour
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
bool _lock = false;
|
||||
void onEndEdit()
|
||||
{
|
||||
name = searchInput.GetComponent<InputField>().text;
|
||||
Refresh(contents[scrollIndex]);
|
||||
}
|
||||
void Update()
|
||||
{
|
||||
GoScroll();
|
||||
if (Input.GetKey(KeyCode.KeypadEnter) || Input.GetKey(KeyCode.Return))
|
||||
{
|
||||
if (_lock) return;
|
||||
_lock = true;
|
||||
onEndEdit();
|
||||
}
|
||||
}
|
||||
void StartScroll(int index)
|
||||
{
|
||||
@@ -177,6 +200,7 @@ public class ResultListController : MonoBehaviour
|
||||
btnRoute.GetComponent<Text>().color = c1;
|
||||
btnMatch.GetComponent<Text>().color = c2;
|
||||
}
|
||||
scroll.transform.Find("Error").gameObject.SetActive(contents[scrollIndex].childCount == 0);
|
||||
}
|
||||
#region 主页面滑动逻辑
|
||||
int scrollIndex = 0;
|
||||
|
||||
Reference in new issue
Block a user