|
@@ -11,7 +11,7 @@ namespace GFGGame
|
|
|
private GameObject _scenePrefab;
|
|
|
private GameObject _sceneObject;
|
|
|
|
|
|
- private FriendInfoData _curSelectedInfo;
|
|
|
+ private long _friendRoleId;
|
|
|
|
|
|
public override void Dispose()
|
|
|
{
|
|
@@ -42,7 +42,7 @@ namespace GFGGame
|
|
|
_ui.m_list.itemRenderer = RenderListItem;
|
|
|
_ui.m_list.onClickItem.Add(OnListItemClick);
|
|
|
|
|
|
- _ui.m_btnSolgan.onClick.Add(OnBtnSloganClick);
|
|
|
+ _ui.m_btnInfo.onClick.Add(OnBtnInfoClick);
|
|
|
_ui.m_btnDelete.onClick.Add(OnBtnDeleteClick);
|
|
|
_ui.m_btnAdd.onClick.Add(OnBtnAddClick);
|
|
|
_ui.m_btnSendAll.onClick.Add(OnBtnSendAllClick);
|
|
@@ -65,6 +65,7 @@ namespace GFGGame
|
|
|
protected override void OnShown()
|
|
|
{
|
|
|
base.OnShown();
|
|
|
+ _friendRoleId = this.viewData == null ? 0 : (long)this.viewData;
|
|
|
if (_sceneObject == null)
|
|
|
{
|
|
|
CustomSuitData customSuit = CustomSuitDataManager.GetSuitList(CustomSuitDataManager.currentIndex);
|
|
@@ -72,14 +73,28 @@ namespace GFGGame
|
|
|
EquipDataCache.cacher.setSceneObj(_sceneObject);
|
|
|
EquipDataCache.cacher.AddOrRemove(customSuit.bg, true);
|
|
|
}
|
|
|
- _ui.m_grpSlogan.visible = false;
|
|
|
FriendDataManager.Instance.UpdateFriendList(true);
|
|
|
_ui.m_list.numItems = FriendDataManager.Instance.FriendDatas.Count;
|
|
|
|
|
|
if (_ui.m_list.numItems > 0)
|
|
|
{
|
|
|
- _ui.m_list.selectedIndex = 0;
|
|
|
- ReqFriendDetialInfo(0);
|
|
|
+ if (_friendRoleId > 0)
|
|
|
+ {
|
|
|
+ for (int i = 0; i < FriendDataManager.Instance.FriendDatas.Count; i++)
|
|
|
+ {
|
|
|
+ if (_friendRoleId == FriendDataManager.Instance.FriendDatas[i].roleInfo.roleId)
|
|
|
+ {
|
|
|
+ _ui.m_list.selectedIndex = i;
|
|
|
+ _ui.m_list.ScrollToView(i);
|
|
|
+ ReqFriendDetialInfo(i);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _ui.m_list.selectedIndex = 0;
|
|
|
+ ReqFriendDetialInfo(0);
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -235,19 +250,18 @@ namespace GFGGame
|
|
|
{
|
|
|
if (index >= 0)
|
|
|
{
|
|
|
- long roleId = FriendDataManager.Instance.FriendDatas[index].roleInfo.roleId;
|
|
|
- OtherRoleInfoDetailData roleInfoDetail = await RoleInfoSProxy.ReqOtherRoleDetailInfo(roleId);
|
|
|
+ _friendRoleId = FriendDataManager.Instance.FriendDatas[index].roleInfo.roleId;
|
|
|
+
|
|
|
+ OtherRoleInfoDetailData roleInfoDetail = await RoleInfoSProxy.ReqOtherRoleDetailInfo(_friendRoleId);
|
|
|
if (roleInfoDetail != null)
|
|
|
{
|
|
|
UpdateScene(roleInfoDetail.customSuitData);
|
|
|
- _ui.m_txtSlogan.text = string.IsNullOrEmpty(roleInfoDetail.slogan) ? "暂无简介" : roleInfoDetail.slogan;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
CustomSuitData customSuit = CustomSuitDataManager.GetSuitList(CustomSuitDataManager.currentIndex);
|
|
|
UpdateScene(customSuit);
|
|
|
- _ui.m_txtSlogan.text = string.IsNullOrEmpty(RoleDataManager.slogan) ? "暂无简介" : RoleDataManager.slogan;
|
|
|
}
|
|
|
}
|
|
|
private void UpdateScene(CustomSuitData suitSavedData)
|
|
@@ -268,9 +282,17 @@ namespace GFGGame
|
|
|
}
|
|
|
|
|
|
|
|
|
- private void OnBtnSloganClick()
|
|
|
+ private void OnBtnInfoClick()
|
|
|
{
|
|
|
- _ui.m_grpSlogan.visible = !_ui.m_grpSlogan.visible;
|
|
|
+ if (_friendRoleId == 0)
|
|
|
+ {
|
|
|
+ ViewManager.Show<RoleInfoView>(null, new object[] { typeof(FriendView).FullName, _friendRoleId });
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ FriendInfoData friendInfoData = FriendDataManager.Instance.GetFriendDataById(_friendRoleId);
|
|
|
+ ViewManager.Show<OtherRoleInfoView>(new object[] { friendInfoData.roleInfo }, new object[] { typeof(FriendView).FullName, _friendRoleId });
|
|
|
+ }
|
|
|
}
|
|
|
private void OnBtnAddClick()
|
|
|
{
|