35 lines
1013 B
C#
35 lines
1013 B
C#
using ET;
|
|
using FairyGUI;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace ET
|
|
{
|
|
[UIEvent(FUIPackage.Common_MainUI)]
|
|
public class MainUIEvent : AUIEvent
|
|
{
|
|
public override async ETTask<FUI> OnCreate(FUIComponent fuiComponent)
|
|
{
|
|
if (!(FUIComponent.Instance.Get(FUIPackage.Common_MainUI) is FUI_MainUI ui))
|
|
{
|
|
ui =await FUI_MainUI.CreateInstanceAsync(fuiComponent);
|
|
ui.Name = FUIPackage.Common_MainUI;
|
|
ui.MakeFullScreen();
|
|
ui.self.fairyBatching = true;
|
|
|
|
ui.AddComponent<MainUISlotComponent>();
|
|
ui.AddComponent<ClientItemDataComponent>();
|
|
//!+设置拖拽大小
|
|
DragDropManager.inst.dragAgent.fill = FillType.ScaleFree;
|
|
DragDropManager.inst.dragAgent.SetSize(48, 48);
|
|
}
|
|
return ui;
|
|
}
|
|
|
|
public override void OnRemove(FUIComponent fuiComponent)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|