修改细节
This commit is contained in:
1 parent
b3f6bb6861
commit
bac3334a01
44 files changed
+7061
-2427
No files matched your search
@@ -49,5 +49,9 @@ namespace Assets.Scripts.Apis.Models
|
||||
public double CurrentTotalClimb { get; set; }
|
||||
public double CurrentTotalDistance { get; set; }
|
||||
public double CurrentTotalKcal { get; set; }
|
||||
|
||||
public int ContinuesDay { get; set; }
|
||||
public double ContinuesKcal { get; set; }
|
||||
public double ContinuesKm { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ public delegate void ChangeLanguageDelegate();
|
||||
|
||||
public static class App
|
||||
{
|
||||
public static string Host = "http://192.168.0.101:5085/";
|
||||
public static string Host = "http://192.168.0.101:5083/";
|
||||
|
||||
public static string AppVersion = Application.version;
|
||||
|
||||
@@ -181,18 +181,19 @@ public static class App
|
||||
{
|
||||
InitLanguage();
|
||||
#if !UNITY_EDITOR
|
||||
//Host = "http://pf.juze.pro/";
|
||||
Host = "http://pf.juze.pro/";
|
||||
//Host = "http://192.168.0.101:5087/";
|
||||
//UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
||||
//TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
|
||||
UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
||||
TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
|
||||
//线上
|
||||
//Host = "https://wx.powerfun.com.cn/";
|
||||
//UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11000);
|
||||
//TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11001);
|
||||
Host = "http://192.168.0.101:5085/";
|
||||
UdpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11000);
|
||||
TcpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001);
|
||||
//Debug.unityLogger.logEnabled = false;
|
||||
//本地
|
||||
//Host = "http://192.168.0.101:5085/";
|
||||
//UdpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11000);
|
||||
//TcpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001);
|
||||
Debug.unityLogger.logEnabled = false;
|
||||
#endif
|
||||
if (!FB.IsInitialized)
|
||||
{
|
||||
|
||||
@@ -1155,6 +1155,11 @@ public class LoginController : BaseScene
|
||||
LoginBg.localPosition = Vector3.zero;
|
||||
LoginBg.GetComponent<RectTransform>().sizeDelta = new Vector2(360, 573);
|
||||
#endif
|
||||
imagedf.GetComponent<Image>().color = new Color(255, 255, 255, 0);
|
||||
imagexf.GetComponent<Image>().color = new Color(255, 255, 255, 0);
|
||||
LoginBg.GetComponent<RectTransform>().sizeDelta = new Vector2(354, 370);
|
||||
LoginBg.GetComponent<RectTransform>().localPosition = new Vector2(LoginBg.GetComponent<RectTransform>().localPosition.x, 0);
|
||||
|
||||
var scrollValue = 1f / (pageNums - 1);
|
||||
var value = 1 * scrollValue;
|
||||
scrollPanel.horizontalNormalizedPosition = value;
|
||||
|
||||
@@ -248,6 +248,16 @@ public class MainController : BaseScene
|
||||
}
|
||||
private void SetMessage(CanvasGroup m,LinkedMessageEvent e)
|
||||
{
|
||||
m.GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
m.GetComponent<Button>().onClick.AddListener(()=>
|
||||
{
|
||||
if (e.routeId > 0)
|
||||
{
|
||||
App.RouteIdParam = e.routeId;
|
||||
SceneManager.LoadScene("Ride");
|
||||
}
|
||||
//Debug.Log(e.routeId);
|
||||
});
|
||||
m.transform.Find("Avatar").GetComponent<RawImage>().texture = null;
|
||||
Utils.DisplayHead(m.transform.Find("Avatar").GetComponent<RawImage>(), e.avatar);
|
||||
m.transform.Find("Nickname").GetComponent<Text>().text = e.nickname;
|
||||
@@ -454,7 +464,7 @@ public class MainController : BaseScene
|
||||
{
|
||||
foreach (var item in res.data)
|
||||
{
|
||||
EventQueueSystem.QueueEvent(new LinkedMessageEvent(item.Id, item.Message, item.WxHeadImg, item.NickName));
|
||||
EventQueueSystem.QueueEvent(new LinkedMessageEvent(-1, item.Message, item.WxHeadImg, item.NickName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
if (App.weChatController.IsWeChatAppInstalled())
|
||||
{
|
||||
App.weChatController.ShareWebpageToWX(1, $"{App.CurrentUser.WebHost}Mine/MatchPreview?id={cyclingController.competitionId}&Token={App.CurrentUser.cookie}", cyclingController.competition.NickName, "By " + App.CurrentUser.Nickname);
|
||||
App.weChatController.ShareWebpageToWX(1, $"{App.CurrentUser.WebHost}Mine/MatchPreview?id={cyclingController.competitionId}&Token={App.CurrentUser.cookie}", cyclingController.competition.NickName, "By " + App.CurrentUser.Nickname,null);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -93,7 +93,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
|
||||
{
|
||||
@@ -105,7 +105,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,null);
|
||||
App.weChatController.ShareWebpageToWX(1, $"{App.CurrentUser.WebHost}Mine/MatchPreview?id={cyclingController.competitionId}&Token={App.CurrentUser.cookie}", cyclingController.competition.NickName, "By " + App.CurrentUser.Nickname,null);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -118,8 +118,29 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
|
||||
Utils.DisplayImageTempDict(transform.Find("MapTitleImg").GetComponent<RawImage>(), myMap.CoverImage, this.caches);
|
||||
Utils.DisplayImageTempDict(transform.Find("MapHBImg").GetComponent<RawImage>(), myMap.AltitudeGraph, this.caches);
|
||||
|
||||
|
||||
SetActive4Button(false);
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
var isRecent = App.CurrentRouteType == "Recent Routes" && myMap.RecentRecord != null && myMap.RecentRecord.ContinueCyclingParam != null;
|
||||
transform.Find("BtnContinue").gameObject.SetActive(isRecent);
|
||||
transform.Find("BtnReride").gameObject.SetActive(isRecent);
|
||||
transform.Find("MapHBImg").gameObject.SetActive(!isRecent);
|
||||
if (isRecent)
|
||||
{
|
||||
transform.Find("BtnContinue").GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
transform.Find("BtnReride").GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
transform.Find("BtnContinue").GetComponent<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
if (myMap.RecentRecord != null && myMap.RecentRecord.ContinueCyclingParam != null)
|
||||
{
|
||||
App.RouteIdParam = myMap.RecentRecord.RouteId;
|
||||
App.routeResult = myMap.RecentRecord;
|
||||
SceneManager.LoadScene("Ride");
|
||||
}
|
||||
});
|
||||
transform.Find("BtnReride").GetComponent<Button>().onClick.AddListener(Ride);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
private void Ride()
|
||||
|
||||
@@ -28,35 +28,46 @@ public class NewMainNav : MonoBehaviour
|
||||
float delayTime = 0;
|
||||
private List<string> typeArray = new List<string>()
|
||||
{
|
||||
"Back","Exit","Home","Device","Delay","Setting","Support","Avatar","Custom"
|
||||
"Back","Exit","Home","Device","Delay","Setting","Support","Avatar","Custom","Custom2"
|
||||
};
|
||||
private List<int> indexs = new List<int>();
|
||||
private int? shrinkIndex = null;
|
||||
private CustomButton custom = null;
|
||||
private CustomButton custom = null,custom2 = 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>
|
||||
/// <param name="custom">自定义按钮</param>
|
||||
public void SetButtonActive(List<int> indexs,int? shrinkIndex = null, CustomButton custom = null)
|
||||
/// <param name="custom">自定义按钮 8:c1 9:c2</param>
|
||||
public void SetButtonActive(List<int> indexs,int? shrinkIndex = null, CustomButton custom = null, CustomButton custom2 = null)
|
||||
{
|
||||
this.indexs = indexs;
|
||||
this.shrinkIndex = shrinkIndex;
|
||||
this.custom = custom;
|
||||
this.custom2 = custom2;
|
||||
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;
|
||||
indexs.Add(8);
|
||||
}
|
||||
if (custom2 != null)
|
||||
{
|
||||
transform.Find("Custom2").GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
transform.Find("Custom2").GetComponent<Button>().onClick.AddListener(custom2.action);
|
||||
transform.Find("Custom2").GetComponent<Image>().sprite = custom2.image;
|
||||
indexs.Add(9);
|
||||
}
|
||||
SetExpand(false);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// true:展开 false:关闭
|
||||
/// </summary>
|
||||
/// <param name="flag"></param>
|
||||
private void SetExpand(bool flag)
|
||||
public void SetExpand(bool flag)
|
||||
{
|
||||
List<string> types = new List<string>();
|
||||
if (indexs != null)
|
||||
@@ -82,7 +93,11 @@ public class NewMainNav : MonoBehaviour
|
||||
}
|
||||
else if (item.name == "Custom")
|
||||
{
|
||||
item.gameObject.SetActive(custom != null);
|
||||
item.gameObject.SetActive(custom != null && types.Contains(item.name));
|
||||
}
|
||||
else if (item.name == "Custom2")
|
||||
{
|
||||
item.gameObject.SetActive(custom2 != null && types.Contains(item.name));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -96,6 +111,30 @@ public class NewMainNav : MonoBehaviour
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowButton(string v)
|
||||
{
|
||||
var i = typeArray.FindIndex((x)=>x == v);
|
||||
if (i == -1 || i == 0 || i == 2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
indexs.Add(i);
|
||||
SetExpand(false);
|
||||
}
|
||||
public void HideButton(string v)
|
||||
{
|
||||
var i = typeArray.FindIndex((x) => x == v);
|
||||
if (i == -1 || i == 0 || i == 2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Debug.Log(i);
|
||||
indexs.RemoveAll(x => x == i);
|
||||
SetExpand(false);
|
||||
}
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Utils.DisplayHead(transform.Find("Avatar").GetComponent<Image>(), App.CurrentUser.WxHeadImg);
|
||||
|
||||
@@ -70,6 +70,17 @@ public class BigMapController : PFUIPanel
|
||||
begin = Resources.Load("UI/Prefab/BigMap/Begin");
|
||||
|
||||
StartCoroutine("Main");
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
var nav = transform.Find("Canvas/Tmp/MainNav-mobile").GetComponent<NewMainNav>();
|
||||
nav.SetButtonActive(new List<int> { 2, 3, 4, 6, 7 }, 2,
|
||||
custom: new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/搜索"), () =>
|
||||
{
|
||||
mapManager.Destroy();
|
||||
UIManager.PopStack();
|
||||
UIManager.ShowNewRouteOverviewPanel();
|
||||
}));
|
||||
newNav = nav;
|
||||
#endif
|
||||
}
|
||||
|
||||
IEnumerator Main()
|
||||
|
||||
@@ -70,6 +70,13 @@ public class EarthController : PFUIPanel
|
||||
panel = rootPanel.Find("Panel").gameObject;
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
SetRounded(panel.transform, 20);
|
||||
var nav = transform.Find("Canvas/Panel/Tmp/MainNav-mobile").GetComponent<NewMainNav>();
|
||||
nav.SetButtonActive(new List<int> { 2, 3, 4, 6, 7 }, 2,
|
||||
custom: new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/搜索"), () =>
|
||||
{
|
||||
UIManager.ShowNewRouteOverviewPanel();
|
||||
}));
|
||||
newNav = nav;
|
||||
#else
|
||||
SetRounded(panel.transform, 60);
|
||||
#endif
|
||||
|
||||
@@ -38,10 +38,15 @@ public class HomeController : PFUIPanel
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
var nav = transform.Find("MainNav-mobile").GetComponent<NewMainNav>();
|
||||
nav.SetButtonActive(new List<int> { 1, 3, 4, 6 });
|
||||
newNav = nav;
|
||||
UIManager.AddEvent(transform.Find("TodayData/Avatar").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
UIManager.ShowUserInfoPanel();
|
||||
});
|
||||
UIManager.AddEvent(transform.Find("TodayData/Datas/Distance").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
UIManager.ShowResultListPanel();
|
||||
});
|
||||
#else
|
||||
mainNav = this.transform.Find("MainNav").GetComponent<MainNav>();
|
||||
mainNav.ShowExit();
|
||||
@@ -237,13 +242,17 @@ public class HomeController : PFUIPanel
|
||||
: App.CurrentUser.LastUpdateWeightTime.ToString("dd.MM.yyyy");
|
||||
//新版设计稿
|
||||
var todayData = transform.Find("TodayData");
|
||||
Utils.DisplayHead(todayData.Find("Avatar").GetComponent<RawImage>(), App.CurrentUser.WxHeadImg);
|
||||
todayData.Find("Datas/Distance/Value").GetComponent<Text>().text = $"{summary.TotalDistance.ToString("#0")}KM";
|
||||
todayData.Find("Datas/Climb/Value").GetComponent<Text>().text = $"{double.Parse(summary.TotalClimb, CultureInfo.InvariantCulture).ToString("0")}M";
|
||||
todayData.Find("Datas/Carlories/Value").GetComponent<Text>().text = $"{summary.TotalKj.ToString("#0")}KCAL";
|
||||
todayData.Find("Datas/Distance/Rank").GetComponent<Text>().text = summary.CurrentTotalDistance==0? "——" : $"+{summary.CurrentTotalDistance.ToString("#0")}";
|
||||
todayData.Find("Datas/Climb/Rank").GetComponent<Text>().text = summary.CurrentTotalClimb == 0 ? "——" : $"+{summary.CurrentTotalClimb.ToString("#0")}";
|
||||
todayData.Find("Datas/Carlories/Rank").GetComponent<Text>().text = summary.CurrentTotalKcal == 0 ? "——" : $"+{summary.CurrentTotalKcal.ToString("#0")}";
|
||||
if (todayData)
|
||||
{
|
||||
Utils.DisplayHead(todayData.Find("Avatar").GetComponent<RawImage>(), App.CurrentUser.WxHeadImg);
|
||||
todayData.Find("Datas/Distance/Value").GetComponent<Text>().text = $"{summary.ContinuesDay}"+ (summary.ContinuesDay > 1 ? App.GetLocalString("DAYS") : App.GetLocalString("DAY"));
|
||||
todayData.Find("Datas/Climb/Value").GetComponent<Text>().text = $"{summary.TotalDistance.ToString("#0")}KM";//$"{double.Parse(summary.TotalClimb, CultureInfo.InvariantCulture).ToString("0")}M";
|
||||
todayData.Find("Datas/Carlories/Value").GetComponent<Text>().text = $"{summary.TotalKj.ToString("#0")}KCAL";
|
||||
//todayData.Find("Datas/Distance/Rank").GetComponent<Text>().text = summary.CurrentTotalDistance == 0 ? "——" : $"+{summary.CurrentTotalDistance.ToString("#0")}";
|
||||
todayData.Find("Datas/Climb/Rank").GetComponent<Text>().text = summary.CurrentTotalDistance == 0 ? "——" : $"+{summary.CurrentTotalDistance.ToString("#0")}";
|
||||
todayData.Find("Datas/Carlories/Rank").GetComponent<Text>().text = summary.CurrentTotalKcal == 0 ? "——" : $"+{summary.CurrentTotalKcal.ToString("#0")}";
|
||||
}
|
||||
|
||||
}
|
||||
async void GetSummary()
|
||||
{
|
||||
|
||||
@@ -44,6 +44,8 @@ public class MapListController : PFUIPanel
|
||||
return content;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private bool isEnd = false;
|
||||
private Transform topContainer;
|
||||
void ResetPage()
|
||||
@@ -82,10 +84,7 @@ public class MapListController : PFUIPanel
|
||||
var mc = transform.Find("MC");
|
||||
UIManager.AddEvent(transform.Find("SwitchMode/BtnFilter").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
topContainer.DOLocalMoveX(App.topRectStartX.Value + topRect.rect.width, 0.3f);
|
||||
mc.gameObject.SetActive(true);
|
||||
mc.GetComponent<CanvasGroup>().alpha = 0;
|
||||
mc.GetComponent<CanvasGroup>().DOFade(1, 0.3f);
|
||||
OpenFilter();
|
||||
});
|
||||
UIManager.AddEvent(mc.gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
@@ -96,6 +95,14 @@ public class MapListController : PFUIPanel
|
||||
};
|
||||
});
|
||||
map = Resources.Load<GameObject>("UI/Prefab/MapList/MapItem-Mobile");
|
||||
Debug.Log(98);
|
||||
var nav = transform.Find("Tmp/MainNav-mobile").GetComponent<NewMainNav>();
|
||||
nav.SetButtonActive(new List<int> { 0, 3, 4, 6, 7 }, 0,
|
||||
new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/Mobile/map_筛选"), () =>
|
||||
{
|
||||
OpenFilter();
|
||||
}));
|
||||
newNav = nav;
|
||||
#else
|
||||
topContainer = transform.Find("Panel").Find("Top");
|
||||
#endif
|
||||
@@ -106,9 +113,10 @@ public class MapListController : PFUIPanel
|
||||
{
|
||||
Application.OpenURL("http://192.168.0.101:3081/Mine/Upload?token="+ App.CurrentUser.cookie);
|
||||
});
|
||||
|
||||
#endif
|
||||
transform.Find("MainNav").GetComponent<MainNav>().ShowBack();
|
||||
#endif
|
||||
|
||||
|
||||
sort = "Near";
|
||||
sortDire = "asc";
|
||||
//if (hardSelector != null)
|
||||
@@ -278,6 +286,22 @@ public class MapListController : PFUIPanel
|
||||
}
|
||||
caches = new Dictionary<string, Texture>();
|
||||
}
|
||||
public void OpenFilter()
|
||||
{
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
var topRect = transform.Find("Top").GetComponent<RectTransform>();
|
||||
if (!App.topRectStartX.HasValue)
|
||||
{
|
||||
App.topRectStartX = topRect.localPosition.x;
|
||||
}
|
||||
topRect.DOLocalMoveX(App.topRectStartX.Value + topRect.rect.width, 0.3f);
|
||||
var mc = transform.Find("MC");
|
||||
mc.gameObject.SetActive(true);
|
||||
mc.GetComponent<CanvasGroup>().alpha = 0;
|
||||
mc.GetComponent<CanvasGroup>().DOFade(1, 0.3f);
|
||||
#endif
|
||||
topRect.Find("SearchInput").GetComponent<InputField>().OnPointerClick(new PointerEventData(EventSystem.current));
|
||||
}
|
||||
void onEndEdit()
|
||||
{
|
||||
var t = searchInput.GetComponent<InputField>().text;
|
||||
|
||||
@@ -40,6 +40,7 @@ public class MapListExtraController : PFUIPanel
|
||||
typeSelector.Find("Collection").GetComponent<Text>().color = Utils.HexToColorHtml("#5c5c6e");
|
||||
p1.DOLocalMoveX(p1originx, 0.5f);
|
||||
p2.DOLocalMoveX(p2originx, 0.5f);
|
||||
transform.Find("Tmp/MainNav-mobile").GetComponent<NewMainNav>().ShowButton("Custom");
|
||||
});
|
||||
UIManager.AddEvent(typeSelector.Find("Collection").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
@@ -47,6 +48,7 @@ public class MapListExtraController : PFUIPanel
|
||||
typeSelector.Find("Collection").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");
|
||||
p1.DOLocalMoveX(p1originx - 764f, 0.5f);
|
||||
p2.DOLocalMoveX(p2originx - 764f, 0.5f);
|
||||
transform.Find("Tmp/MainNav-mobile").GetComponent<NewMainNav>().HideButton("Custom");
|
||||
});
|
||||
|
||||
}
|
||||
@@ -82,6 +84,7 @@ public class MapListExtraController : PFUIPanel
|
||||
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");
|
||||
transform.Find("Tmp/MainNav-mobile").GetComponent<NewMainNav>().ShowButton("Custom");
|
||||
}
|
||||
private async void GetList()
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ 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);
|
||||
|
||||
newNav = nav;
|
||||
UIManager.AddEvent(transform.Find("Container/Left/Fav").gameObject, EventTriggerType.PointerClick, async b =>
|
||||
{
|
||||
Assets.Scripts.Apis.JsonResult<object> res = null;
|
||||
|
||||
@@ -72,6 +72,7 @@ public class NewRouteOverviewController: PFUIPanel
|
||||
//UIManager.ShowBigMapPanel();
|
||||
UIManager.ShowEarthPanel(App.latitude, App.longitude);
|
||||
}));
|
||||
newNav = nav;
|
||||
var rect = transform.GetComponent<RectTransform>();
|
||||
rect.offsetMax = new Vector2(rect.offsetMax.x, 0);
|
||||
rect.offsetMin = new Vector2(rect.offsetMin.x, 0);
|
||||
@@ -110,6 +111,10 @@ public class NewRouteOverviewController: PFUIPanel
|
||||
{
|
||||
ToList("All Route");
|
||||
});
|
||||
UIManager.AddEvent(transform.Find("Container/BtnSearch").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
GoSearch();
|
||||
});
|
||||
BindHeadImage();
|
||||
//banner暂时注释
|
||||
//#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
@@ -202,13 +207,22 @@ public class NewRouteOverviewController: PFUIPanel
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定头像
|
||||
///
|
||||
/// </summary>
|
||||
void ToList(string type)
|
||||
{
|
||||
App.CurrentRouteType = type;// "";
|
||||
UIManager.ShowMapListPanel();
|
||||
}
|
||||
|
||||
void GoSearch()
|
||||
{
|
||||
App.CurrentRouteType = "All Route";// "";
|
||||
UIManager.ShowMapListPanel(panel=>
|
||||
{
|
||||
panel.OpenFilter();
|
||||
});
|
||||
}
|
||||
public override void Show()
|
||||
{
|
||||
base.Show();
|
||||
|
||||
@@ -12,7 +12,7 @@ using Assets.Scripts;
|
||||
//{
|
||||
public class PFUIPanel : UIBehaviour
|
||||
{
|
||||
|
||||
public NewMainNav newNav = null;
|
||||
public void OpenURL(string url)
|
||||
{
|
||||
Application.OpenURL(url);
|
||||
|
||||
@@ -75,6 +75,14 @@ public class RaceHomeScript : RaceScript
|
||||
btnGoList = rightContainer.Find("Container-2/BtnGoList");
|
||||
#else
|
||||
btnGoList = rightContainer.Find("BtnGoList");
|
||||
var nav = transform.Find("Tmp/MainNav-mobile").GetComponent<NewMainNav>();
|
||||
nav.SetButtonActive(new List<int> { 0, 3, 4, 6, 7 }, 0,
|
||||
custom: new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/Race/back down"), () =>
|
||||
{
|
||||
//OpenFilter();
|
||||
UIManager.ShowRaceListPanel();
|
||||
}));
|
||||
newNav = nav;
|
||||
#endif
|
||||
if (btnGoList != null)
|
||||
{
|
||||
|
||||
@@ -245,6 +245,18 @@ public class RaceListScript : RaceScript
|
||||
mc.gameObject.SetActive(false);
|
||||
};
|
||||
});
|
||||
|
||||
var nav = transform.Find("Tmp/MainNav-mobile").GetComponent<NewMainNav>();
|
||||
nav.SetButtonActive(new List<int> { 0, 3, 4, 6, 7 }, 0,
|
||||
custom: new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/Mobile/map_筛选"), () =>
|
||||
{
|
||||
//OpenFilter();
|
||||
conditions.DOLocalMoveX(App.topRectStartX.Value + topRect.rect.width, 0.3f);
|
||||
mc.gameObject.SetActive(true);
|
||||
mc.GetComponent<CanvasGroup>().alpha = 0;
|
||||
mc.GetComponent<CanvasGroup>().DOFade(1, 0.3f);
|
||||
}));
|
||||
newNav = nav;
|
||||
#else
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -615,6 +615,10 @@ public class UIManager : MonoBehaviour
|
||||
//prePanel = panelToShow;
|
||||
prePanel = currentPanel;
|
||||
currentPanel = panelToShow;
|
||||
if (panelToShow.newNav != null)
|
||||
{
|
||||
panelToShow.newNav.SetExpand(false);
|
||||
}
|
||||
stack.Push(panelToShow);
|
||||
}
|
||||
if (parent != null && parent.IsActive() == false)
|
||||
@@ -799,12 +803,16 @@ public class UIManager : MonoBehaviour
|
||||
}
|
||||
|
||||
|
||||
public static void ShowMapListPanel()
|
||||
public static void ShowMapListPanel(UnityAction<MapListController> after = null)
|
||||
{
|
||||
Debug.Log("清空");
|
||||
//App.propTextureCache["recordCache"].Clear();
|
||||
//UIManager.Instance.MapListPanel.ResetPanel();
|
||||
UIManager.Show(UIManager.Instance.MapListPanel, UIManager.Instance.MainPanel);
|
||||
if (after != null)
|
||||
{
|
||||
after(UIManager.Instance.MapListPanel);
|
||||
}
|
||||
}
|
||||
public static void ShowMapDetailPanel(int id)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user