细节调整

This commit is contained in:
lishuo committed 2021-04-25 19:41:35 +08:00
1 parent bbc3deeef2
commit 02b8f97d83
16 files changed
+3692 -3565

No files matched your search

+26 -2
View File
@@ -67,10 +67,34 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler
// //transform.localPosition.Set(transform.localPosition.x, localY.Value, transform.localPosition.z);
// //transform.DOLocalMoveY(localY.Value, 0.5f);
//});
transform.GetComponent<Button>().onClick.AddListener(() =>
UIManager.AddEvent(transform.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, (Base) =>
{
UIManager.ShowMapDetailPanel(myMap.Id);
App.RouteIdParam = myMap.Id;
if (!App.MainSceneParam.ContainsKey("Name"))
{
App.MainSceneParam.Add("Name", "MapListPanel");
}
else
{
App.MainSceneParam["Name"] = "MapListPanel";
}
SceneManager.LoadScene("Ride");
});
//transform.GetComponent<Button>().onClick.AddListener(() =>
//{
// //UIManager.ShowMapDetailPanel(myMap.Id);
// App.RouteIdParam = myMap.Id;
// if (!App.MainSceneParam.ContainsKey("Name"))
// {
// App.MainSceneParam.Add("Name", "MapListPanel");
// }
// else
// {
// App.MainSceneParam["Name"]= "MapListPanel";
// }
// SceneManager.LoadScene("Ride");
//});
transform.Find("Name").GetComponent<Text>().text = myMap.Name;
Utils.DisplayImage(StartCoroutine, transform.Find("MapTitleImg").GetComponent<RawImage>(), myMap.CoverImage);
@@ -57,10 +57,12 @@ public class RouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandle
btnContinue = right.Find("BtnContinue");
if (btnContinue)
{
bool enabled = result.ContinueCyclingParam != null;
//btnContinue.gameObject.SetActive(false);
btnContinue.GetComponent<Button>().onClick.AddListener(GoContinue);
btnContinue.GetComponent<Button>().interactable = !(result.Progress == 1.0);
btnContinue.GetComponent<Button>().enabled = !(result.Progress == 1.0);
btnContinue.GetComponent<Button>().interactable = enabled;
btnContinue.GetComponent<Button>().enabled = enabled;
}
btnReRide = right.Find("BtnReRide");
if (btnReRide)
@@ -114,8 +116,9 @@ public class RouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandle
{
if (f)
{
btnContinue.GetComponent<Image>().color =
routeResult.Progress == 1? Utils.HexToColorHtml("#c8c8c880"): Utils.HexToColorHtml("#F93086");
bool enabled = routeResult.ContinueCyclingParam == null;
btnContinue.GetComponent<Image>().color =
enabled ? Utils.HexToColorHtml("#c8c8c880"): Utils.HexToColorHtml("#F93086");
btnReRide.GetComponent<Image>().color = Utils.HexToColorHtml("#F93086");
btnDelete.GetComponent<Image>().color = Utils.HexToColorHtml("#353543");
btnContinue.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");