com.alicizax.unity.framework/Runtime/UI/Constant/WindowAttribute.cs

66 lines
1.6 KiB
C#
Raw Normal View History

2025-09-05 19:46:30 +08:00
using System;
using UnityEngine;
namespace AlicizaX.UI.Runtime
{
[AttributeUsage(AttributeTargets.Class)]
public class WindowAttribute : Attribute
{
/// <summary>
/// 窗口层级
/// </summary>
public readonly UILayer WindowLayer;
/// <summary>
/// 全屏窗口标记。
/// </summary>
public readonly bool FullScreen;
/// <summary>
/// 延时关闭
/// </summary>
public readonly int CacheTime;
/// <summary>
///
/// </summary>
/// <param name="windowLayer">显示层级</param>
/// <param name="fullScreen">是否全屏遮挡</param>
/// <param name="cacheTime">缓存时间/s -1永久 0不 >=1生效</param>
public WindowAttribute(UILayer windowLayer, bool fullScreen = false, int cacheTime = 0)
{
WindowLayer = windowLayer;
FullScreen = fullScreen;
CacheTime = cacheTime;
}
}
2025-11-13 17:46:20 +08:00
[AttributeUsage(AttributeTargets.Class)]
public class UIUpdateAttribute : Attribute
{
public UIUpdateAttribute()
{
}
}
2025-09-05 19:46:30 +08:00
[AttributeUsage(AttributeTargets.Class)]
public class UIResAttribute : Attribute
{
public readonly string ResLocation;
public readonly EUIResLoadType ResLoadType;
public UIResAttribute(string location, EUIResLoadType loadType)
{
ResLocation = location;
ResLoadType = loadType;
}
}
2025-11-13 17:46:20 +08:00
public enum EUIResLoadType : byte
2025-09-05 19:46:30 +08:00
{
Resources,
AssetBundle
}
}