5 层 UI 规范收敛 SelectRoleForm 的 RawData / Context
围绕规范 §3.2 / §3.4 / §8 整理 SelectRoleForm 的数据传输与展示模型,让两层各自只承担规范允许的职责,并把子组件归位到模块目录内。 RawData层: - RolePropertyAreaRawData 移除展示串 InitialPropertyText,改为业务字段 StatModifier[] InitialProperties,并补回 RoleId,避免 RawData 携带已格式化的展示文本(违反 §3.2)。 - SelectRoleRawData 拆掉平铺的 RoleIds / RoleIconNames 平行数组与 SelectedRoleId / SelectedRoleName / SelectedRoleInitialProperties 哨兵字段,聚合为 RoleItemRawData[] RoleItems 与 RolePropertyAreaRawData SelectedRole(null 表示未选中),跟 Context 端的子结构形态对称。 - SelectRoleUseCase.BuildModel 同步改造为构造子 RawData,不再处理 -1 哨兵 ID。 Context 层: - 删除 SelectRoleContext.RoleIds 冗余字段(信息已由 RoleItemContexts[i].RoleId 承载)。 - 新增 bool ShowRoleProperty,把"显示属性卡 vs 显示随机卡"从 RolePropertyAreaContext == null 的隐式哨兵改成显式信号;Form 端 UpdateShowRole 改为读 ShowRoleProperty 切换卡片,不再用 null 当三态信号。 - Controller.BuildContext 用 rawData.SelectedRole != null 取代 >= 0 判定,InitialPropertyText 仍由 Controller 通过 ItemDescUtility.CreatePropDescription 拼装后注入 Context。 目录归属 事件命名
This commit is contained in:
@@ -3,15 +3,15 @@ using GameFramework.Event;
|
||||
|
||||
namespace SepCore.Event
|
||||
{
|
||||
public class MenuSelectRoleReturnEventArgs : GameEventArgs
|
||||
public class SelectRoleReturnEventArgs : GameEventArgs
|
||||
{
|
||||
public static readonly int EventId = typeof(MenuSelectRoleReturnEventArgs).GetHashCode();
|
||||
public static readonly int EventId = typeof(SelectRoleReturnEventArgs).GetHashCode();
|
||||
|
||||
public override int Id => EventId;
|
||||
|
||||
public static MenuSelectRoleReturnEventArgs Create()
|
||||
public static SelectRoleReturnEventArgs Create()
|
||||
{
|
||||
return ReferencePool.Acquire<MenuSelectRoleReturnEventArgs>();
|
||||
return ReferencePool.Acquire<SelectRoleReturnEventArgs>();
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
|
||||
Reference in New Issue
Block a user