2024-12-14 18:27:59 +08:00
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
using QFramework;
|
|
|
|
|
|
|
|
|
|
namespace QFramework.Example
|
|
|
|
|
{
|
|
|
|
|
public class UIDeviceTipData : UIPanelData
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
public partial class UIDeviceTip : UIPanel
|
|
|
|
|
{
|
|
|
|
|
protected override void OnInit(IUIData uiData = null)
|
|
|
|
|
{
|
|
|
|
|
mData = uiData as UIDeviceTipData ?? new UIDeviceTipData();
|
|
|
|
|
// please add init code here
|
2025-01-09 09:43:15 +08:00
|
|
|
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
2024-12-14 18:27:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnOpen(IUIData uiData = null)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Update()
|
|
|
|
|
{
|
|
|
|
|
if (Point.gameObject.activeSelf)
|
|
|
|
|
{
|
|
|
|
|
Point.anchoredPosition = Utility.GetScreenPosByObj(transform as RectTransform);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Set(string txt)
|
|
|
|
|
{
|
|
|
|
|
Label.text = txt;
|
|
|
|
|
}
|
|
|
|
|
public void Active(bool active)
|
|
|
|
|
{
|
|
|
|
|
Point.gameObject.SetActive(active);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnShow()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnHide()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnClose()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|