修改细节
This commit is contained in:
1 parent
614d067d25
commit
b15a4fe2c1
18 files changed
+740
-402
No files matched your search
@@ -29,7 +29,14 @@ public class QuickLoginUser : MonoBehaviour
|
||||
});
|
||||
//transform.GetComponent<Button>().onClick.AddListener();
|
||||
this.user = user;
|
||||
Utils.DisplayImage(StartCoroutine, transform.Find("Avatar").GetComponent<RawImage>(),user.Avatar);
|
||||
if (!string.IsNullOrEmpty(user.Avatar))
|
||||
{
|
||||
Utils.DisplayImage(StartCoroutine, transform.Find("Avatar").GetComponent<RawImage>(), user.Avatar);
|
||||
}
|
||||
else
|
||||
{
|
||||
transform.Find("Avatar").GetComponent<RawImage>().texture = Resources.Load<Texture>("Images/icon-1024");
|
||||
}
|
||||
transform.Find("NickNameText").GetComponent<Text>().text = user.NickName;
|
||||
UIManager.AddEvent(transform.Find("BtnDelete").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
|
||||
@@ -10,11 +10,11 @@ public class MainNav : MonoBehaviour
|
||||
private GameObject home;
|
||||
private void Awake()
|
||||
{
|
||||
var material = Instantiate(Resources.Load<Material>("UI/Material/RoundedCornersTextureMaterial"));
|
||||
//var material = Instantiate(Resources.Load<Material>("UI/Material/RoundedCornersTextureMaterial"));
|
||||
|
||||
var rect = ((RectTransform)this.transform).rect;
|
||||
material.SetVector(Shader.PropertyToID("_WidthHeightRadius"), new Vector4(rect.width, rect.height, rect.height, 0));
|
||||
this.GetComponent<Image>().material = material;
|
||||
//var rect = ((RectTransform)this.transform).rect;
|
||||
//material.SetVector(Shader.PropertyToID("_WidthHeightRadius"), new Vector4(rect.width, rect.height, rect.height, 0));
|
||||
//this.GetComponent<Image>().material = material;
|
||||
|
||||
var device = this.transform.Find("Device");
|
||||
UIManager.AddEvent(device.gameObject, EventTriggerType.PointerClick, x =>
|
||||
|
||||
@@ -189,6 +189,10 @@ public class EditUserController : PFUIPanel
|
||||
{
|
||||
Utils.DisplayImage(StartCoroutine, mHeadImage, currentUser.WxHeadImg);
|
||||
}
|
||||
else
|
||||
{
|
||||
mHeadImage.texture = Resources.Load<Texture>("Images/icon-1024");
|
||||
}
|
||||
if (currentUser.Sex == 1)
|
||||
{
|
||||
mSexDropdown.SelectValue("男");
|
||||
|
||||
@@ -104,8 +104,15 @@ public class HomeController : PFUIPanel
|
||||
{
|
||||
userInfo.Find("SexIcon").GetComponent<Image>().sprite = Resources.Load<Sprite>("Images/man");
|
||||
}
|
||||
Utils.DisplayImage(StartCoroutine, userInfo.Find("Avatar").GetComponent<RawImage>(), App.CurrentUser.WxHeadImg);
|
||||
|
||||
if (!string.IsNullOrEmpty(App.CurrentUser.WxHeadImg))
|
||||
{
|
||||
Utils.DisplayImage(StartCoroutine, userInfo.Find("Avatar").GetComponent<RawImage>(), App.CurrentUser.WxHeadImg);
|
||||
}
|
||||
else
|
||||
{
|
||||
userInfo.Find("Avatar").GetComponent<RawImage>().texture = Resources.Load<Texture>("Images/icon-1024");
|
||||
}
|
||||
|
||||
userInfo.Find("Country").GetComponent<RawImage>().texture = UIManager.Instance.loginRegOptions.GetCountryImageByName(App.CurrentUser.Country);
|
||||
userInfo.Find("CaloriesContainer").Find("CaloriesValue").GetComponent<Text>().text = double.Parse(summary.Kcal).ToString("0") +" KCAL";
|
||||
userInfo.Find("KMContainer").Find("KMValue").GetComponent<Text>().text = summary.TotalDistance.ToString("0") +" KM";
|
||||
@@ -113,8 +120,10 @@ public class HomeController : PFUIPanel
|
||||
|
||||
userInfo.Find("GroupTop").Find("FtpContainer").Find("FtpTime").GetComponent<Text>().text = App.CurrentUser.LastUpdateFtpTime.ToString("yyyy.MM.dd");
|
||||
userInfo.Find("GroupTop").Find("WeightContainer").Find("WeightTime").GetComponent<Text>().text = App.CurrentUser.LastUpdateWeightTime.ToString("yyyy.MM.dd");
|
||||
|
||||
|
||||
userInfo.Find("GroupTop").Find("WKGContainer").Find("WKGTime").GetComponent<Text>().text =
|
||||
DateTime.Compare(App.CurrentUser.LastUpdateFtpTime, App.CurrentUser.LastUpdateWeightTime)>0
|
||||
? App.CurrentUser.LastUpdateFtpTime.ToString("yyyy.MM.dd")
|
||||
: App.CurrentUser.LastUpdateWeightTime.ToString("yyyy.MM.dd");
|
||||
}
|
||||
void GetSummary()
|
||||
{
|
||||
|
||||
@@ -70,7 +70,15 @@ public class UserInfoController : PFUIPanel
|
||||
{
|
||||
var summary = r.data;
|
||||
var user = App.CurrentUser;
|
||||
Utils.DisplayImage(StartCoroutine, infoPanel.Find("Avatar").GetComponent<RawImage>(), user.WxHeadImg);
|
||||
if (!string.IsNullOrEmpty(user.WxHeadImg))
|
||||
{
|
||||
Utils.DisplayImage(StartCoroutine, infoPanel.Find("Avatar").GetComponent<RawImage>(), user.WxHeadImg);
|
||||
}
|
||||
else
|
||||
{
|
||||
infoPanel.Find("Avatar").GetComponent<RawImage>().texture = Resources.Load<Texture>("Images/icon-1024");
|
||||
}
|
||||
|
||||
infoPanel.Find("Status").Find("Country").GetComponent<RawImage>().texture
|
||||
= UIManager.Instance.loginRegOptions.GetCountryImageByName(user.Country);
|
||||
infoPanel.Find("Status").Find("Wx").gameObject.SetActive(
|
||||
|
||||
Reference in new issue
Block a user