修改细节
This commit is contained in:
1 parent
1002b0433a
commit
86a5b68317
39 files changed
+3489
-2760
No files matched your search
@@ -8,6 +8,7 @@ using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using Assets.Scripts.Devices.Ant.Interfaces;
|
||||
using Assets.Scripts.UI.Control;
|
||||
using Assets.Scripts;
|
||||
|
||||
public class ConnectDeviceModal : PFUIPanel
|
||||
{
|
||||
@@ -21,7 +22,17 @@ public class ConnectDeviceModal : PFUIPanel
|
||||
{
|
||||
Debug.Log(value);
|
||||
mSensorType = value;
|
||||
Logo.sprite = Resources.Load<Sprite>("Images/Devices/Trainer_3");
|
||||
var deviceInfoStr = Utils.deviceDict[value.ToString()];
|
||||
if (deviceInfoStr != null)
|
||||
{
|
||||
var deviceInfo = deviceInfoStr.Split('|');
|
||||
if (deviceInfo.Length == 2)
|
||||
{
|
||||
Title.text = deviceInfo[0];
|
||||
Logo.sprite = Resources.Load<Sprite>(deviceInfo[1]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
private Image Logo;
|
||||
@@ -29,7 +40,7 @@ public class ConnectDeviceModal : PFUIPanel
|
||||
private VerticalLayoutGroup content;
|
||||
private PfUIButton connectBtn;
|
||||
private Dictionary<ushort, DeviceItem> deviceList;
|
||||
private Text noDevice;
|
||||
private Text noDevice,Title;
|
||||
private RectTransform searchIconRect;
|
||||
|
||||
protected override void Awake()
|
||||
@@ -41,6 +52,7 @@ public class ConnectDeviceModal : PFUIPanel
|
||||
var container = this.transform.Find("GameObject");
|
||||
var closeBtn = container.Find("CloseBtn");
|
||||
Logo = container.Find("Logo").GetComponent<Image>();
|
||||
Title = container.Find("Title").GetComponent<Text>();
|
||||
var panel = container.Find("Panel");
|
||||
content = panel.Find("Scroll View").Find("Viewport").Find("Content").GetComponent<VerticalLayoutGroup>();
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ public class FeedbackController : PFUIPanel
|
||||
{
|
||||
if (App.CurrentUser == null) return;
|
||||
main.Find("Email").Find("Value").Find("Text").GetComponent<Text>().text = App.CurrentUser.Phone;
|
||||
main.Find("ID").Find("Value").Find("Text").GetComponent<Text>().text = App.CurrentUser.Id.ToString();
|
||||
main.Find("ID").Find("Value").Find("Text").GetComponent<Text>().text = App.CurrentUser.Id.ToString("#000000");
|
||||
main.Find("Version").Find("Value").Find("Text").GetComponent<Text>().text = App.AppVersion;
|
||||
main.Find("Time").Find("Value").Find("Text").GetComponent<Text>().text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Assets.Scripts.UI.Prefab.MapList
|
||||
{"HC","750-99999" },
|
||||
};
|
||||
public static List<Dropdown.OptionData> sorts = new string[] {
|
||||
"Distance","Name","Difficulty","Hot"//,"Times"
|
||||
"Hot","Name","Distance","Difficulty"//,"Times"
|
||||
}.Select(x => new Dropdown.OptionData(x)).ToList();
|
||||
public static Dictionary<string, string> diffDisplayDict = new Dictionary<string, string>()
|
||||
{
|
||||
|
||||
@@ -205,7 +205,7 @@ public class EditUserController : PFUIPanel
|
||||
mMonthDropdown.SelectValue(birthday.Month.ToString());
|
||||
mDayDropdown.SelectValue(birthday.Day.ToString());
|
||||
}
|
||||
mID.text = currentUser.Id.ToString();
|
||||
mID.text = currentUser.Id.ToString("000000");
|
||||
mNickName.Text = currentUser.Nickname;
|
||||
mFTP.Text = currentUser.FTP.ToString();
|
||||
mWeight.Text = currentUser.Weight.ToString();
|
||||
@@ -324,7 +324,8 @@ public class EditUserController : PFUIPanel
|
||||
userinfos[i].NickName = user.Nickname;
|
||||
UIManager.Instance.userInfos = userinfos;
|
||||
}
|
||||
UIManager.ShowAlert("Success");
|
||||
Utils.showToast(gameObject, "Success", type: 1);
|
||||
//UIManager.ShowAlert("Success");
|
||||
}
|
||||
LoadDataSync();
|
||||
//App.CurrentUser = user;
|
||||
@@ -346,11 +347,13 @@ public class EditUserController : PFUIPanel
|
||||
UIManager.Instance.userInfos = userinfos;
|
||||
}
|
||||
App.CurrentUser.WxHeadImg = img;
|
||||
UIManager.ShowAlert("Success");
|
||||
Utils.showToast(gameObject, "Success", type: 1);
|
||||
//UIManager.ShowAlert();
|
||||
}
|
||||
else
|
||||
{
|
||||
UIManager.ShowAlert(r.errMsg);
|
||||
Utils.showToast(gameObject, r.errMsg);
|
||||
//UIManager.ShowAlert();
|
||||
}
|
||||
}
|
||||
void Cancel(BaseEventData e)
|
||||
|
||||
@@ -169,7 +169,7 @@ public class MapListController : PFUIPanel
|
||||
{
|
||||
var drop = sorts.GetComponent<Dropdown>();
|
||||
drop.options = MapFilterOptions.sorts;
|
||||
drop.value = 3;
|
||||
drop.value = 0;
|
||||
drop.onValueChanged.AddListener((int index)=>
|
||||
{
|
||||
sort = drop.options[index].text;
|
||||
|
||||
@@ -84,7 +84,10 @@ public class UserInfoController : PFUIPanel
|
||||
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";
|
||||
|
||||
if (user.Sex == 2)
|
||||
{
|
||||
infoPanel.Find("SexIcon").GetComponent<Image>().sprite = Resources.Load<Sprite>("Images/woman");
|
||||
}
|
||||
summaryPanel.Find("Number").Find("Value").GetComponent<Text>().text = summary.Count.ToString();
|
||||
summaryPanel.Find("Time").Find("Value").GetComponent<Text>().text = summary.TotalTicks.ToString();
|
||||
summaryPanel.Find("KM").Find("Value").GetComponent<Text>().text = summary.TotalDistance.ToString();
|
||||
|
||||
@@ -36,7 +36,7 @@ public class RouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandle
|
||||
row2 = left.Find("Main").Find("Row2");
|
||||
Utils.DisplayImage(StartCoroutine, transform.Find("CoverImage").GetComponent<RawImage>(), result.RouteImage);
|
||||
left.Find("Main").Find("Name").GetComponent<Text>().text = result.RouteName;
|
||||
left.Find("Main").Find("Time").GetComponent<Text>().text = result.CreateTime.ToString("yyyy-MM-dd HH-mm-ss");
|
||||
left.Find("Main").Find("Time").GetComponent<Text>().text = result.CreateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
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}";
|
||||
|
||||
Reference in new issue
Block a user