请求公开线路;增加移动版
This commit is contained in:
1 parent
01df299251
commit
c3514df331
24 files changed
+4429
-1322
No files matched your search
@@ -19,6 +19,8 @@ public class MailListController : PFUIPanel
|
||||
scroll = transform.Find("Container/Content/Right/Scroll View").GetComponent<ScrollRect>();
|
||||
#if UNITY_STANDALONE_WIN
|
||||
mail = Resources.Load<GameObject>("UI/Prefab/Mail/MailItem");
|
||||
#else
|
||||
mail = Resources.Load<GameObject>("UI/Prefab/Mail/MailItem-mob");
|
||||
#endif
|
||||
}
|
||||
public override void Show()
|
||||
|
||||
@@ -92,7 +92,10 @@ public class MainNav : MonoBehaviour
|
||||
|
||||
private void ShowMailDot(object sender, EventArgs e)
|
||||
{
|
||||
transform.Find("Mail/Dot").gameObject.SetActive((bool)sender);
|
||||
if (transform)
|
||||
{
|
||||
transform.Find("Mail/Dot").gameObject.SetActive((bool)sender);
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowRowerTab()
|
||||
|
||||
@@ -114,10 +114,21 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
if (!isModal)
|
||||
{
|
||||
transform.Find("CollectImg").GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
transform.Find("CollectImg").GetComponent<Button>().onClick.AddListener(Collect);
|
||||
if (App.CurrentRouteType == "My Upload")
|
||||
{
|
||||
transform.Find("CollectImg").GetComponent<Button>().onClick.AddListener(ApplyOpenRoute);
|
||||
}
|
||||
else
|
||||
{
|
||||
transform.Find("CollectImg").GetComponent<Button>().onClick.AddListener(Collect);
|
||||
}
|
||||
}
|
||||
transform.Find("CollectImg").Find("Image").GetComponent<Image>().sprite =
|
||||
UIManager.Instance.collectDict[myMap.IsFavorite];
|
||||
App.CurrentRouteType != "My Upload"?UIManager.Instance.collectDict[myMap.IsFavorite]: UIManager.Instance.uploadDict[myMap.IsEnabled];
|
||||
if (App.CurrentRouteType == "My Upload")
|
||||
{
|
||||
transform.Find("CollectImg").Find("Image").GetComponent<RectTransform>().sizeDelta = new Vector2(25, 20f);
|
||||
}
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
transform.Find("CollectImg").gameObject.SetActive(false);
|
||||
#endif
|
||||
@@ -165,6 +176,30 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyOpenRoute()
|
||||
{
|
||||
if (!map.IsEnabled)
|
||||
{
|
||||
UIManager.ShowConfirm(App.GetLocalString("Request to make the route public"), App.GetLocalString("Do you want to make the route public?"), async () =>
|
||||
{
|
||||
var res = await ConfigHelper.mapApi.ApplyOpenRoute(map.Id);
|
||||
if (res.result)
|
||||
{
|
||||
Utils.showToast(null, App.GetLocalString("Submitted, please wait for background review."), type: 1);
|
||||
UIManager.CloseConfirm();
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.showToast(null, res.errMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.showToast(null, App.GetLocalString("Route is public."), type: 1);
|
||||
}
|
||||
}
|
||||
|
||||
private void Ride()
|
||||
{
|
||||
App.RouteIdParam = map.Id;
|
||||
|
||||
@@ -28,7 +28,7 @@ public class NewMainNav : MonoBehaviour
|
||||
float delayTime = 0;
|
||||
private List<string> typeArray = new List<string>()
|
||||
{
|
||||
"Back","Exit","Home","Device","Delay","Setting","Support","Avatar","Custom","Custom2"
|
||||
"Back","Exit","Home","Device","Delay","Setting","Support","Avatar","Custom","Custom2","Mail"
|
||||
};
|
||||
private List<int> indexs = new List<int>();
|
||||
private int? shrinkIndex = null;
|
||||
@@ -42,6 +42,8 @@ public class NewMainNav : MonoBehaviour
|
||||
public void SetButtonActive(List<int> indexs,int? shrinkIndex = null, CustomButton custom = null, CustomButton custom2 = null)
|
||||
{
|
||||
this.indexs = indexs;
|
||||
//邮箱常驻
|
||||
this.indexs.Add(10);
|
||||
this.shrinkIndex = shrinkIndex;
|
||||
this.custom = custom;
|
||||
this.custom2 = custom2;
|
||||
@@ -212,8 +214,21 @@ public class NewMainNav : MonoBehaviour
|
||||
{
|
||||
UIManager.ShowFeedBackModal();
|
||||
});
|
||||
|
||||
UIManager.AddEvent(transform.Find("Mail").gameObject, EventTriggerType.PointerClick, x =>
|
||||
{
|
||||
UIManager.ShowMailListPanel();
|
||||
});
|
||||
App.HasNotReadChanged -= ShowMailDot;
|
||||
App.HasNotReadChanged += ShowMailDot;
|
||||
}
|
||||
private void ShowMailDot(object sender, EventArgs e)
|
||||
{
|
||||
if (transform)
|
||||
{
|
||||
transform.Find("Mail/Dot").gameObject.SetActive((bool)sender);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void ShowRowerTab()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user