设备扫描优化&我的收藏返回记忆位置
This commit is contained in:
1 parent
c209811f9f
commit
7f56624ec7
10 files changed
+71
-61
No files matched your search
@@ -1,17 +1,7 @@
|
||||
using Assets.Scripts;
|
||||
using Assets.Scripts.Apis;
|
||||
using Assets.Scripts.Apis.Models;
|
||||
using Assets.Scripts.UI.Prefab.MapList;
|
||||
using DG.Tweening;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
@@ -38,24 +28,14 @@ public class MapListExtraController : PFUIPanel
|
||||
#else
|
||||
tmpCollectItem = Resources.Load<Transform>("UI/Prefab/NewRoute/RouteItem");
|
||||
#endif
|
||||
|
||||
App.CurrentSubRouteType = "Route";
|
||||
UIManager.AddEvent(typeSelector.Find("Container/Route").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
typeSelector.Find("Container/Route").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");
|
||||
typeSelector.Find("Container1/Collection").GetComponent<Text>().color = Utils.HexToColorHtml("#5c5c6e");
|
||||
SetImageStyle(true);
|
||||
p1.DOLocalMoveX(p1originx, 0.5f);
|
||||
p2.DOLocalMoveX(p2originx, 0.5f);
|
||||
HandleMobileNavCustom(true);
|
||||
ShowRouteList();
|
||||
});
|
||||
UIManager.AddEvent(typeSelector.Find("Container1/Collection").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
typeSelector.Find("Container/Route").GetComponent<Text>().color = Utils.HexToColorHtml("#5c5c6e");
|
||||
typeSelector.Find("Container1/Collection").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");
|
||||
SetImageStyle(false);
|
||||
p1.DOLocalMoveX(p1originx - listWidth, 0.5f);
|
||||
p2.DOLocalMoveX(p2originx - listWidth, 0.5f);
|
||||
HandleMobileNavCustom(false);
|
||||
ShowCollectionList();
|
||||
});
|
||||
|
||||
}
|
||||
@@ -69,15 +49,30 @@ public class MapListExtraController : PFUIPanel
|
||||
|
||||
}
|
||||
|
||||
void Update()
|
||||
private void ShowRouteList()
|
||||
{
|
||||
|
||||
App.CurrentSubRouteType = "Route";
|
||||
typeSelector.Find("Container/Route").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");
|
||||
typeSelector.Find("Container1/Collection").GetComponent<Text>().color = Utils.HexToColorHtml("#5c5c6e");
|
||||
SetImageStyle(true);
|
||||
p1.DOLocalMoveX(p1originx, 0.5f);
|
||||
p2.DOLocalMoveX(p2originx, 0.5f);
|
||||
HandleMobileNavCustom(true);
|
||||
}
|
||||
private void ShowCollectionList()
|
||||
{
|
||||
App.CurrentSubRouteType = "Collection";
|
||||
typeSelector.Find("Container/Route").GetComponent<Text>().color = Utils.HexToColorHtml("#5c5c6e");
|
||||
typeSelector.Find("Container1/Collection").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");
|
||||
SetImageStyle(false);
|
||||
p1.DOLocalMoveX(p1originx - listWidth, 0.5f);
|
||||
p2.DOLocalMoveX(p2originx - listWidth, 0.5f);
|
||||
HandleMobileNavCustom(false);
|
||||
}
|
||||
|
||||
public override void Show()
|
||||
{
|
||||
base.Show();
|
||||
|
||||
}
|
||||
private int pageIndex = 0;
|
||||
void HandleMobileNavCustom(bool b)
|
||||
@@ -131,6 +126,14 @@ public class MapListExtraController : PFUIPanel
|
||||
typeSelector.Find("Container1/Collection").GetComponent<Text>().color = Utils.HexToColorHtml("#5c5c6e");
|
||||
SetImageStyle(true);
|
||||
HandleMobileNavCustom(true);
|
||||
if (App.CurrentSubRouteType == "Route")
|
||||
{
|
||||
ShowRouteList();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowCollectionList();
|
||||
}
|
||||
}
|
||||
private async void GetList()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user