Merge remote-tracking branch 'origin/dev_nonearth' into dev_cyp

This commit is contained in:
Caiyanpeng committed 2021-12-07 14:37:13 +08:00
commit 542036fb45
22 files changed
+1654 -1437

No files matched your search

@@ -327,7 +327,7 @@ public class DeviceView : MonoBehaviour
mPairButton.SetActive(true);
searchState.gameObject.SetActive(true);
#endif
searchState.text = "Connecting...";
searchState.text = App.GetLocalString("Connecting...");
}
@@ -387,7 +387,7 @@ public class EditUserController : PFUIPanel, INativeOnMobileImageSelect
user.Nickname = mNickName.Text;
user.Country = UIManager.Instance.loginRegOptions.GetCountryName(mConutryDropdown.SelectedIndex);
var errorList = new List<object>();
if (string.IsNullOrEmpty(mNickName.Text)) errorList.Add(new { Field = "Nickname", ErrMsg = "请填写昵称" });
if (string.IsNullOrEmpty(mNickName.Text)) errorList.Add(new { Field = "NickName", ErrMsg = "请填写昵称" });
if (string.IsNullOrEmpty(mFTP.Text)) errorList.Add(new { Field = "FTP", ErrMsg = "请填写FTP" });
if (string.IsNullOrEmpty(mHeight.Text)) errorList.Add(new { Field = "Height", ErrMsg = "请填写身高" });
if (string.IsNullOrEmpty(mWeight.Text)) errorList.Add(new { Field = "Weight", ErrMsg = "请填写体重" });
@@ -54,7 +54,7 @@ namespace Assets.Scenes.Ride.Scripts
public void Set(DateTime startTime, DateTime now,string title, string sceneName, int competitionId,int routeId)
{
ticks = (int)(startTime - now).TotalSeconds;
var content = $"Your <color='#F93086'>{Helper.SubStr(title,10)}</color> race about to start";
var content = App.GetLocalLanguage().Equals("en")? $"Your <color='#F93086'>{Helper.SubStr(title,10)}</color> race about to start": $"你参与的 <color='#F93086'>{Helper.SubStr(title, 10)}</color> 比赛即将开始!";
Content.text = content;
CompetitionId = competitionId;
RouteId = routeId;
@@ -175,6 +175,10 @@ public class RaceListScript : RaceScript
searchInput = transform.Find("Conditions/SearchInput");
if (searchInput != null)
{
searchInput.GetComponent<InputField>().onEndEdit.AddListener((t) =>
{
raceName = t;
});
UIManager.AddEvent(searchInput.Find("Button").gameObject, EventTriggerType.PointerClick, (b) =>
{
var t = searchInput.GetComponent<InputField>().text;
@@ -79,9 +79,9 @@ public class LocalRouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterH
Name.text = record.RouteName;
Time.text = record.StartTime.ToString("HH:mm:ss dd-MM-yyyy");
RidingTime.text = $"<color={titleColor}>Riding time:</color>{Helper.FormatTicks(record.Ticks)}";
RidingDistance.text = $"<color={titleColor}>Mileage:</color>{record.EndDistance.ToString("#0.00")}KM";
Device.text = $"<color={titleColor}>Cycling equipment:</color>{record.ManufacturerName}";
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}";
}
else
{
@@ -91,9 +91,9 @@ public class RouteItem : MonoBehaviour
{
Utils.DisplayImage(raw, result.Cover, true);
}
row1.Find("Time").GetComponent<Text>().text = $"<color=#5c5c6e>Rowing time:</color>{TimeSpan.FromSeconds(result.TotalTime).ToString()}";
row1.Find("Distance").GetComponent<Text>().text = $"<color=#5c5c6e>Distance:</color>{result.TotalDistance}M";
row2.Find("Device").GetComponent<Text>().text = $"<color=#5c5c6e>Rowing equipment:</color>{result.ManufacturerName}";
row1.Find("Time").GetComponent<Text>().text = $"<color=#5c5c6e>{App.GetLocalString("Rowing time")}:</color>{TimeSpan.FromSeconds(result.TotalTime).ToString()}";
row1.Find("Distance").GetComponent<Text>().text = $"<color=#5c5c6e>{App.GetLocalString("Distance")}:</color>{result.TotalDistance}M";
row2.Find("Device").GetComponent<Text>().text = $"<color=#5c5c6e>{App.GetLocalString("Rowing equipment")}:</color>{result.ManufacturerName}";
left.Find("Progress").gameObject.SetActive(false);
left.Find("Main/Name").GetComponent<Text>().text = $"{result.CreateTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss")} Free Rowing";
left.Find("Main/Time").GetComponent<Text>().text = $"{result.StartTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss")} ~ {result.CreateTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss")}";
@@ -136,12 +136,12 @@ public class RouteItem : MonoBehaviour
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");
row1.Find("Time").GetComponent<Text>().text = $"<color={titleColor}>Riding Time:</color>{result.TrainingTime}";
row1.Find("Distance").GetComponent<Text>().text = $"<color={titleColor}>Mileage:</color>{result.EndDistance.ToString("#0.00")}KM";
row1.Find("Times").GetComponent<Text>().text = $"<color={titleColor}>Times:</color>{result.Count}";
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}";
if (index == 0)
{
row1.Find("Rank").GetComponent<Text>().text = $"<color={titleColor}>Rank:</color>{result.Ranking}";
row1.Find("Rank").GetComponent<Text>().text = $"<color={titleColor}>{App.GetLocalString("Rank")}:</color>{result.Ranking}";
}
else
{
@@ -149,7 +149,7 @@ public class RouteItem : MonoBehaviour
}
left.Find("Progress").Find("Image").GetComponent<Image>().fillAmount = (float)result.Progress;
left.Find("Progress").Find("Value").GetComponent<Text>().text = (result.Progress * 100).ToString("#0");
row2.Find("Device").GetComponent<Text>().text = $"<color={titleColor}>Cycling Equipment:</color>{result.ManufacturerName}";
row2.Find("Device").GetComponent<Text>().text = $"<color={titleColor}>{App.GetLocalString("Cycling Equipment")}:</color>{result.ManufacturerName}";
if (index == 0)
{
right = transform.Find("Right");
@@ -296,7 +296,7 @@ public class RowerDeviceView : MonoBehaviour
mPairButton.SetActive(true);
searchState.gameObject.SetActive(true);
#endif
searchState.text = "Connecting...";
searchState.text = App.GetLocalString("Connecting...");
}