修改细节
This commit is contained in:
1 parent
9f19e951cc
commit
7a1042d184
14 files changed
+1889
-1314
No files matched your search
@@ -407,6 +407,7 @@ public class MapListController : PFUIPanel
|
||||
{
|
||||
transform.Find("RawImage").GetComponent<RawImage>().texture = App.DefaultRotateTexture;
|
||||
}
|
||||
ResetPanel();
|
||||
var cg = this.GetComponent<CanvasGroup>();
|
||||
cg.alpha = 0;
|
||||
cg.DOFade(1f, .3f);
|
||||
|
||||
@@ -43,6 +43,10 @@ public class UserInfoController : PFUIPanel
|
||||
{
|
||||
UIManager.ShowEditUserPanel();
|
||||
});
|
||||
UIManager.AddEvent(infoPanel.Find("Avatar").gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
UIManager.ShowEditUserPanel();
|
||||
});
|
||||
//editBtn.onClick.AddListener(() =>
|
||||
//{
|
||||
// UIManager.ShowEditUserPanel();
|
||||
|
||||
@@ -13,7 +13,7 @@ public class RaceHomeScript : RaceScript
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
private ScrollRect scroll;
|
||||
private Transform content,rightContainer,leftContainer,btnGoList;
|
||||
private Transform content,rightContainer,leftContainer,btnGoList,btnGoListTop;
|
||||
private float contentSize;
|
||||
private int count;
|
||||
private Button L, R;
|
||||
@@ -79,6 +79,14 @@ public class RaceHomeScript : RaceScript
|
||||
UIManager.ShowRaceListPanel();
|
||||
});
|
||||
}
|
||||
btnGoListTop = transform.Find("BtnGoListTop");
|
||||
if (btnGoListTop != null)
|
||||
{
|
||||
UIManager.AddEvent(btnGoListTop.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
UIManager.ShowRaceListPanel();
|
||||
});
|
||||
}
|
||||
}
|
||||
bool isEnter = false;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler, IPointerUpHandler
|
||||
@@ -27,6 +28,12 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
}
|
||||
public void Initial(MapCompetition mapCompetition,Transform parent)
|
||||
{
|
||||
transform.GetComponent<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
App.RouteIdParam = mapCompetition.RouteId;
|
||||
App.CompetionId = mapCompetition.Id;
|
||||
SceneManager.LoadScene("Ride");
|
||||
});
|
||||
Utils.DisplayImage(transform.GetComponent<RawImage>(), mapCompetition.RouteCover, true);
|
||||
Utils.DisplayImage(transform.Find("AltitudeCurve").GetComponent<RawImage>(), mapCompetition.AltitudeGraph, true);
|
||||
transform.Find("InfoContainer/Text").GetComponent<Text>().SetTextWithEllipsis(mapCompetition.Title);
|
||||
@@ -166,9 +173,11 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float? localY = null;
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
||||
transform.DOLocalMoveY(localY.Value, 0.3f);
|
||||
transform.Find("Masking").GetComponent<CanvasGroup>().DOFade(0, 0.5f);
|
||||
transform.Find("AltitudeCurve").GetComponent<RawImage>().DOFade(0, 0.5f);
|
||||
transform.Find("InfoContainer/Text").GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
||||
@@ -195,6 +204,12 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
if (localY == null)
|
||||
{
|
||||
localY = transform.localPosition.y;
|
||||
}
|
||||
transform.DOLocalMoveY(localY.Value + 5, 0.3f);
|
||||
Cursor.SetCursor(Resources.Load<Texture2D>("Images/PointerButtonHover"), Vector2.zero, CursorMode.Auto);
|
||||
transform.Find("Masking").GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
||||
transform.Find("AltitudeCurve").GetComponent<RawImage>().DOFade(1, 0.5f);
|
||||
transform.Find("InfoContainer/Text").GetComponent<CanvasGroup>().DOFade(0, 0.5f);
|
||||
|
||||
@@ -26,6 +26,39 @@ public class RaceListScript : RaceScript
|
||||
{
|
||||
base.Show();
|
||||
handleAvatar();
|
||||
ResetPanel();
|
||||
}
|
||||
void ResetPanel()
|
||||
{
|
||||
if (statusOptionContainer != null)
|
||||
{
|
||||
foreach (Transform t in statusOptionContainer)
|
||||
{
|
||||
var image = t.GetComponent<Image>();
|
||||
var text = t.Find("Text").GetComponent<Text>();
|
||||
if (t.name == "Btn1")
|
||||
{
|
||||
image.color = Utils.HexToColorHtml("#F93086");
|
||||
text.color = new Color(1, 1, 1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
image.color = Utils.HexToColorHtml("#23232D");
|
||||
text.color = new Color(1, 1, 1, 1);
|
||||
}
|
||||
}
|
||||
statusOptions = new List<string>();
|
||||
}
|
||||
if (reserveContainer != null)
|
||||
{
|
||||
reserveContainer.Find("Gou").gameObject.SetActive(false);
|
||||
isReserve = false;
|
||||
}
|
||||
if (searchInput != null)
|
||||
{
|
||||
searchInput.GetComponent<InputField>().text = "";
|
||||
raceName = "";
|
||||
}
|
||||
Refresh();
|
||||
}
|
||||
//筛选条件
|
||||
|
||||
@@ -5,14 +5,21 @@ using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
public class RaceMaskScript : MonoBehaviour, IPointerEnterHandler,IPointerExitHandler
|
||||
{
|
||||
float? localY = null;
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
transform.Find("Panel").GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
||||
if (localY == null)
|
||||
{
|
||||
localY = transform.localPosition.y;
|
||||
}
|
||||
transform.DOLocalMoveY(localY.Value + 5, 0.3f);
|
||||
}
|
||||
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
transform.Find("Panel").GetComponent<CanvasGroup>().DOFade(0, 0.5f);
|
||||
transform.DOLocalMoveY(localY.Value, 0.3f);
|
||||
}
|
||||
|
||||
// Start is called before the first frame update
|
||||
|
||||
@@ -546,7 +546,7 @@ public class UIManager : MonoBehaviour
|
||||
{
|
||||
Debug.Log("清空");
|
||||
//App.propTextureCache["recordCache"].Clear();
|
||||
UIManager.Instance.MapListPanel.ResetPanel();
|
||||
//UIManager.Instance.MapListPanel.ResetPanel();
|
||||
UIManager.Show(UIManager.Instance.MapListPanel, UIManager.Instance.MainPanel);
|
||||
}
|
||||
public static void ShowMapDetailPanel(int id)
|
||||
|
||||
Reference in new issue
Block a user