Files
BingoGrassland/Assets/BingoBrain/ModuleUI/H5/H5UI.cs
T
2026-05-11 16:41:01 +08:00

93 lines
2.1 KiB
C#

using BingoBrain.Core;
using BingoBrain.HotFix;
using DontConfuse;
using FGUI.ACommon;
using FGUI.webview;
using UnityEngine;
namespace BingoBrain
{
public class H5UI : BaseUI
{
private H5UICtrl ctrl;
private H5Model model;
private com_webview ui;
public H5UI(H5UICtrl ctrl) : base(ctrl)
{
uiName = UIConst.H5UI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "webview";
uiInfo.assetName = "com_webview";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region 生命周期
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.H5Model) as H5Model;
}
protected override void OnClose()
{
WebviewManager.Instance.setInH5View(false);
WebviewManager.Instance.ShowH5View(false);
}
protected override void OnBind()
{
ui = baseUI as FGUI.webview.com_webview;
}
protected override void OnOpenBefore(object args)
{
WebviewManager.Instance.setInH5View(true);
// delayedCall = DOVirtual.DelayedCall(0.3f, () =>
// {
WebviewManager.Instance.ShowH5View(true);
ui.btn_close.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(SkinInfo.H5UI_Close);
});
InitView();
}
protected override void OnOpen(object args)
{
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region 消息
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
//初始化页面逻辑
private void InitView()
{
}
}
}