136 lines
3.4 KiB
C#
136 lines
3.4 KiB
C#
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||
|
||
using ET;
|
||
using FairyGUI;
|
||
using FairyGUI.Utils;
|
||
|
||
namespace ET
|
||
{
|
||
[ObjectSystem]
|
||
public class FUI_ActiveUI_AwakeSystem : AwakeSystem<FUI_ActiveUI, GObject>
|
||
{
|
||
public override void Awake(FUI_ActiveUI self, GObject go)
|
||
{
|
||
self.Awake(go);
|
||
}
|
||
}
|
||
|
||
public sealed class FUI_ActiveUI : FUI
|
||
{
|
||
public const string UIPackageName = "Other";
|
||
public const string UIResName = "ActiveUI";
|
||
|
||
/// <summary>
|
||
/// {uiResName}的组件类型(GComponent、GButton、GProcessBar等),它们都是GObject的子类。
|
||
/// </summary>
|
||
public GComponent self;
|
||
|
||
public FUI_FrameCommon m_frame;
|
||
public GList m_listTop;
|
||
public GList m_listLeft;
|
||
public GImage m_top;
|
||
public GImage m_left;
|
||
public GList m_listItem;
|
||
public const string URL = "ui://rrf5d2hkwtv11";
|
||
|
||
private static GObject CreateGObject()
|
||
{
|
||
return UIPackage.CreateObject(UIPackageName, UIResName);
|
||
}
|
||
|
||
private static void CreateGObjectAsync(UIPackage.CreateObjectCallback result)
|
||
{
|
||
UIPackage.CreateObjectAsync(UIPackageName, UIResName, result);
|
||
}
|
||
|
||
public static FUI_ActiveUI CreateInstance(Entity domain)
|
||
{
|
||
return EntityFactory.Create<FUI_ActiveUI, GObject>(domain, CreateGObject());
|
||
}
|
||
|
||
public static ETTask<FUI_ActiveUI> CreateInstanceAsync(Entity domain)
|
||
{
|
||
ETTaskCompletionSource<FUI_ActiveUI> tcs = new ETTaskCompletionSource<FUI_ActiveUI>();
|
||
|
||
CreateGObjectAsync((go) =>
|
||
{
|
||
tcs.SetResult(EntityFactory.Create<FUI_ActiveUI, GObject>(domain, go));
|
||
});
|
||
|
||
return tcs.Task;
|
||
}
|
||
|
||
public static FUI_ActiveUI Create(Entity domain,GObject go)
|
||
{
|
||
return EntityFactory.Create<FUI_ActiveUI, GObject>(domain,go);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 通过此方法获取的FUI,在Dispose时不会释放GObject,需要自行管理(一般在配合FGUI的Pool机制时使用)。
|
||
/// </summary>
|
||
public static FUI_ActiveUI GetFormPool(Entity domain,GObject go)
|
||
{
|
||
var fui = go.Get<FUI_ActiveUI>();
|
||
|
||
if(fui == null)
|
||
{
|
||
fui = Create(domain,go);
|
||
}
|
||
|
||
fui.isFromFGUIPool = true;
|
||
|
||
return fui;
|
||
}
|
||
|
||
public void Awake(GObject go)
|
||
{
|
||
if(go == null)
|
||
{
|
||
return;
|
||
}
|
||
|
||
GObject = go;
|
||
|
||
if (string.IsNullOrWhiteSpace(Name))
|
||
{
|
||
Name = Id.ToString();
|
||
}
|
||
|
||
self = (GComponent)go;
|
||
|
||
self.Add(this);
|
||
|
||
var com = go.asCom;
|
||
|
||
if(com != null)
|
||
{
|
||
|
||
m_frame = FUI_FrameCommon.Create(domain,com.GetChildAt(0));
|
||
m_listTop = (GList)com.GetChildAt(1);
|
||
m_listLeft = (GList)com.GetChildAt(2);
|
||
m_top = (GImage)com.GetChildAt(3);
|
||
m_left = (GImage)com.GetChildAt(4);
|
||
m_listItem = (GList)com.GetChildAt(5);
|
||
}
|
||
}
|
||
public override void Dispose()
|
||
{
|
||
if(IsDisposed)
|
||
{
|
||
return;
|
||
}
|
||
|
||
base.Dispose();
|
||
|
||
self.Remove();
|
||
self = null;
|
||
|
||
m_frame = null;
|
||
m_listTop = null;
|
||
m_listLeft = null;
|
||
m_top = null;
|
||
m_left = null;
|
||
m_listItem = null;
|
||
}
|
||
}
|
||
} |