58 lines
1.5 KiB
C#
58 lines
1.5 KiB
C#
using GeometryTD.CustomEvent;
|
|
using GeometryTD.Definition;
|
|
using GeometryTD.Procedure;
|
|
using UnityGameFramework.Runtime;
|
|
|
|
namespace GeometryTD.UI
|
|
{
|
|
public class TestMenuFormController : UIFormControllerCommonBase<TestMenuFormContext, TestMenuForm>
|
|
{
|
|
protected override UIFormType UIFormTypeId => UIFormType.TestMenuForm;
|
|
|
|
protected override void RefreshUI(TestMenuForm form, TestMenuFormContext context)
|
|
{
|
|
form.RefreshUI(context);
|
|
}
|
|
|
|
protected override void SubscribeCustomEvents()
|
|
{
|
|
}
|
|
|
|
protected override void UnsubscribeCustomEvents()
|
|
{
|
|
}
|
|
|
|
public override int? OpenUI(object userData = null)
|
|
{
|
|
if (userData is TestMenuFormContext context)
|
|
{
|
|
return OpenUIInternal(context);
|
|
}
|
|
|
|
if (userData != null)
|
|
{
|
|
Log.Warning("TestMenuFormController.OpenUI() userData type is invalid.");
|
|
return null;
|
|
}
|
|
|
|
return OpenUIInternal(BuildDefaultContext());
|
|
}
|
|
|
|
public override void BindUseCase(IUIUseCase useCase)
|
|
{
|
|
if (useCase != null)
|
|
{
|
|
Log.Warning("TestMenuFormController does not use a use case.");
|
|
}
|
|
}
|
|
|
|
private static TestMenuFormContext BuildDefaultContext()
|
|
{
|
|
return new TestMenuFormContext
|
|
{
|
|
CurrentNodeType = RunNodeType.None
|
|
};
|
|
}
|
|
}
|
|
}
|