52 lines
1.2 KiB
C#
52 lines
1.2 KiB
C#
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 DelayedClose;
|
|
|
|
public WindowAttribute(UILayer windowLayer, bool fullScreen = false, int delayedClose = 10)
|
|
{
|
|
WindowLayer = windowLayer;
|
|
FullScreen = fullScreen;
|
|
DelayedClose = delayedClose;
|
|
}
|
|
}
|
|
|
|
[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;
|
|
}
|
|
}
|
|
|
|
public enum EUIResLoadType
|
|
{
|
|
Resources,
|
|
AssetBundle
|
|
}
|
|
}
|