| | |
| | | using 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; |
| | | } |
| | | } |
| | | } |
| | | using 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>();
|
| | | }
|
| | | }
|
| | | }
|