- SelectRoleForm 五层归位:UseCase 改为构造注入 IProcedureMenu(新增 Runtime/ProcedureInterface),RawData 暴露原始 StatModifier[] 而非展示串,Controller 复用 ItemDescUtility 拼装属性文本,并修复 OpenUIAsync(object) 合法 RawData 分支缺少 return 的误报路径 - StatModifier 去展示职责:删除 _statTypeNames / ToString,富文本格式化下沉到 Presentation 层的 ItemDescUtility.Describe(StatModifier),CreatePropDescription 改用统一入口 - 事件目录按 UIForm 归档:Base/Event/UI/Menu/* 拆解到 SelectRoleForm/ MenuForm/ DialogForm/ DisplayItemInfoForm/ Combat/ 等各自子目录,MenuSelectRoleReturnEventArgs 改名 SelectRoleReturnEventArgs,语义归属本 UI 模块 - IUIFormController → IUIController 改名,联动 UIControllerBase / UIRouterComponent / Editor - 同步更新 docs/UI-5层架构设计规范.md 中相关示例与 MenuForm.prefab、ProcedureMenu 引用
41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
using GameFramework;
|
|
using GameFramework.Event;
|
|
|
|
namespace SepCore.Event
|
|
{
|
|
public class DialogEventArgs : GameEventArgs
|
|
{
|
|
public static readonly int EventId = typeof(DialogEventArgs).GetHashCode();
|
|
|
|
public override int Id => EventId;
|
|
|
|
public int ButtonId { get; private set; }
|
|
|
|
public object UserData { get; private set; }
|
|
|
|
/// <summary>
|
|
/// 创建 DialogEventArgs 事件示例
|
|
/// </summary>
|
|
/// <param name="buttonId">
|
|
/// <list type="buttet">
|
|
/// <item>1 为 ConfirmButton</item>
|
|
/// <item>2 为 CancelButton</item>
|
|
/// <item>3 为 OtherButton</item>
|
|
/// </list>
|
|
/// </param>
|
|
/// <param name="userData">用户自定义数据</param>
|
|
/// <returns></returns>
|
|
public static DialogEventArgs Create(int buttonId, object userData)
|
|
{
|
|
DialogEventArgs dialogEventArgs = ReferencePool.Acquire<DialogEventArgs>();
|
|
dialogEventArgs.ButtonId = buttonId;
|
|
dialogEventArgs.UserData = userData;
|
|
return dialogEventArgs;
|
|
}
|
|
|
|
public override void Clear()
|
|
{
|
|
UserData = null;
|
|
}
|
|
}
|
|
} |