Files
RedHotRoast-ios/Assets/Scripts/ModuleUI/TipsView/TipsViewUI.cs
T

73 lines
1.5 KiB
C#
Raw Normal View History

2026-04-22 09:52:55 +08:00
using System;
using DG.Tweening;
using FGUI.ZM_Login_05;
2026-04-22 09:52:55 +08:00
using UnityEngine;
namespace RedHotRoast
2026-04-22 09:52:55 +08:00
{
public class TipsViewUI : BaseUI
{
private TipsViewUICtrl ctrl;
private TipsViewModel model;
private FGUI.ZM_Common_01.com_tips ui;
2026-04-22 09:52:55 +08:00
public TipsViewUI(TipsViewUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.TipsViewUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "ZM_Common_01";
uiInfo.assetName = "com_tips";
2026-04-22 09:52:55 +08:00
uiInfo.layerType = UILayerType.Loading;
}
protected override void OnInit()
{
}
protected override void OnClose()
{
CommonHelper.FadeOut(ui);
}
protected override void OnBind()
{
ui = baseUI as FGUI.ZM_Common_01.com_tips;
2026-04-22 09:52:55 +08:00
}
protected override void OnOpenBefore(object args)
{
if (args != null ) {
InitView((Action) args);
2026-04-22 09:52:55 +08:00
}
}
protected override void OnOpen(object args)
{
CommonHelper.FadeIn(ui);
}
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
private void InitView(Action callback)
{
ui.btn_relog.SetClick(()=>{
callback?.Invoke();
CtrlCloseUI();
});
}
}
}