骑行loading页面bug修复&线路集合图片异步加载

This commit is contained in:
lishuo committed 2021-12-17 11:10:17 +08:00
1 parent 6c0d9f5dec
commit 7616e09a40
5 files changed
+31 -20

No files matched your search

@@ -22,15 +22,21 @@ public class NewRouteItemController : MonoBehaviour
public void Initial(MapRouteAreaItem area, Dictionary<string, Texture> caches = null)
{
if (area.CoverImage != null)
{
Utils.DisplayImageTempDict(GetComponent<RawImage>(), area.CoverImage, caches);
}
transform.Find("Panel/Text").GetComponent<Text>().text = area.Name;
GetComponent<Button>().onClick.RemoveAllListeners();
GetComponent<Button>().onClick.AddListener(() =>
{
UIManager.ShowNewRouteDetailPanel(area);
});
StartCoroutine(displayImage(area, caches));
}
IEnumerator displayImage(MapRouteAreaItem area, Dictionary<string, Texture> caches = null)
{
yield return null;
if (area.CoverImage != null)
{
Utils.DisplayImageTempDict(GetComponent<RawImage>(), area.CoverImage, caches);
}
}
}
@@ -105,7 +105,7 @@ public class NewRouteOverviewController: PFUIPanel
// });
//#endif
}
int pageIndex = 0, pageSize = 10;
int pageIndex = 0, pageSize = 5;
bool isEnd = false,isLock = false;
private void Refresh()
{