using cfg.ActorCfg; using cfg.UIInterfaceBannerGoToCfg; using Cysharp.Threading.Tasks; using Framework; using Gameplay; using Gameplay.Net; using PhxhSDK; using System; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; /// /// 公告UI /// public class UI_NoticeController : UIWindow { /// /// 打开公告界面 /// /// public static async UniTask Open(E_NoticeType noticeType = E_NoticeType.Activity) { CommonUtils.CaptureScreenshot(); // 截取当前屏幕截图 return await UIManager.Instance.CreateAndOpenWindow(UINameConst.UI_Notice, noticeType); } #region Temp 临时 /// /// 公告类型 /// public enum E_NoticeType { None = 0, /// /// 活动 /// Activity = 1, /// /// 系统 /// System = 2, } #endregion #region 类 /// /// 公告类型页签 /// private class NoticeTypeTab : UIGameObjectWrapper { /// /// 选中按钮 /// private Button buttonChoose; /// /// 未选中按钮 /// private Button buttonNormal; /// /// 公告类型 /// private readonly E_NoticeType noticeType; /// /// 点击回调 /// private readonly Action clickAction; /// /// 是否选中 /// public bool IsSelect { set { buttonChoose.gameObject.IsScaleShow(value); buttonNormal.gameObject.IsScaleShow(!value); } } /// /// 公告类型 /// public E_NoticeType NoticeType { get { return noticeType; } } public NoticeTypeTab(GameObject root, E_NoticeType noticeType, Action click) : base(root, true) { this.noticeType = noticeType; clickAction = click; buttonChoose = GetComponent