结果列表页,用户页

This commit is contained in:
Caiyanpeng committed 2021-08-26 09:29:35 +08:00
1 parent 89e3a04fe9
commit e1a85eeb5e
14 files changed
+7393 -4408

No files matched your search

@@ -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");
}