结果列表页,用户页
This commit is contained in:
1 parent
89e3a04fe9
commit
e1a85eeb5e
14 files changed
+7393
-4408
No files matched your search
@@ -248,15 +248,7 @@ public class EditUserController : PFUIPanel
|
||||
}
|
||||
private void Switch(BaseEventData arg0)
|
||||
{
|
||||
UIManager.ShowConfirm("Logout", "Do you want to log out and change accounts?", () =>
|
||||
{
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
SceneManager.LoadScene("Login");
|
||||
#else
|
||||
SceneManager.LoadScene("Login-Mobile");
|
||||
#endif
|
||||
UIManager.CloseConfirm();
|
||||
},2);
|
||||
UIManager.SwitchAccount();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
|
||||
@@ -29,15 +29,7 @@ public class UserInfoController : PFUIPanel
|
||||
UIManager.AddEvent(transform.Find("InfoPanel").Find("SwitchAccountButton").gameObject,
|
||||
EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
UIManager.ShowConfirm("Logout", "Do you want to log out and change accounts?", () =>
|
||||
{
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
SceneManager.LoadScene("Login");
|
||||
#else
|
||||
SceneManager.LoadScene("Login-Mobile");
|
||||
#endif
|
||||
UIManager.CloseConfirm();
|
||||
},2);
|
||||
UIManager.SwitchAccount();
|
||||
});
|
||||
infoPanel = transform.Find("InfoPanel").Find("P");
|
||||
|
||||
@@ -57,9 +49,10 @@ public class UserInfoController : PFUIPanel
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
editBtn.gameObject.SetActive(true);
|
||||
var recordBtn = infoPanel.Find("RecordButton");
|
||||
UIManager.AddEvent(recordBtn.gameObject, EventTriggerType.PointerEnter, (b) =>
|
||||
UIManager.AddEvent(recordBtn.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
Debug.Log("去看記錄");
|
||||
Debug.Log(62);
|
||||
UIManager.ShowResultListPanel();
|
||||
});
|
||||
#else
|
||||
UIManager.AddEvent(transform.Find("InfoPanel").gameObject, EventTriggerType.PointerEnter, (b) =>
|
||||
|
||||
@@ -9,7 +9,7 @@ using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class ResultListController : MonoBehaviour
|
||||
public class ResultListController : PFUIPanel
|
||||
{
|
||||
[SerializeField]Transform routeResult;
|
||||
Transform localRouteItem;
|
||||
@@ -296,6 +296,7 @@ public class ResultListController : MonoBehaviour
|
||||
var value = index * scrollValue;
|
||||
if (scroll != null && startScroll)
|
||||
{
|
||||
#if (UNITY_ANDROID || UNITY_IOS)
|
||||
if (scroll.horizontalNormalizedPosition >= value)
|
||||
{
|
||||
scroll.horizontalNormalizedPosition -= (scrollValue / 20);
|
||||
@@ -316,9 +317,33 @@ public class ResultListController : MonoBehaviour
|
||||
startScroll = false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
//if (scroll.verticalNormalizedPosition <= 1)
|
||||
//{
|
||||
// scroll.verticalNormalizedPosition =0;
|
||||
// Debug.Log($"{scroll.verticalNormalizedPosition},{scrollValue/20}");
|
||||
// if (scroll.verticalNormalizedPosition <= 0)
|
||||
// {
|
||||
// Debug.Log(index);
|
||||
// scroll.verticalNormalizedPosition = 0;
|
||||
// startScroll = false;
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// scroll.verticalNormalizedPosition += (scrollValue / 20);
|
||||
// Debug.Log($"反向:{scroll.verticalNormalizedPosition},{scrollValue / 20}");
|
||||
// if (scroll.verticalNormalizedPosition >= 1)
|
||||
// {
|
||||
// Debug.Log(index);
|
||||
// scroll.verticalNormalizedPosition = 1;
|
||||
// startScroll = false;
|
||||
// }
|
||||
//}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
//float scrollIndex = 0;
|
||||
//bool startScroll = false;
|
||||
//ScrollRect scroll;
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ResultListPanelController : PFUIPanel
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
UIManager.AddEvent(transform.Find("LTPanel/Button").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
UIManager.ShowPrePanel();
|
||||
});
|
||||
UIManager.AddEvent(transform.Find("LTPanel/SwitchAccountButton").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
UIManager.SwitchAccount();
|
||||
});
|
||||
}
|
||||
public override void Show()
|
||||
{
|
||||
base.Show();
|
||||
transform.Find("RideResultList").GetComponent<ResultListController>().Load();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 693a8dfbfae474849b06c5d0080136f1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -215,7 +215,6 @@ public class RouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandle
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log(216);
|
||||
btnDetail.GetComponent<Image>().color = Utils.HexToColorHtml("#414251");
|
||||
btnDetail.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#353543");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user