using System;
namespace XGame.Framework.UI
{
public sealed class UIKey
{
public string Key { get; private set; }
///
/// UIView的类型
///
public Type UIViewType { get; private set; }
///
/// FGUI的包名
///
public string PackageName { get; private set; }
///
/// FGUI的UI名字
///
public string PanelName { get; private set; }
public UIKey(string key, Type viewType)
{
Key = key;
UIViewType = viewType;
}
public UIKey(string packageName, string panelName, Type viewType)
{
Key = $"{packageName}_{panelName}";
UIViewType = viewType;
PackageName = packageName ;
PanelName = panelName ;
}
public static implicit operator string(UIKey uiKey) => uiKey.Key;
public override string ToString() => Key;
}
}