一波小改动

This commit is contained in:
Caiyanpeng committed 2021-12-30 16:51:04 +08:00
1 parent c5500c269f
commit 333c99fb46
18 files changed
+480 -137

No files matched your search

+15 -4
View File
@@ -176,9 +176,20 @@ public class NewMainNav : MonoBehaviour
#if UNITY_ANDROID || UNITY_IOS
UIManager.AddEvent(transform.Find("Delay").gameObject, EventTriggerType.PointerClick, b =>
{
delayTime = 3;
transform.Find("Delay/Tooltips").gameObject.SetActive(true);
transform.Find("Delay/Tooltips").GetComponent<CanvasGroup>().DOFade(1, 0.5f);
if (delayTime <= 0)
{
delayTime = 3;
transform.Find("Delay/Tooltips").gameObject.SetActive(true);
transform.Find("Delay/Tooltips").GetComponent<CanvasGroup>().DOFade(1, 0.5f);
}
else
{
delayTime = 0;
transform.Find("Delay/Tooltips").GetComponent<CanvasGroup>().DOFade(0, 0.5f).onComplete = () =>
{
transform.Find("Delay/Tooltips").gameObject.SetActive(false);
};
}
});
#endif
//transform.Find("Delay").GetComponent<PfUIButton>().showTooltip = true;
@@ -246,7 +257,7 @@ public class NewMainNav : MonoBehaviour
isTouch = false;
hideTime += 5;
}
Debug.Log(Input.touchCount);
//Debug.Log(Input.touchCount);
if (delayTime < 0)
{
Debug.Log("小时");
@@ -100,7 +100,7 @@ public class MapListController : PFUIPanel
nav.SetButtonActive(new List<int> { 0, 3, 4, 6, 7 }, 0,
new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/Mobile/map_筛选"), () =>
{
OpenFilter();
OpenFilter(false);
}));
newNav = nav;
#else
@@ -286,7 +286,7 @@ public class MapListController : PFUIPanel
}
caches = new Dictionary<string, Texture>();
}
public void OpenFilter()
public void OpenFilter(bool isFocusSearch = true)
{
#if UNITY_ANDROID || UNITY_IOS
var topRect = transform.Find("Top").GetComponent<RectTransform>();
@@ -300,7 +300,10 @@ public class MapListController : PFUIPanel
mc.GetComponent<CanvasGroup>().alpha = 0;
mc.GetComponent<CanvasGroup>().DOFade(1, 0.3f);
#endif
topRect.Find("SearchInput").GetComponent<InputField>().OnPointerClick(new PointerEventData(EventSystem.current));
if (isFocusSearch)
{
topRect.Find("SearchInput").GetComponent<InputField>().OnPointerClick(new PointerEventData(EventSystem.current));
}
}
void onEndEdit()
{
@@ -80,7 +80,7 @@ public class NewRouteDetailController : PFUIPanel
if (res.result)
{
p.GetComponent<Image>().sprite = FavDict[!act];
Utils.showToast(null, App.GetLocalString("Success"), type: 1);
//Utils.showToast(null, App.GetLocalString("Success"), type: 1);
}
else
{
+1 -1
View File
@@ -12,7 +12,7 @@ using Assets.Scripts;
//{
public class PFUIPanel : UIBehaviour
{
public NewMainNav newNav = null;
[HideInInspector]public NewMainNav newNav = null;
public void OpenURL(string url)
{
Application.OpenURL(url);
@@ -115,22 +115,22 @@ public class UserInfoController : PFUIPanel
infoPanel.Find("Container/Weight").Find("Value").GetComponent<Text>().text = $"{user.Weight}KG";
infoPanel.Find("Container/BW").Find("Value").GetComponent<Text>().text = $"{user.BicycleWeight}KG";
infoPanel.Find("Container/WD").Find("Value").GetComponent<Text>().text = $"{user.WheelDiameter}MM";
infoPanel.Find("Container/Ftp").Find("Time").GetComponent<Text>().text = user.LastUpdateFtpTime.ToString("dd-MM-yyyy");
infoPanel.Find("Container/Weight").Find("Time").GetComponent<Text>().text = user.LastUpdateWeightTime.ToString("dd-MM-yyyy");
infoPanel.Find("Container/BW").Find("Time").GetComponent<Text>().text = user.LastUpdateBicycleWeightTime.ToString("dd-MM-yyyy");
infoPanel.Find("Container/WD").Find("Time").GetComponent<Text>().text = user.LastUpdateWheelStraight.ToString("dd-MM-yyyy");
infoPanel.Find("Container/MHR").Find("Time").GetComponent<Text>().text = user.LastUpdateMaxHeartRate.ToString("dd-MM-yyyy");
infoPanel.Find("Container/Ftp").Find("Time").GetComponent<Text>().text = user.LastUpdateFtpTime.ToLocalString("dd-MM-yyyy");
infoPanel.Find("Container/Weight").Find("Time").GetComponent<Text>().text = user.LastUpdateWeightTime.ToLocalString("dd-MM-yyyy");
infoPanel.Find("Container/BW").Find("Time").GetComponent<Text>().text = user.LastUpdateBicycleWeightTime.ToLocalString("dd-MM-yyyy");
infoPanel.Find("Container/WD").Find("Time").GetComponent<Text>().text = user.LastUpdateWheelStraight.ToLocalString("dd-MM-yyyy");
infoPanel.Find("Container/MHR").Find("Time").GetComponent<Text>().text = user.LastUpdateMaxHeartRate.ToLocalString("dd-MM-yyyy");
#else
infoPanel.Find("Ftp").Find("Value").GetComponent<Text>().text = user.FTP.ToString();
infoPanel.Find("MHR").Find("Value").GetComponent<Text>().text = user.MaxHeartRate.ToString();
infoPanel.Find("Weight").Find("Value").GetComponent<Text>().text = $"{user.Weight}KG";
infoPanel.Find("BW").Find("Value").GetComponent<Text>().text = $"{user.BicycleWeight}KG";
infoPanel.Find("WD").Find("Value").GetComponent<Text>().text = $"{user.WheelDiameter}MM";
infoPanel.Find("Ftp").Find("Time").GetComponent<Text>().text = user.LastUpdateFtpTime.ToString("dd-MM-yyyy");
infoPanel.Find("Weight").Find("Time").GetComponent<Text>().text = user.LastUpdateWeightTime.ToString("dd-MM-yyyy");
infoPanel.Find("BW").Find("Time").GetComponent<Text>().text = user.LastUpdateBicycleWeightTime.ToString("dd-MM-yyyy");
infoPanel.Find("WD").Find("Time").GetComponent<Text>().text = user.LastUpdateWheelStraight.ToString("dd-MM-yyyy");
infoPanel.Find("MHR").Find("Time").GetComponent<Text>().text = user.LastUpdateMaxHeartRate.ToString("dd-MM-yyyy");
infoPanel.Find("Ftp").Find("Time").GetComponent<Text>().text = user.LastUpdateFtpTime.ToLocalString("dd-MM-yyyy");
infoPanel.Find("Weight").Find("Time").GetComponent<Text>().text = user.LastUpdateWeightTime.ToLocalString("dd-MM-yyyy");
infoPanel.Find("BW").Find("Time").GetComponent<Text>().text = user.LastUpdateBicycleWeightTime.ToLocalString("dd-MM-yyyy");
infoPanel.Find("WD").Find("Time").GetComponent<Text>().text = user.LastUpdateWheelStraight.ToLocalString("dd-MM-yyyy");
infoPanel.Find("MHR").Find("Time").GetComponent<Text>().text = user.LastUpdateMaxHeartRate.ToLocalString("dd-MM-yyyy");
#endif
if (user.Sex == 2)
{
@@ -78,7 +78,7 @@ public class LocalRouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterH
}
Name.text = record.RouteName;
Time.text = record.StartTime.ToString("HH:mm:ss dd-MM-yyyy");
Time.text = record.StartTime.ToLocalString("HH:mm:ss dd-MM-yyyy");
RidingTime.text = $"<color={titleColor}>{App.GetLocalString("Riding time")}:</color>{Helper.FormatTicks(record.Ticks)}";
RidingDistance.text = $"<color={titleColor}>{App.GetLocalString("Mileage")}:</color>{record.EndDistance.ToString("#0.00")}KM";
Device.text = $"<color={titleColor}>{App.GetLocalString("Cycling equipment")}:</color>{record.ManufacturerName}";
@@ -135,7 +135,7 @@ public class RouteItem : MonoBehaviour
//Utils.DisplayImage(transform.Find("BigLeft/CoverImage").GetComponent<RawImage>(), result.RouteImage, true);
left.Find("Main").Find("Name").GetComponent<Text>().text = result.RouteName;
left.Find("Main").Find("Time").GetComponent<Text>().text = result.CreateTime.ToString("HH:mm:ss dd-MM-yyyy");
left.Find("Main").Find("Time").GetComponent<Text>().text = result.CreateTime.ToLocalString("HH:mm:ss dd-MM-yyyy");
row1.Find("Time").GetComponent<Text>().text = $"<color={titleColor}>{App.GetLocalString("Riding Time")}:</color>{result.TrainingTime}";
row1.Find("Distance").GetComponent<Text>().text = $"<color={titleColor}>{App.GetLocalString("Mileage")}:</color>{result.EndDistance.ToString("#0.00")}KM";
row1.Find("Times").GetComponent<Text>().text = $"<color={titleColor}>{App.GetLocalString("Times")}:</color>{result.Count}";