按 UI 五层规范重构 SelectRoleForm 并整理事件目录
- 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 引用
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
using GameFramework;
|
||||
using GameFramework.Event;
|
||||
|
||||
namespace SepCore.Event
|
||||
{
|
||||
public class DisplayItemInfoHideEventArgs : GameEventArgs
|
||||
{
|
||||
public static readonly int EventId = typeof(DisplayItemInfoHideEventArgs).GetHashCode();
|
||||
|
||||
public override int Id => EventId;
|
||||
|
||||
public bool Force = false;
|
||||
|
||||
public DisplayItemInfoHideEventArgs()
|
||||
{
|
||||
Force = false;
|
||||
}
|
||||
|
||||
public static DisplayItemInfoHideEventArgs Create(bool force = false)
|
||||
{
|
||||
var args = ReferencePool.Acquire<DisplayItemInfoHideEventArgs>();
|
||||
args.Force = force;
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
Force = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a515c94c54304c79b0fa4761f07a732d
|
||||
timeCreated: 1771071838
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
using GameFramework;
|
||||
using GameFramework.Event;
|
||||
|
||||
namespace SepCore.Event
|
||||
{
|
||||
public class DisplayItemInfoLockEventArgs : GameEventArgs
|
||||
{
|
||||
public static readonly int EventId = typeof(DisplayItemInfoLockEventArgs).GetHashCode();
|
||||
|
||||
public override int Id => EventId;
|
||||
|
||||
public DisplayItemInfoLockEventArgs()
|
||||
{
|
||||
}
|
||||
|
||||
public static DisplayItemInfoLockEventArgs Create()
|
||||
{
|
||||
var args = ReferencePool.Acquire<DisplayItemInfoLockEventArgs>();
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17754f00ac924fc29b3604cfed7a5efe
|
||||
timeCreated: 1771488601
|
||||
@@ -0,0 +1,41 @@
|
||||
using GameFramework;
|
||||
using GameFramework.Event;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SepCore.Event
|
||||
{
|
||||
public class DisplayItemShowEventArgs : GameEventArgs
|
||||
{
|
||||
public static readonly int EventId = typeof(DisplayItemShowEventArgs).GetHashCode();
|
||||
|
||||
public override int Id => EventId;
|
||||
|
||||
public int Index { get; private set; }
|
||||
|
||||
public bool IsWeapon { get; private set; }
|
||||
|
||||
public Vector3 TargetPos { get; private set; }
|
||||
|
||||
public DisplayItemShowEventArgs()
|
||||
{
|
||||
Index = -1;
|
||||
IsWeapon = false;
|
||||
}
|
||||
|
||||
public static DisplayItemShowEventArgs Create(int index, bool isWeapon, Vector3 targetPos)
|
||||
{
|
||||
var args = ReferencePool.Acquire<DisplayItemShowEventArgs>();
|
||||
args.Index = index;
|
||||
args.IsWeapon = isWeapon;
|
||||
args.TargetPos = targetPos;
|
||||
return args;
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
Index = -1;
|
||||
IsWeapon = false;
|
||||
TargetPos = Vector3.zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 51bff2c6818f44398b4b8f7d1448b310
|
||||
timeCreated: 1771071724
|
||||
Reference in New Issue
Block a user