|
@@ -88,13 +88,16 @@ public class FriendView : JCUnityLib.ViewBase, MenuBackInterface
|
|
|
foreach (var itemInfo in list) {
|
|
foreach (var itemInfo in list) {
|
|
|
int friendID = itemInfo.Value<int>("friendID");
|
|
int friendID = itemInfo.Value<int>("friendID");
|
|
|
int avatarID = itemInfo.Value<int>("avatarID");
|
|
int avatarID = itemInfo.Value<int>("avatarID");
|
|
|
|
|
+ string avatarUrl = itemInfo.Value<string>("avatarUrl");
|
|
|
string nickname = itemInfo.Value<string>("nickname");
|
|
string nickname = itemInfo.Value<string>("nickname");
|
|
|
bool online = itemInfo.Value<bool>("online");
|
|
bool online = itemInfo.Value<bool>("online");
|
|
|
long offlineTime = itemInfo.Value<long>("offlineTime");
|
|
long offlineTime = itemInfo.Value<long>("offlineTime");
|
|
|
GameObject o = GameObject.Instantiate(GetMyFriendItemPrefab(), GetMyFriendItemParent());
|
|
GameObject o = GameObject.Instantiate(GetMyFriendItemPrefab(), GetMyFriendItemParent());
|
|
|
o.SetActive(true);
|
|
o.SetActive(true);
|
|
|
o.name = friendID.ToString();
|
|
o.name = friendID.ToString();
|
|
|
- o.transform.Find("Avatar/Sprite").GetComponent<Image>().sprite = RoleMgr.GetAvatar(avatarID);
|
|
|
|
|
|
|
+ RoleMgr.SetAvatarToImage(
|
|
|
|
|
+ o.transform.Find("Avatar/Sprite").GetComponent<Image>(),
|
|
|
|
|
+ avatarID, avatarUrl);
|
|
|
o.transform.Find("Name").GetComponent<Text>().text = nickname;
|
|
o.transform.Find("Name").GetComponent<Text>().text = nickname;
|
|
|
o.transform.Find("BG0").gameObject.SetActive(!online);
|
|
o.transform.Find("BG0").gameObject.SetActive(!online);
|
|
|
o.transform.Find("BG1").gameObject.SetActive(online);
|
|
o.transform.Find("BG1").gameObject.SetActive(online);
|
|
@@ -147,13 +150,16 @@ public class FriendView : JCUnityLib.ViewBase, MenuBackInterface
|
|
|
foreach (var itemInfo in list) {
|
|
foreach (var itemInfo in list) {
|
|
|
int otherID = itemInfo.Value<int>("otherID");
|
|
int otherID = itemInfo.Value<int>("otherID");
|
|
|
int avatarID = itemInfo.Value<int>("avatarID");
|
|
int avatarID = itemInfo.Value<int>("avatarID");
|
|
|
|
|
+ string avatarUrl = itemInfo.Value<string>("avatarUrl");
|
|
|
string nickname = itemInfo.Value<string>("nickname");
|
|
string nickname = itemInfo.Value<string>("nickname");
|
|
|
bool online = itemInfo.Value<bool>("online");
|
|
bool online = itemInfo.Value<bool>("online");
|
|
|
long offlineTime = itemInfo.Value<long>("offlineTime");
|
|
long offlineTime = itemInfo.Value<long>("offlineTime");
|
|
|
GameObject o = GameObject.Instantiate(GetFriendRequestItemPrefab(), GetFriendRequestItemParent());
|
|
GameObject o = GameObject.Instantiate(GetFriendRequestItemPrefab(), GetFriendRequestItemParent());
|
|
|
o.SetActive(true);
|
|
o.SetActive(true);
|
|
|
o.name = otherID.ToString();
|
|
o.name = otherID.ToString();
|
|
|
- o.transform.Find("Avatar/Sprite").GetComponent<Image>().sprite = RoleMgr.GetAvatar(avatarID);
|
|
|
|
|
|
|
+ RoleMgr.SetAvatarToImage(
|
|
|
|
|
+ o.transform.Find("Avatar/Sprite").GetComponent<Image>(),
|
|
|
|
|
+ avatarID, avatarUrl);
|
|
|
o.transform.Find("Name").GetComponent<Text>().text = nickname;
|
|
o.transform.Find("Name").GetComponent<Text>().text = nickname;
|
|
|
o.transform.Find("BG0").gameObject.SetActive(!online);
|
|
o.transform.Find("BG0").gameObject.SetActive(!online);
|
|
|
o.transform.Find("BG1").gameObject.SetActive(online);
|
|
o.transform.Find("BG1").gameObject.SetActive(online);
|
|
@@ -211,6 +217,7 @@ public class FriendView : JCUnityLib.ViewBase, MenuBackInterface
|
|
|
foreach (var itemInfo in list) {
|
|
foreach (var itemInfo in list) {
|
|
|
int userID = itemInfo.Value<int>("id");
|
|
int userID = itemInfo.Value<int>("id");
|
|
|
int avatarID = itemInfo.Value<int>("avatarID");
|
|
int avatarID = itemInfo.Value<int>("avatarID");
|
|
|
|
|
+ string avatarUrl = itemInfo.Value<string>("avatarUrl");
|
|
|
string nickname = itemInfo.Value<string>("nickname");
|
|
string nickname = itemInfo.Value<string>("nickname");
|
|
|
bool online = itemInfo.Value<bool>("online");
|
|
bool online = itemInfo.Value<bool>("online");
|
|
|
long offlineTime = itemInfo.Value<long>("offlineTime");
|
|
long offlineTime = itemInfo.Value<long>("offlineTime");
|
|
@@ -218,7 +225,10 @@ public class FriendView : JCUnityLib.ViewBase, MenuBackInterface
|
|
|
GameObject o = GameObject.Instantiate(GetFriendRecommendItemPrefab(), GetFriendRecommendItemParent());
|
|
GameObject o = GameObject.Instantiate(GetFriendRecommendItemPrefab(), GetFriendRecommendItemParent());
|
|
|
o.SetActive(true);
|
|
o.SetActive(true);
|
|
|
o.name = userID.ToString();
|
|
o.name = userID.ToString();
|
|
|
- o.transform.Find("Avatar/Sprite").GetComponent<Image>().sprite = RoleMgr.GetAvatar(avatarID);
|
|
|
|
|
|
|
+ RoleMgr.SetAvatarToImage(
|
|
|
|
|
+ o.transform.Find("Avatar/Sprite").GetComponent<Image>(),
|
|
|
|
|
+ avatarID, avatarUrl
|
|
|
|
|
+ );
|
|
|
o.transform.Find("Name").GetComponent<Text>().text = nickname;
|
|
o.transform.Find("Name").GetComponent<Text>().text = nickname;
|
|
|
o.transform.Find("PlayCount").GetComponent<Text>().text =
|
|
o.transform.Find("PlayCount").GetComponent<Text>().text =
|
|
|
String.Format(
|
|
String.Format(
|
|
@@ -282,13 +292,17 @@ public class FriendView : JCUnityLib.ViewBase, MenuBackInterface
|
|
|
foreach (var itemInfo in list) {
|
|
foreach (var itemInfo in list) {
|
|
|
int userID = itemInfo.Value<int>("id");
|
|
int userID = itemInfo.Value<int>("id");
|
|
|
int avatarID = itemInfo.Value<int>("avatarID");
|
|
int avatarID = itemInfo.Value<int>("avatarID");
|
|
|
|
|
+ string avatarUrl = itemInfo.Value<string>("avatarUrl");
|
|
|
string nickname = itemInfo.Value<string>("nickname");
|
|
string nickname = itemInfo.Value<string>("nickname");
|
|
|
bool online = itemInfo.Value<bool>("online");
|
|
bool online = itemInfo.Value<bool>("online");
|
|
|
long offlineTime = itemInfo.Value<long>("offlineTime");
|
|
long offlineTime = itemInfo.Value<long>("offlineTime");
|
|
|
GameObject o = GameObject.Instantiate(GetSearchPlayerItemPrefab(), GetSearchPlayerItemParent());
|
|
GameObject o = GameObject.Instantiate(GetSearchPlayerItemPrefab(), GetSearchPlayerItemParent());
|
|
|
o.SetActive(true);
|
|
o.SetActive(true);
|
|
|
o.name = userID.ToString();
|
|
o.name = userID.ToString();
|
|
|
- o.transform.Find("Avatar/Sprite").GetComponent<Image>().sprite = RoleMgr.GetAvatar(avatarID);
|
|
|
|
|
|
|
+ RoleMgr.SetAvatarToImage(
|
|
|
|
|
+ o.transform.Find("Avatar/Sprite").GetComponent<Image>(),
|
|
|
|
|
+ avatarID, avatarUrl
|
|
|
|
|
+ );
|
|
|
o.transform.Find("Name").GetComponent<Text>().text = nickname;
|
|
o.transform.Find("Name").GetComponent<Text>().text = nickname;
|
|
|
o.transform.Find("BG0").gameObject.SetActive(!online);
|
|
o.transform.Find("BG0").gameObject.SetActive(!online);
|
|
|
o.transform.Find("BG1").gameObject.SetActive(online);
|
|
o.transform.Find("BG1").gameObject.SetActive(online);
|