修改nav;增加消息弹窗
This commit is contained in:
1 parent
2d38b63c91
commit
f5385e31d6
24 files changed
+2061
-1505
No files matched your search
@@ -19,7 +19,7 @@ public delegate void ChangeLanguageDelegate();
|
||||
|
||||
public static class App
|
||||
{
|
||||
public static string Host = "http://192.168.0.101:5083/";
|
||||
public static string Host = "http://192.168.0.101:5085/";
|
||||
|
||||
public static string AppVersion = Application.version;
|
||||
|
||||
@@ -193,7 +193,7 @@ public static class App
|
||||
//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;
|
||||
//Debug.unityLogger.logEnabled = false;
|
||||
#else
|
||||
//Host = "http://pf.juze.pro/";
|
||||
//Host = "http://192.168.0.101:5087/";
|
||||
|
||||
@@ -60,6 +60,10 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
|
||||
FB.LogOut();
|
||||
FB.LogInWithReadPermissions(callback: onFaceBookResp);
|
||||
});
|
||||
UIManager.AddEvent(transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer/otherContainer/Google").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
Utils.CallAndroidMethod("signInWithGoogle");
|
||||
});
|
||||
//App.weChatController.Init(App.WxAppId);
|
||||
//var s = App.weChatController.isApplicationAvilible("com.gugoumainapp","powerfun").ToString();
|
||||
//Utils.showToast(null, SystemInfo.batteryLevel.ToString());
|
||||
@@ -190,6 +194,19 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
|
||||
}
|
||||
}
|
||||
|
||||
public void OnMobileGoogleLoginResp(string res)
|
||||
{
|
||||
Utils.showToast(null, res);
|
||||
//if (res.Contains("true;"))
|
||||
//{
|
||||
// GetComponent<LoginController>().goWxLoginWithCode(res.Replace("true;", ""), "mobile");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Utils.showToast(null, res.Replace("false;", ""));
|
||||
//}
|
||||
}
|
||||
|
||||
public void OnAppleResp(string res)
|
||||
{
|
||||
#if UNITY_IOS
|
||||
|
||||
@@ -269,11 +269,16 @@ public class MainController : BaseScene
|
||||
{
|
||||
if (e.routeId > 0)
|
||||
{
|
||||
UIManager.ShowConfirm(App.GetLocalString("RIDE NOW"), App.GetLocalLanguage() == "zh"? $"<color=#fff>是否要加入</color><color=#f93086>{e.routeName}</color><color=#fff>骑行?</color>" :$"<color=#fff>Join</color> <color=#f93086>{e.routeName}</color><color=#fff>?</color>", () =>
|
||||
{
|
||||
App.RouteIdParam = e.routeId;
|
||||
SceneManager.LoadScene("Ride");
|
||||
});
|
||||
var res = ConfigHelper.mapApi.GetById(e.routeId);
|
||||
if (res.result)
|
||||
{
|
||||
UIManager.ShowStartRideModal(res.data);
|
||||
}
|
||||
//UIManager.ShowConfirm(App.GetLocalString("RIDE NOW"), App.GetLocalLanguage() == "zh"? $"<color=#fff>是否要加入</color><color=#f93086>{e.routeName}</color><color=#fff>骑行?</color>" :$"<color=#fff>Join</color> <color=#f93086>{e.routeName}</color><color=#fff>?</color>", () =>
|
||||
// {
|
||||
// App.RouteIdParam = e.routeId;
|
||||
// SceneManager.LoadScene("Ride");
|
||||
// });
|
||||
}
|
||||
//Debug.Log(e.routeId);
|
||||
});
|
||||
|
||||
@@ -20,6 +20,7 @@ public class PropNames
|
||||
}
|
||||
public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,IPointerUpHandler
|
||||
{
|
||||
public bool isModal = false;
|
||||
float width;
|
||||
float height;
|
||||
void Awake()
|
||||
@@ -88,8 +89,12 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
// }
|
||||
// SceneManager.LoadScene("Ride");
|
||||
//});
|
||||
transform.GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
transform.GetComponent<Button>().onClick.AddListener(Ride);
|
||||
if (!isModal)
|
||||
{
|
||||
transform.GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
transform.GetComponent<Button>().onClick.AddListener(Ride);
|
||||
}
|
||||
|
||||
transform.Find("Name").GetComponent<Text>().text = myMap.Name;
|
||||
|
||||
transform.Find("IdContainer/Text").GetComponent<Text>().text = $"#{myMap.Id}";
|
||||
@@ -106,8 +111,11 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
diff.Find("Text").GetComponent<Text>().text = myMap.Hard;
|
||||
tabContainer.Find("3d").gameObject.SetActive(myMap.Enable3D);
|
||||
tabContainer.Find("Country").GetComponent<RawImage>().texture = UIManager.Instance.loginRegOptions.GetCountryImage(myMap.CountryCode);
|
||||
transform.Find("CollectImg").GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
transform.Find("CollectImg").GetComponent<Button>().onClick.AddListener(Collect);
|
||||
if (!isModal)
|
||||
{
|
||||
transform.Find("CollectImg").GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
transform.Find("CollectImg").GetComponent<Button>().onClick.AddListener(Collect);
|
||||
}
|
||||
transform.Find("CollectImg").Find("Image").GetComponent<Image>().sprite =
|
||||
UIManager.Instance.collectDict[myMap.IsFavorite];
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
@@ -121,7 +129,7 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
|
||||
SetActive4Button(false);
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
var isRecent = App.CurrentRouteType == "Recent Routes" && myMap.RecentRecord != null && myMap.RecentRecord.ContinueCyclingParam != null;
|
||||
var isRecent = App.CurrentRouteType == "Recent Routes" && myMap.RecentRecord != null && myMap.RecentRecord.ContinueCyclingParam != null && !isModal;
|
||||
transform.Find("BtnContinue").gameObject.SetActive(isRecent);
|
||||
transform.Find("BtnReride").gameObject.SetActive(isRecent);
|
||||
transform.Find("MapHBImg").gameObject.SetActive(!isRecent);
|
||||
|
||||
@@ -81,6 +81,7 @@ public class MapListController : PFUIPanel
|
||||
{
|
||||
topRect.sizeDelta = new Vector2(topRect.sizeDelta.x + 20, topRect.sizeDelta.y);
|
||||
}
|
||||
|
||||
var mc = transform.Find("MC");
|
||||
UIManager.AddEvent(transform.Find("SwitchMode/BtnFilter").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
@@ -88,11 +89,7 @@ public class MapListController : PFUIPanel
|
||||
});
|
||||
UIManager.AddEvent(mc.gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
topContainer.DOLocalMoveX(App.topRectStartX.Value, 0.3f);
|
||||
mc.GetComponent<CanvasGroup>().DOFade(0, 0.3f).onComplete = () =>
|
||||
{
|
||||
mc.gameObject.SetActive(false);
|
||||
};
|
||||
CloseFilter();
|
||||
});
|
||||
map = Resources.Load<GameObject>("UI/Prefab/MapList/MapItem-Mobile");
|
||||
Debug.Log(98);
|
||||
@@ -286,9 +283,22 @@ public class MapListController : PFUIPanel
|
||||
}
|
||||
caches = new Dictionary<string, Texture>();
|
||||
}
|
||||
|
||||
public void CloseFilter()
|
||||
{
|
||||
var mc = transform.Find("MC");
|
||||
topContainer.Find("Return").gameObject.SetActive(false);
|
||||
topContainer.DOLocalMoveX(App.topRectStartX.Value, 0.3f);
|
||||
mc.GetComponent<CanvasGroup>().DOFade(0, 0.3f).onComplete = () =>
|
||||
{
|
||||
mc.gameObject.SetActive(false);
|
||||
};
|
||||
}
|
||||
|
||||
public void OpenFilter(bool isFocusSearch = true)
|
||||
{
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
topContainer.Find("Return").gameObject.SetActive(true);
|
||||
var topRect = transform.Find("Top").GetComponent<RectTransform>();
|
||||
if (!App.topRectStartX.HasValue)
|
||||
{
|
||||
@@ -540,6 +550,7 @@ public class MapListController : PFUIPanel
|
||||
GetComponent<MapListExtraController>().HandleCollection();
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
ResetPage();
|
||||
transform.Find("Top/Return").gameObject.SetActive(false);
|
||||
#endif
|
||||
ResetPanel();
|
||||
transform.MyDOFade();
|
||||
|
||||
@@ -31,9 +31,14 @@ public class MapListExtraController : PFUIPanel
|
||||
p2originx = p2.GetComponent<RectTransform>().localPosition.x;
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
tmpCollectItem = Resources.Load<Transform>("UI/Prefab/NewRoute/Mobile/RouteItem");
|
||||
UIManager.AddEvent(transform.Find("Top/Return").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
GetComponent<MapListController>().CloseFilter();
|
||||
});
|
||||
#else
|
||||
tmpCollectItem = Resources.Load<Transform>("UI/Prefab/NewRoute/RouteItem");
|
||||
#endif
|
||||
|
||||
UIManager.AddEvent(typeSelector.Find("Container/Route").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
typeSelector.Find("Container/Route").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");
|
||||
|
||||
@@ -383,6 +383,22 @@ public class UIManager : MonoBehaviour
|
||||
//UIManager.Show(UIManager.Instance.RaceListPanel, UIManager.Instance.MainPanel);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region
|
||||
private StartRideModal mStartRideModal;
|
||||
public StartRideModal StartRideModalObj
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetPanelInstance("StartRideModal", ref this.mStartRideModal);
|
||||
}
|
||||
}
|
||||
public static void ShowStartRideModal(MapRoute map)
|
||||
{
|
||||
UIManager.Instance.StartRideModalObj.GetComponent<StartRideModal>().Initial(map);
|
||||
UIManager.Show(UIManager.Instance.StartRideModalObj, null, true);
|
||||
}
|
||||
#endregion
|
||||
private PFUIPanel mModalsPanel;
|
||||
public PFUIPanel ModalsPanel
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user