From 9203f8bd22b3cf3fa9bfd537fd16b2e86d7223b1 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期三, 19 九月 2018 11:27:14 +0800
Subject: [PATCH] 3564【前端】队伍和仙盟频道移动至仙缘中
---
System/Chat/TeamChatWin.cs.meta | 12 +
System/Chat/TeamChatWin.cs | 81 +++++++++++
System/Chat/FairyChatWin.cs.meta | 12 +
System/Chat/FairyChatWin.cs | 97 +++++++++++++
System/Chat/ChatCenter.cs | 14 +
System/FriendSystem/New/SocialWin.cs | 139 +++++++++++--------
System/Chat/ChatTip.cs | 19 ++
7 files changed, 309 insertions(+), 65 deletions(-)
diff --git a/System/Chat/ChatCenter.cs b/System/Chat/ChatCenter.cs
index 05adb6c..f9e9682 100644
--- a/System/Chat/ChatCenter.cs
+++ b/System/Chat/ChatCenter.cs
@@ -46,10 +46,12 @@
var _funcCfg = Config.Instance.Get<FuncConfigConfig>("BugleItem");
bugleItem = int.Parse(_funcCfg.Numerical1);
chatChannels = new List<ChatInfoType>();
- for (int i = (int)ChatInfoType.System; i <= (int)ChatInfoType.Friend; i++)
- {
- chatChannels.Add((ChatInfoType)i);
- }
+ chatChannels.Add(ChatInfoType.System);
+ chatChannels.Add(ChatInfoType.World);
+ chatChannels.Add(ChatInfoType.Area);
+ chatChannels.Add(ChatInfoType.Invite);
+ chatChannels.Add(ChatInfoType.Trumpet);
+ chatChannels.Add(ChatInfoType.Friend);
}
public event Action<string, bool, bool> UpdateChatValueEvent;
@@ -755,10 +757,10 @@
return;
}
openChatAfterCollect = false;
- if (!WindowCenter.Instance.CheckOpen<ChatWin>())
+ if (!WindowCenter.Instance.CheckOpen<SocialWin>())
{
ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
- WindowCenter.Instance.Open<ChatWin>();
+ WindowCenter.Instance.Open<SocialWin>(false, 2);
}
}
#endregion
diff --git a/System/Chat/ChatTip.cs b/System/Chat/ChatTip.cs
index 0cc5b43..98a8015 100644
--- a/System/Chat/ChatTip.cs
+++ b/System/Chat/ChatTip.cs
@@ -145,7 +145,7 @@
private void OnChatClick()
{
- if (WindowCenter.Instance.CheckOpen<ChatWin>())
+ if (WindowCenter.Instance.CheckOpen<ChatWin>() || WindowCenter.Instance.CheckOpen<SocialWin>())
{
return;
}
@@ -154,6 +154,8 @@
if (mapId == 31230)
{
ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
+ WindowCenter.Instance.Open<SocialWin>(false, 2);
+ return;
}
WindowCenter.Instance.Open<ChatWin>();
}
@@ -211,7 +213,7 @@
void OnChatDataClick(ChatData data)
{
- if (WindowCenter.Instance.CheckOpen<ChatWin>())
+ if (WindowCenter.Instance.CheckOpen<ChatWin>() || WindowCenter.Instance.CheckOpen<SocialWin>())
{
return;
}
@@ -221,7 +223,18 @@
{
ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
}
- WindowCenter.Instance.Open<ChatWin>();
+ switch (ChatCtrl.Inst.presentChatType)
+ {
+ case ChatInfoType.Team:
+ WindowCenter.Instance.Open<SocialWin>(false, 1);
+ break;
+ case ChatInfoType.Fairy:
+ WindowCenter.Instance.Open<SocialWin>(false, 2);
+ break;
+ default:
+ WindowCenter.Instance.Open<ChatWin>();
+ break;
+ }
}
void OnRefreshChatTip(ChatInfoType type)
diff --git a/System/Chat/FairyChatWin.cs b/System/Chat/FairyChatWin.cs
new file mode 100644
index 0000000..8bfea90
--- /dev/null
+++ b/System/Chat/FairyChatWin.cs
@@ -0,0 +1,97 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Wednesday, September 19, 2018
+//--------------------------------------------------------
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using TableConfig;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Snxxz.UI {
+
+ public class FairyChatWin : Window
+ {
+ [SerializeField] ChatSendComponent m_ChatSend;
+ [SerializeField] ChatContentBehaviour m_ChatContent;
+ [SerializeField] RectTransform m_ContainerNoFairy;
+ [SerializeField] Button m_JoinFairy;
+ #region Built-in
+ protected override void BindController()
+ {
+ }
+
+ protected override void AddListeners()
+ {
+ m_JoinFairy.AddListener(JoinFairy);
+ }
+
+ protected override void OnPreOpen()
+ {
+ WindowCenter.Instance.windowBeforeOpenEvent += WindowBeforeOpenEvent;
+ PlayerDatas.Instance.fairyData.OnRefreshFairyInfo += MyFairyRefresh;
+ PlayerDatas.Instance.fairyData.OnRefreshFairyMine += MyFairyRefresh;
+ ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
+ m_ChatContent.chatType = ChatInfoType.Fairy;
+ MyFairyRefresh();
+ }
+
+ protected override void OnActived()
+ {
+ base.OnActived();
+ var parent = WindowCenter.Instance.Get<SocialWin>();
+ if (parent != null)
+ {
+ m_ChatSend.parent = parent;
+ }
+ }
+
+ protected override void OnAfterOpen()
+ {
+ }
+
+ protected override void OnPreClose()
+ {
+ WindowCenter.Instance.windowBeforeOpenEvent -= WindowBeforeOpenEvent;
+ PlayerDatas.Instance.fairyData.OnRefreshFairyInfo -= MyFairyRefresh;
+ PlayerDatas.Instance.fairyData.OnRefreshFairyMine -= MyFairyRefresh;
+ }
+
+ protected override void OnAfterClose()
+ {
+ }
+ #endregion
+ private void JoinFairy()
+ {
+ int limit = Config.Instance.Get<FuncOpenLVConfig>((int)FuncOpenEnum.Fairy).LimitLV;
+ if (PlayerDatas.Instance.baseData.LV < limit)
+ {
+ MessageWin.Inst.ShowFixedTip(Language.Get("L1136", limit));
+ return;
+ }
+ WindowCenter.Instance.CloseImmediately<SocialWin>();
+ WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.UnionFunc3);
+ }
+
+ void MyFairyRefresh()
+ {
+ m_ContainerNoFairy.gameObject.SetActive(!PlayerDatas.Instance.fairyData.HasFairy);
+ m_ChatSend.gameObject.SetActive(PlayerDatas.Instance.fairyData.HasFairy);
+ }
+
+ private void WindowBeforeOpenEvent(Window win)
+ {
+ if (win is SocialWin)
+ {
+ m_ChatSend.parent = win;
+ }
+ }
+ }
+
+}
+
+
+
+
diff --git a/System/Chat/FairyChatWin.cs.meta b/System/Chat/FairyChatWin.cs.meta
new file mode 100644
index 0000000..f54a001
--- /dev/null
+++ b/System/Chat/FairyChatWin.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e5cba53e40a60a847b072488a5a85b29
+timeCreated: 1537325731
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/Chat/TeamChatWin.cs b/System/Chat/TeamChatWin.cs
new file mode 100644
index 0000000..812c682
--- /dev/null
+++ b/System/Chat/TeamChatWin.cs
@@ -0,0 +1,81 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Wednesday, September 19, 2018
+//--------------------------------------------------------
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Snxxz.UI {
+
+ public class TeamChatWin : Window
+ {
+ [SerializeField] ChatSendComponent m_ChatSend;
+ [SerializeField] ChatContentBehaviour m_ChatContent;
+ [SerializeField] RectTransform m_NoTeamContainer;
+ TeamModel team { get { return ModelCenter.Instance.GetModel<TeamModel>(); } }
+ #region Built-in
+ protected override void BindController()
+ {
+ }
+
+ protected override void AddListeners()
+ {
+ }
+
+ protected override void OnPreOpen()
+ {
+ WindowCenter.Instance.windowBeforeOpenEvent += WindowBeforeOpenEvent;
+ team.myTeamRefreshEvent += MyTeamRefresh;
+ ChatCtrl.Inst.presentChatType = ChatInfoType.Team;
+ m_ChatContent.chatType = ChatInfoType.Team;
+ MyTeamRefresh();
+ }
+
+ protected override void OnActived()
+ {
+ base.OnActived();
+ var parent = WindowCenter.Instance.Get<SocialWin>();
+ if (parent != null)
+ {
+ m_ChatSend.parent = parent;
+ }
+ }
+
+ protected override void OnAfterOpen()
+ {
+ }
+
+ protected override void OnPreClose()
+ {
+ WindowCenter.Instance.windowBeforeOpenEvent -= WindowBeforeOpenEvent;
+ team.myTeamRefreshEvent -= MyTeamRefresh;
+ }
+
+ protected override void OnAfterClose()
+ {
+ }
+ #endregion
+ private void WindowBeforeOpenEvent(Window win)
+ {
+ if(win is SocialWin)
+ {
+ m_ChatSend.parent = win;
+ }
+ }
+
+ private void MyTeamRefresh()
+ {
+ m_ChatSend.gameObject.SetActive(team.myTeam.inTeam);
+ m_NoTeamContainer.gameObject.SetActive(!team.myTeam.inTeam);
+ }
+ }
+
+}
+
+
+
+
diff --git a/System/Chat/TeamChatWin.cs.meta b/System/Chat/TeamChatWin.cs.meta
new file mode 100644
index 0000000..e772517
--- /dev/null
+++ b/System/Chat/TeamChatWin.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e3087f05daf1a3245ac52b7732703971
+timeCreated: 1537322992
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/FriendSystem/New/SocialWin.cs b/System/FriendSystem/New/SocialWin.cs
index 360e9c2..93185e5 100644
--- a/System/FriendSystem/New/SocialWin.cs
+++ b/System/FriendSystem/New/SocialWin.cs
@@ -1,56 +1,83 @@
-锘縰sing System;
-using UnityEngine;
-using UnityEngine.UI;
-
-namespace Snxxz.UI
-{
- public class SocialWin : Window
- {
- [SerializeField] FunctionButton xianyuanBtn;
- [SerializeField] FunctionButtonGroup btnGroup;
- [SerializeField] Button closeBtn;
- [SerializeField] GameObject friendTipsObj;
- [SerializeField] ChatSendComponent m_ChatSend;
-
- protected override void BindController()
- {
-
- }
- protected override void AddListeners()
- {
- closeBtn.AddListener(CloseClick);
- xianyuanBtn.AddListener(ClickXianYuanBtn);
- }
- protected override void OnPreOpen()
- {
- m_ChatSend.parent = this;
- }
-
- protected override void OnActived()
- {
- base.OnActived();
- btnGroup.TriggerByOrder(functionOrder);
- }
-
- protected override void OnAfterOpen()
- {
-
- }
-
- protected override void OnPreClose()
- {
-
- }
-
- protected override void OnAfterClose()
- {
-
- }
-
- private void ClickXianYuanBtn()
- {
- friendTipsObj.SetActive(true);
- functionOrder = xianyuanBtn.order;
- }
- }
-}
+锘縰sing System;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Snxxz.UI
+{
+ public class SocialWin : Window
+ {
+ [SerializeField] FunctionButton xianyuanBtn;
+ [SerializeField] FunctionButton m_TeamChat;
+ [SerializeField] FunctionButton m_FairyChat;
+ [SerializeField] FunctionButtonGroup btnGroup;
+ [SerializeField] Button closeBtn;
+ [SerializeField] GameObject friendTipsObj;
+ [SerializeField] ChatSendComponent m_ChatSend;
+
+ protected override void BindController()
+ {
+
+ }
+ protected override void AddListeners()
+ {
+ closeBtn.AddListener(CloseClick);
+ xianyuanBtn.AddListener(ClickXianYuanBtn);
+ m_TeamChat.AddListener(TeamChat);
+ m_FairyChat.AddListener(FairyChat);
+ }
+
+ protected override void OnPreOpen()
+ {
+ m_ChatSend.parent = this;
+ }
+
+ protected override void OnActived()
+ {
+ base.OnActived();
+ btnGroup.TriggerByOrder(functionOrder);
+ }
+
+ protected override void OnAfterOpen()
+ {
+
+ }
+
+ protected override void OnPreClose()
+ {
+ CloseChild();
+ }
+
+ protected override void OnAfterClose()
+ {
+
+ }
+
+ private void ClickXianYuanBtn()
+ {
+ CloseChild();
+ friendTipsObj.SetActive(true);
+ functionOrder = xianyuanBtn.order;
+ }
+
+ private void TeamChat()
+ {
+ CloseChild();
+ WindowCenter.Instance.Open<TeamChatWin>();
+ functionOrder = m_TeamChat.order;
+ }
+
+ private void FairyChat()
+ {
+ CloseChild();
+ WindowCenter.Instance.Open<FairyChatWin>();
+ functionOrder = m_FairyChat.order;
+ }
+
+ void CloseChild()
+ {
+ friendTipsObj.SetActive(false);
+ WindowCenter.Instance.CloseImmediately<TeamChatWin>();
+ WindowCenter.Instance.CloseImmediately<FairyChatWin>();
+ }
+ }
+}
--
Gitblit v1.8.0