骑行loading页面bug修复&线路集合图片异步加载
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user