按设计稿修改登录页登录样式;修改主页动画顺序;增加我的收藏列表可切换

This commit is contained in:
Caiyanpeng committed 2021-12-28 18:25:48 +08:00
1 parent f23fc4b4c0
commit 3ca297ee96
40 files changed
+5474 -1548

No files matched your search

+7 -1
View File
@@ -40,6 +40,8 @@ namespace Assets.Scripts.Apis
return Post<JsonResult<List<MapRecordRanking>>>("Map/GetCyclingRecordsById", id).data;
}
/// <summary>
/// 通过Id获取路书
@@ -205,6 +207,10 @@ namespace Assets.Scripts.Apis
var result = await GetAsync<JsonResult<List<MapRouteAreaItem>>>($"MapRouteArea/GetRecommendAreaList");
return result;
}
public async Task<JsonResult<List<MapRouteAreaItem>>> GetMemberMapRouteAreaList(int pageIndex, int pageSize)
{
var result = await GetAsync<JsonResult<List<MapRouteAreaItem>>>($"MapRouteArea/GetMemberMapRouteAreaList?pageIndex={pageIndex}&pageSize={pageSize}");
return result;
}
}
}
@@ -92,6 +92,8 @@ namespace Assets.Scripts.Apis.Models
///
/// </summary>
public int? ParentId { get; set; }
public bool IsFav { get; set; }
}
public class MapRouteAreaDetail
@@ -136,6 +138,7 @@ namespace Assets.Scripts.Apis.Models
///
/// </summary>
public DateTime UpdateTime { get; set; }
public bool IsFav { get; set; }
}
public class MapRouteAreaRouteList
+14 -14
View File
@@ -21,13 +21,13 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
{
loginScrollView = transform.Find("Panel/LoginContainer/LoginScrollView").GetComponent<ScrollRect>();
thirdLoginPage = loginScrollView.content.Find("FormContainer-Login/Mask/FormContainer-third");
UIManager.AddEvent(loginScrollView.content.Find("FormContainer-Login/Mask/FormContainer/BtnThirdLogin").gameObject,
UnityEngine.EventSystems.EventTriggerType.PointerClick,
(b)=> ShowThirdLoginPage());
UIManager.AddEvent(loginScrollView.content.Find("FormContainer-Login/Mask/FormContainer-third/BtnReturn").gameObject,
UnityEngine.EventSystems.EventTriggerType.PointerClick,
(b) => HideThirdLoginPage());
UIManager.AddEvent(loginScrollView.content.Find("FormContainer-Login/Mask/FormContainer-third/otherContainer/Wechat").gameObject,
//UIManager.AddEvent(loginScrollView.content.Find("FormContainer-Login/Mask/FormContainer/BtnThirdLogin").gameObject,
// UnityEngine.EventSystems.EventTriggerType.PointerClick,
// (b)=> ShowThirdLoginPage());
//UIManager.AddEvent(loginScrollView.content.Find("FormContainer-Login/Mask/FormContainer-third/BtnReturn").gameObject,
// UnityEngine.EventSystems.EventTriggerType.PointerClick,
// (b) => HideThirdLoginPage());
UIManager.AddEvent(loginScrollView.content.Find("FormContainer-Login/Mask/FormContainer/otherContainer/Wechat").gameObject,
UnityEngine.EventSystems.EventTriggerType.PointerClick,
(b) => goWxLogin());
}
@@ -43,7 +43,7 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
weChat = App.weChatController;
weChat.Init(App.WxAppId);
#if UNITY_IOS
UIManager.AddEvent(transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer-third/otherContainer/Apple").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
UIManager.AddEvent(transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer/otherContainer/Apple").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
{
#if UNITY_EDITOR
GetComponent<LoginController>()
@@ -53,9 +53,9 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
#endif
});
#else
transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer-third/otherContainer/Apple").gameObject.SetActive(false);
transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer/otherContainer/Apple").gameObject.SetActive(false);
#endif
UIManager.AddEvent(transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer-third/otherContainer/Facebook").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
UIManager.AddEvent(transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer/otherContainer/Facebook").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
{
FB.LogOut();
FB.LogInWithReadPermissions(callback: onFaceBookResp);
@@ -71,8 +71,8 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
private async void CheckUpdate()
{
#if UNITY_ANDROID
transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer/BtnThirdLogin")
.gameObject.SetActive(true);
//transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer/BtnThirdLogin")
// .gameObject.SetActive(true);
#endif
var r = await ConfigHelper.userApi.GetVersions();
if (r.result)
@@ -92,8 +92,8 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
//var sw = r.data.Value<string>("ThirdPartSwitch");
//transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer/BtnThirdLogin")
// .gameObject.SetActive(sw.Equals("on") && App.weChatController.IsWeChatAppInstalled());
transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer/BtnThirdLogin")
.gameObject.SetActive(true);
//transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer/BtnThirdLogin")
// .gameObject.SetActive(true);
var info = r.data.Value<JObject>("UnityIos");
if (Utils.isUpdate(App.AppVersion, info.Value<string>("Version")))
{
+20 -19
View File
@@ -405,16 +405,10 @@ public class LoginController : BaseScene
{
if (pageNums == 5)
{
#if UNITY_ANDROID || UNITY_IOS
MobileAni(false);
#endif
StartScrollPanel(3);
}
else if (pageNums == 4)
{
#if UNITY_ANDROID || UNITY_IOS
MobileAni(false);
#endif
StartScrollPanel(2);
}
else
@@ -529,7 +523,6 @@ public class LoginController : BaseScene
wxLogin3.gameObject.SetActive(true);
signContainer.gameObject.SetActive(false);
pageNums = 3;
MobileAni(true);
StartScrollPanel(2);
}
}
@@ -561,7 +554,6 @@ public class LoginController : BaseScene
wxLogin3.gameObject.SetActive(true);
signContainer.gameObject.SetActive(false);
pageNums = 3;
MobileAni(true);
StartScrollPanel(2);
}
}
@@ -782,7 +774,6 @@ public class LoginController : BaseScene
//wxLogin3.Find("NickName").GetComponent<Text>().text = wxInfoJson.Value<string>("nickname");
signContainer.gameObject.SetActive(false);
pageNums = 3;
MobileAni(true);
//this.goSign();
StartScrollPanel(2);
}
@@ -964,7 +955,6 @@ public class LoginController : BaseScene
{
var u = JObject.FromObject(r.data).ToObject<UserResultModel>();
RefreshWx3(u, 1);
MobileAni(true);
StartScrollPanel(4);
}
else
@@ -1040,9 +1030,6 @@ public class LoginController : BaseScene
void goRegEnd()
{
if (!UpdateInfo()) return;
#if UNITY_ANDROID || UNITY_IOS
MobileAni(true);
#endif
if (pageNums == 5)
{
this.StartScrollPanel(4);
@@ -1139,7 +1126,7 @@ public class LoginController : BaseScene
wxReturnLogin();
}
#else
transform.GetComponent<LoginControllerMobile>().HideThirdLoginPage();
//transform.GetComponent<LoginControllerMobile>().HideThirdLoginPage();
#endif
Canvas.ForceUpdateCanvases();
this.StartScrollPanel(1);
@@ -1192,8 +1179,6 @@ public class LoginController : BaseScene
LoginBg.GetComponent<RectTransform>().DOSizeDelta(new Vector2(360, 385), 0.3f);
LoginBg.GetComponent<RectTransform>().DOLocalMoveY(-94, 0.3f);
}
#else
MobileAni(true);
#endif
this.StartScrollPanel(0);
}
@@ -1217,8 +1202,6 @@ public class LoginController : BaseScene
LoginBg.GetComponent<RectTransform>().DOSizeDelta(new Vector2(360, 573), 0.3f);
LoginBg.GetComponent<RectTransform>().DOLocalMoveY(0, 0.3f);
}
#else
MobileAni(false);
#endif
//DOTween.To(() => o, x => o = x, t, 0.3f);
this.StartScrollPanel(1);
@@ -1496,7 +1479,22 @@ public class LoginController : BaseScene
}
//float adjTime = 0;
//bool startJs = false;
#region 主页面滑动逻辑
#region 主页面滑动逻辑
private void handleAnimate(int index)
{
if (pageNums == 3)
{
MobileAni(index == 0 || index == 2);
}
else if (pageNums == 4)
{
MobileAni(index == 0 || index == 3);
}
else if (pageNums == 5)
{
MobileAni(index == 0 || index == 2 || index == 4);
}
}
private int tmpImdex = 0;
private int scrollPanelIndex = 2;
//private float scrollValue = 0.5f;
@@ -1504,6 +1502,9 @@ public class LoginController : BaseScene
private void StartScrollPanel(int index)
{
if (startScrollPanel) return;
#if UNITY_ANDROID || UNITY_IOS
handleAnimate(index);
#endif
scrollPanelIndex = index;
startScrollPanel = true;
}
+3 -3
View File
@@ -85,7 +85,7 @@ public class MainController : BaseScene
msgs = List<CanvasGroup> { msg, msg2, msg3 };
rightMessage = transform.Find("GameObject/MessageRight").GetComponent<CanvasGroup>();
#else
msgLocation = new Vector3(168, -153, 0);
msgLocation = new Vector3(168, 37, 0);
var go = transform.Find("GameObject");
go.GetComponent<RectTransform>().anchorMin = Vector2.zero;
go.GetComponent<RectTransform>().anchorMax = Vector2.one;
@@ -182,7 +182,7 @@ public class MainController : BaseScene
m.DOFade(1, 0.5f);
foreach (var item in msgs.Where((x, i) => i != selectIndex))
{
item.transform.DOLocalMoveY(item.transform.localPosition.y + 38, 0.5f);
item.transform.DOLocalMoveY(item.transform.localPosition.y - 38, 0.5f);
}
};
}
@@ -193,7 +193,7 @@ public class MainController : BaseScene
for (int i = 0; i < msgIndex; i++)
{
var rect = msgs[i].GetComponent<RectTransform>();
rect.DOLocalMoveY(rect.localPosition.y + 38, 0.5f);
rect.DOLocalMoveY(rect.localPosition.y - 38, 0.5f);
}
m.DOFade(1, 0.5f);
}
@@ -236,7 +236,7 @@ namespace Assets.Scenes.Ride.Scripts
{
if (App.weChatController.IsWeChatAppInstalled())
{
App.weChatController.ShareWebpageToWX(0, $"{App.CurrentUser.WebHost}Mine/MatchPreview?id={cyclingController.competitionId}&Token={App.CurrentUser.cookie}", cyclingController.competition.NickName, "By " + App.CurrentUser.Nickname);
App.weChatController.ShareWebpageToWX(0, $"{App.CurrentUser.WebHost}Mine/MatchPreview?id={cyclingController.competitionId}&Token={App.CurrentUser.cookie}", cyclingController.competition.NickName, "By " + App.CurrentUser.Nickname, null);
}
else
{
@@ -99,7 +99,7 @@ namespace Assets.Scenes.Ride.Scripts
{
if (App.weChatController.IsWeChatAppInstalled())
{
App.weChatController.ShareWebpageToWX(0, $"{App.CurrentUser.WebHost}Mine/MatchPreview?id={cyclingController.competitionId}&Token={App.CurrentUser.cookie}", cyclingController.competition.NickName, "By " + App.CurrentUser.Nickname);
App.weChatController.ShareWebpageToWX(0, $"{App.CurrentUser.WebHost}Mine/MatchPreview?id={cyclingController.competitionId}&Token={App.CurrentUser.cookie}", cyclingController.competition.NickName, "By " + App.CurrentUser.Nickname,null);
}
else
{
+28 -13
View File
@@ -6,40 +6,51 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class NewMainNav : MonoBehaviour
{
public class CustomButton
{
public Sprite image;
public UnityAction action;
public CustomButton(Sprite image, UnityAction action)
{
this.image = image;
this.action = action;
}
}
private GameObject exit;
private GameObject home;
private GameObject back;
float delayTime = 0;
private List<string> typeArray = new List<string>()
{
"Back","Exit","Home","Device","Delay","Setting","Support","Avatar"
"Back","Exit","Home","Device","Delay","Setting","Support","Avatar","Custom"
};
private List<int> indexs = new List<int>();
private int? shrinkIndex = null;
private CustomButton custom = null;
/// <summary>
///
/// </summary>
/// <param name="indexs">1:"Exit",3:"Device",4:"Delay",5:"Setting",6:"Support",7:"Avatar"</param>
/// <param name="shrinkIndex">0:"Back",2:"Home",null:仅PF</param>
public void SetButtonActive(List<int> indexs,int? shrinkIndex = null)
/// <param name="indexs">仅展开显示的按钮:1:"Exit",3:"Device",4:"Delay",5:"Setting",6:"Support",7:"Avatar"</param>
/// <param name="shrinkIndex">合上后仍显示的按钮:0:"Back",2:"Home",null:仅PF</param>
/// <param name="custom">自定义按钮</param>
public void SetButtonActive(List<int> indexs,int? shrinkIndex = null, CustomButton custom = null)
{
this.indexs = indexs;
this.shrinkIndex = shrinkIndex;
this.custom = custom;
if (custom != null)
{
transform.Find("Custom").GetComponent<Button>().onClick.RemoveAllListeners();
transform.Find("Custom").GetComponent<Button>().onClick.AddListener(custom.action);
transform.Find("Custom").GetComponent<Image>().sprite = custom.image;
}
SetExpand(false);
//List<string> types = new List<string>();
//if (indexs != null)
//{
// types = typeArray.Where((x, i) => indexs.Contains(i)).ToList();
//}
//foreach (Transform item in transform)
//{
// item.gameObject.SetActive(types.Contains(item.name));
//}
}
/// <summary>
/// true:展开 false:关闭
@@ -69,6 +80,10 @@ public class NewMainNav : MonoBehaviour
{
item.gameObject.SetActive(false);
}
else if (item.name == "Custom")
{
item.gameObject.SetActive(custom != null);
}
else
{
item.gameObject.SetActive(types.Contains(item.name));
@@ -369,7 +369,7 @@ public class MapListController : PFUIPanel
}
}
Dictionary<string, Texture> caches = null;
public Dictionary<string, Texture> caches = null;
void DisplayMaps(List<MapRoute> list)
{
if (map != null)
@@ -398,7 +398,7 @@ public class MapListController : PFUIPanel
#if !(UNITY_ANDROID || UNITY_IOS)
var routeTypeName = transform.Find("Panel/Top/RouteTypeName");
#else
var routeTypeName = transform.Find("Panel/RouteTypeName");
var routeTypeName = transform.Find("RouteTypeName");
#endif
routeTypeName.GetComponent<Text>().text = App.GetLocalString(App.CurrentRouteType);
if (searchInput != null)
@@ -510,6 +510,7 @@ public class MapListController : PFUIPanel
{
transform.Find("RawImage").GetComponent<RawImage>().texture = App.DefaultRotateTexture;
}
GetComponent<MapListExtraController>().HandleCollection();
#if UNITY_ANDROID || UNITY_IOS
ResetPage();
#endif
@@ -0,0 +1,105 @@
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>
/// 处理一些额外需求
/// </summary>
public class MapListExtraController : PFUIPanel
{
private Transform typeSelector, p1, p2;
private float p1originx = 0, p2originx = 0;
private Transform tmpCollectItem;
protected override void Awake()
{
typeSelector = transform.Find("TypeSelector");
p1 = transform.Find("Panel/Panel");
p2 = transform.Find("Panel/Panel备用");
p1originx = p1.GetComponent<RectTransform>().localPosition.x;
p2originx = p2.GetComponent<RectTransform>().localPosition.x;
#if UNITY_ANDROID || UNITY_IOS
tmpCollectItem = Resources.Load<Transform>("UI/Prefab/NewRoute/Mobile/RouteItem");
#else
tmpCollectItem = Resources.Load<Transform>("UI/Prefab/NewRoute/RouteItem");
#endif
UIManager.AddEvent(typeSelector.Find("Route").gameObject, EventTriggerType.PointerClick, b =>
{
typeSelector.Find("Route").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");
typeSelector.Find("Collection").GetComponent<Text>().color = Utils.HexToColorHtml("#5c5c6e");
p1.DOLocalMoveX(p1originx, 0.5f);
p2.DOLocalMoveX(p2originx, 0.5f);
});
UIManager.AddEvent(typeSelector.Find("Collection").gameObject, EventTriggerType.PointerClick, b =>
{
typeSelector.Find("Route").GetComponent<Text>().color = Utils.HexToColorHtml("#5c5c6e");
typeSelector.Find("Collection").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");
p1.DOLocalMoveX(p1originx - 764f, 0.5f);
p2.DOLocalMoveX(p2originx - 764f, 0.5f);
});
}
protected override void Start()
{
}
void Update()
{
}
public override void Show()
{
base.Show();
}
private int pageIndex = 0;
public void HandleCollection()
{
if (App.CurrentRouteType == "My Collection")
{
typeSelector.gameObject.SetActive(true);
RefreshCollectList();
}
else
{
typeSelector.gameObject.SetActive(false);
}
p1.localPosition = new Vector3(p1originx, p1.localPosition.y, p1.localPosition.z);
p2.localPosition = new Vector3(p2originx, p2.localPosition.y, p2.localPosition.z);
typeSelector.Find("Route").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");
typeSelector.Find("Collection").GetComponent<Text>().color = Utils.HexToColorHtml("#5c5c6e");
}
private async void GetList()
{
var res = await ConfigHelper.mapApi.GetMemberMapRouteAreaList(pageIndex, 10);
if (res.result)
{
foreach (var area in res.data)
{
var item = Instantiate<Transform>(tmpCollectItem);
item.GetComponent<NewRouteItemController>().Initial(area, GetComponent<MapListController>().caches);
item.SetParent(p2.Find("Scroll View/Viewport/Content"));
}
}
}
private void RefreshCollectList()
{
p2.Find("Scroll View/Viewport/Content").DestroyChildren();
pageIndex = 0;
GetList();
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5a011dd1cd8044a418d1b92b2474ee7c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -15,15 +15,16 @@ public class NewRouteDetailController : PFUIPanel
Dictionary<string, Texture> caches;
GameObject map;
ScrollRect scroll;
Dictionary<bool, Sprite> FavDict = new Dictionary<bool, Sprite>()
{
{false,Resources.Load<Sprite>("Images/NewDesign/icon_heji_unlike") },
{true,Resources.Load<Sprite>("Images/NewDesign/icon_heji_like") },
};
Dictionary<bool, Sprite> FavDict;
List<int> routeIds { get; set; }
protected override void Awake()
{
FavDict = new Dictionary<bool, Sprite>()
{
{false,Resources.Load<Sprite>("Images/NewDesign/icon_heji_unlike") },
{true,Resources.Load<Sprite>("Images/NewDesign/icon_heji_like") },
};
caches = new Dictionary<string, Texture>();
scroll = transform.Find("Container/Right/Scroll View").GetComponent<ScrollRect>();
UIManager.AddEvent(scroll.gameObject, UnityEngine.EventSystems.EventTriggerType.EndDrag, OnEndDrag);
@@ -58,9 +59,11 @@ public class NewRouteDetailController : PFUIPanel
#if UNITY_ANDROID || UNITY_IOS
var nav = transform.Find("Tmp/MainNav-mobile").GetComponent<NewMainNav>();
nav.SetButtonActive(new List<int> { 0, 3, 4, 6, 7 }, 0);
UIManager.AddEvent(transform.Find("Container/Left/Fav").gameObject, EventTriggerType.PointerClick, async b =>
{
Assets.Scripts.Apis.JsonResult<object> res = null;
var p = ((PointerEventData)b).pointerEnter;
var act = ((PointerEventData)b).pointerEnter.GetComponent<Image>().sprite.name == "icon_heji_like";
if (act)
{
@@ -73,7 +76,7 @@ public class NewRouteDetailController : PFUIPanel
if (res.result)
{
b.selectedObject.GetComponent<Image>().sprite = FavDict[!act];
p.GetComponent<Image>().sprite = FavDict[!act];
Utils.showToast(null, App.GetLocalString("Success"), type: 1);
}
else
@@ -147,7 +150,8 @@ public class NewRouteDetailController : PFUIPanel
Utils.DisplayImageTempDict(left.Find("Icon").GetComponent<RawImage>(), area.CoverImage, caches);
Utils.DisplayImageTempDict(left.Find("Thumbnail").GetComponent<RawImage>(), area.CoverImage, caches);
}
//transform.Find("Container/Left/Fav").GetComponent<Image>().sprite;
Debug.Log(153 + area.IsFav.ToString());
left.Find("Name").GetComponent<Text>().text = area.Name;
GetData();
GetList();
@@ -178,6 +182,7 @@ public class NewRouteDetailController : PFUIPanel
.text = $"{res.data.AverageGrade.ToString("#0.00")}%";
transform.Find("Container/Left/Desc").GetComponent<Text>()
.text = res.data.Description;
transform.Find("Container/Left/Fav").GetComponent<Image>().sprite = FavDict[res.data.IsFav];
LayoutRebuilder.ForceRebuildLayoutImmediate(transform.Find("Container/Left/RideContainer").GetComponent<RectTransform>());
}
}
@@ -25,7 +25,7 @@ public class NewRouteOverviewController: PFUIPanel
scroll.onValueChanged.AddListener(p=>
{
var rect = transform.Find("Container").GetComponent<RectTransform>();
Debug.Log($"{rect.offsetMin} {rect.offsetMax}");
//Debug.Log($"{rect.offsetMin} {rect.offsetMax}");
if (p.y < 0.9)
{
DOTween.To(() => rect.offsetMax, x => rect.offsetMax = x, new Vector2(rect.offsetMax.x, -10), 0.5f);
@@ -65,7 +65,13 @@ public class NewRouteOverviewController: PFUIPanel
tmpItem = Resources.Load<Transform>("UI/Prefab/NewRoute/RouteItem");
#else
var nav = transform.Find("Tmp/MainNav-mobile").GetComponent<NewMainNav>();
nav.SetButtonActive(new List<int> { 2, 3, 4, 6, 7 }, 2);
nav.SetButtonActive(new List<int> { 2, 3, 4, 6, 7 }, 2,
new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/map_mode"),()=>
{
UIManager.PopStack();
//UIManager.ShowBigMapPanel();
UIManager.ShowEarthPanel(App.latitude, App.longitude);
}));
var rect = transform.GetComponent<RectTransform>();
rect.offsetMax = new Vector2(rect.offsetMax.x, 0);
rect.offsetMin = new Vector2(rect.offsetMin.x, 0);