细节调整
This commit is contained in:
1 parent
bbc3deeef2
commit
02b8f97d83
16 files changed
+3692
-3565
No files matched your search
@@ -105,5 +105,6 @@ namespace Assets.Scripts.Apis.Models
|
||||
public string Param { get; set; }
|
||||
|
||||
public int GlobalCyclingId { get; set; }
|
||||
public string Source { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,17 @@ public class MainController : MonoBehaviour
|
||||
//});
|
||||
if (App.MainSceneParam.ContainsKey("Name"))
|
||||
{
|
||||
if(App.MainSceneParam["Name"] == "MapListPanel")
|
||||
UIManager.PushHome();
|
||||
if (App.MainSceneParam["Name"] == "MapListPanel")
|
||||
{
|
||||
UIManager.ShowMapListPanel();
|
||||
App.MainSceneParam["Name"] = string.Empty;
|
||||
}
|
||||
|
||||
if (App.MainSceneParam["Name"] == "UserInfoPanel")
|
||||
{
|
||||
UIManager.ShowUserInfoPanel();
|
||||
App.MainSceneParam["Name"] = string.Empty;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -130,6 +130,11 @@ public class UIManager : MonoBehaviour
|
||||
public static UIManager Instance;
|
||||
|
||||
private static Stack<PFUIPanel> stack;
|
||||
public static void PushHome()
|
||||
{
|
||||
stack.Clear();
|
||||
stack.Push(UIManager.Instance.HomePanel);
|
||||
}
|
||||
private void Awake()
|
||||
{
|
||||
UIManager.Instance = this;
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace Assets.Scripts
|
||||
startCoroutine(DownloadImage(img, url));
|
||||
}
|
||||
|
||||
public static void DisplayImageAysnc(StartCoroutine startCoroutine, RawImage img, string url,Action action)
|
||||
public static void DisplayImageAysnc(StartCoroutine startCoroutine, RawImage img, string url,Action<string> action)
|
||||
{
|
||||
startCoroutine(DownloadImageCallBack(img, url, action));
|
||||
}
|
||||
@@ -170,7 +170,7 @@ namespace Assets.Scripts
|
||||
img.texture = ((DownloadHandlerTexture)request.downloadHandler).texture;
|
||||
}
|
||||
|
||||
static IEnumerator DownloadImageCallBack(RawImage img, string MediaUrl,Action action)
|
||||
static IEnumerator DownloadImageCallBack(RawImage img, string MediaUrl,Action<string> action)
|
||||
{
|
||||
UnityWebRequest request = UnityWebRequestTexture.GetTexture(MediaUrl);
|
||||
yield return request.SendWebRequest();
|
||||
@@ -179,7 +179,7 @@ namespace Assets.Scripts
|
||||
else
|
||||
{
|
||||
img.texture = ((DownloadHandlerTexture)request.downloadHandler).texture;
|
||||
action.Invoke();
|
||||
action.Invoke(MediaUrl);
|
||||
}
|
||||
}
|
||||
/*显示网络图片*/
|
||||
|
||||
Reference in new issue
Block a user