refactor(注册路径): 调用点收进 XericRegistrationPaths,46 个文件只动注册属性行
10-27 那笔把表的根定成 XericLibrary,但 58 处 AddComponentMenu、4 处 CreateAssetMenu 和若干 MenuItem/ContextMenu 还各自写着 "Xeric UI Vessel/…"、"Xeric/XChart/…" 三套 旧字面量;那批转换一直停在工程里没提交。本笔只收这 46 个"除注册属性外没有别的改动" 的文件,路径出处从此只在表里一处。 工作区里另外 3 个文件(XericImage 的角偏移、IVisibility 接口、XericInfiniteVesselBase 的 region/注释)混着功能改动,不在本笔;Editor/OverrideUI/XericImageEditor.cs 与 Runtime/OverrideUI/XericImageDeform.cs 两个未入库新文件也不在。
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.BubbleLayout
|
||||
{
|
||||
@@ -19,7 +20,7 @@ namespace XericUI.BubbleLayout
|
||||
/// 边界限制约束插件 —— 将气泡元素限制在指定范围内。
|
||||
/// 支持矩形/椭圆两种形状,并记录超出范围的元素。
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/Layout/Boundary Constraint", 56)]
|
||||
[AddComponentMenu(XericRegistrationPaths.Layout + "/Boundary Constraint", 56)]
|
||||
public class BoundaryConstraint : BubbleLayoutPluginBase, IBubbleConstraintPlugin
|
||||
{
|
||||
[Header("限制范围")]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XericLibrary.Runtime;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.BubbleLayout
|
||||
{
|
||||
@@ -8,7 +9,7 @@ namespace XericUI.BubbleLayout
|
||||
/// 气泡碰撞约束插件 —— 使用四叉树检测重叠并推挤分离。
|
||||
/// 默认 Order = 1000,在约束阶段最后执行,确保碰撞排挤在所有其他约束之后进行。
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/Layout/Bubble Collision Constraint", 52)]
|
||||
[AddComponentMenu(XericRegistrationPaths.Layout + "/Bubble Collision Constraint", 52)]
|
||||
public class BubbleCollisionConstraint : BubbleLayoutPluginBase, IBubbleConstraintPlugin
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
|
||||
@@ -4,6 +4,10 @@ using UnityEngine;
|
||||
using UnityEngine.Pool;
|
||||
using UnityEngine.UI;
|
||||
using XericLibrary.Runtime;
|
||||
// using 必须在守卫**外**:下面 [AddComponentMenu(XericRegistrationPaths.Layout + …)] 的
|
||||
// 参数在玩家编译也要算得出常量——它在 #if UNITY_EDITOR 里的话,编辑器那套照样绿、
|
||||
// 只有玩家编译报 CS0103(2026-10-23 现场)
|
||||
using XericUI.Core;
|
||||
#if UNITY_EDITOR
|
||||
using System.Diagnostics;
|
||||
#endif
|
||||
@@ -56,7 +60,7 @@ namespace XericUI.BubbleLayout
|
||||
/// 支持动画插件和约束插件,插件按 Order 优先级分阶段顺序执行。
|
||||
/// </summary>
|
||||
[ExecuteAlways]
|
||||
[AddComponentMenu("Xeric UI Vessel/Layout/Bubble Layout Group", 51)]
|
||||
[AddComponentMenu(XericRegistrationPaths.Layout + "/Bubble Layout Group", 51)]
|
||||
public class BubbleLayoutGroup : LayoutGroup
|
||||
{
|
||||
#region 序列化字段
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.BubbleLayout
|
||||
{
|
||||
/// <summary>
|
||||
/// 环绕布局约束插件 —— 将气泡元素沿圆形排列,并通过弹簧力吸附到目标位置。
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/Layout/Circular Layout Constraint", 55)]
|
||||
[AddComponentMenu(XericRegistrationPaths.Layout + "/Circular Layout Constraint", 55)]
|
||||
public class CircularLayoutConstraint : BubbleLayoutPluginBase, IBubbleConstraintPlugin
|
||||
{
|
||||
[Header("吸附力")]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.BubbleLayout
|
||||
{
|
||||
@@ -7,7 +8,7 @@ namespace XericUI.BubbleLayout
|
||||
/// 横排布局约束插件 —— 将气泡元素沿 X 轴排列,并通过弹簧力吸附到目标位置。
|
||||
/// 支持多布局框穿插排列。
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/Layout/Horizontal Layout Constraint", 54)]
|
||||
[AddComponentMenu(XericRegistrationPaths.Layout + "/Horizontal Layout Constraint", 54)]
|
||||
public class HorizontalLayoutConstraint : LinearLayoutConstraintBase
|
||||
{
|
||||
[Header("横排特有")]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.BubbleLayout
|
||||
{
|
||||
@@ -25,7 +26,7 @@ namespace XericUI.BubbleLayout
|
||||
/// 竖排布局约束插件 —— 将气泡元素沿 Y 轴排列,并通过弹簧力吸附到目标位置。
|
||||
/// 支持多布局框穿插排列和拉链模式(一左一右交替)。
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/Layout/Vertical Layout Constraint", 53)]
|
||||
[AddComponentMenu(XericRegistrationPaths.Layout + "/Vertical Layout Constraint", 53)]
|
||||
public class VerticalLayoutConstraint : LinearLayoutConstraintBase
|
||||
{
|
||||
[Header("竖排特有")]
|
||||
|
||||
@@ -14,6 +14,7 @@ using UnityEngine.UI;
|
||||
using XericLibrary.Runtime.MacroLibrary;
|
||||
using XericUI.Core.Vessel;
|
||||
using Component = UnityEngine.Component;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.FlipPage
|
||||
{
|
||||
@@ -32,7 +33,7 @@ namespace XericUI.FlipPage
|
||||
/// 两侧是固定的按钮,中间是一个横向的排列容器,在指定了按钮对象池后,将会自动生成绑定好的按钮用于翻页。
|
||||
/// 页数按钮需要让button在预制体最外层,它的子集中需要包含一个TMP_Text。
|
||||
/// </code>
|
||||
[AddComponentMenu("Xeric UI Vessel/FlipPage/Basic FilpPage Manager")]
|
||||
[AddComponentMenu(XericRegistrationPaths.FlipPage + "/Basic FilpPage Manager")]
|
||||
public class FlipPageComponentManager : XericFlipPageIndexVesselBase
|
||||
{
|
||||
#region 界面属性
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Pool;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.FlipPage
|
||||
{
|
||||
/// <summary>
|
||||
/// 翻页组件管理器(通用数据层)
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/FlipPage/General FilpPage Manager")]
|
||||
[AddComponentMenu(XericRegistrationPaths.FlipPage + "/General FilpPage Manager")]
|
||||
public class GeneralDataFlipPage : FlipPageComponentManager
|
||||
{
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ using UnityEngine.UI;
|
||||
using XericLibrary.Runtime.MacroLibrary;
|
||||
using XericUI.Core.Base;
|
||||
using XericUI.Core.Vessel;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.FlipPage
|
||||
{
|
||||
@@ -35,7 +36,7 @@ namespace XericUI.FlipPage
|
||||
/// currentPageIndex可以获取当前页数,Currentpage获取当前页面数据;
|
||||
/// 在页面数据中pageNumber可以获取自己所在的页数,itemInfos获取页面中的所有数据项目。
|
||||
/// </code>
|
||||
[AddComponentMenu("Xeric UI Vessel/FlipPage/Basic FilpPage Database")]
|
||||
[AddComponentMenu(XericRegistrationPaths.FlipPage + "/Basic FilpPage Database")]
|
||||
public class XericFlipPageIndexVesselBase : XericUIBehaviour
|
||||
{
|
||||
#region 设定参数
|
||||
|
||||
@@ -2,6 +2,7 @@ using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.Form
|
||||
{
|
||||
@@ -32,7 +33,7 @@ namespace XericUI.Form
|
||||
/// 支持全屏/还原、边缘吸附、自动隐藏、拖拽移动、置顶。
|
||||
/// 通过 WindowEntry 与 Manager 通信。
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/Form/UI Form Controller")]
|
||||
[AddComponentMenu(XericRegistrationPaths.Form + "/UI Form Controller")]
|
||||
[RequireComponent(typeof(RectTransform))]
|
||||
public class UIFormController : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler, IPointerDownHandler
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ using UI_Text = UnityEngine.UI.Text;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.Form
|
||||
{
|
||||
@@ -14,7 +15,7 @@ namespace XericUI.Form
|
||||
/// 窗口标题栏 — 独立子组件,挂载在 UIFormController 的子对象上。
|
||||
/// Start 时向上查找父级 UIFormController,绑定按钮/Toggle 事件到其公开 API。
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/Form/UI Title Bar")]
|
||||
[AddComponentMenu(XericRegistrationPaths.Form + "/UI Title Bar")]
|
||||
public class UITitleBar : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler
|
||||
{
|
||||
[Header("控件引用")]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.Form
|
||||
{
|
||||
@@ -8,7 +9,7 @@ namespace XericUI.Form
|
||||
/// 通过 Entry 驱动管理窗口生命周期、层级排序、委托事件发布。
|
||||
/// 支持任务栏和边缘触发隐藏窗口。
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/Form/UI Form Manager")]
|
||||
[AddComponentMenu(XericRegistrationPaths.Form + "/UI Form Manager")]
|
||||
[DefaultExecutionOrder(32000)]
|
||||
public class UIFormManager : MonoBehaviour
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
{
|
||||
@@ -10,7 +11,7 @@ namespace XericUI.ReflectionUIGenerator
|
||||
/// </summary>
|
||||
[CreateAssetMenu(
|
||||
fileName = "Xeric UI avr Resolver Config",
|
||||
menuName = "Xeric Library/UI Action Vessel/Reflection UI Gen/UI avr Resolver Config",
|
||||
menuName = XericRegistrationPaths.UI + "/Reflection UI Gen/UI avr Resolver Config",
|
||||
order = 20)]
|
||||
public class AvrgMvvmResolverConfig : ScriptableObject, IAvrgMvvmConflictResolver
|
||||
{
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
{
|
||||
@@ -10,7 +11,7 @@ namespace XericUI.ReflectionUIGenerator
|
||||
/// </summary>
|
||||
[CreateAssetMenu(
|
||||
fileName = "Xeric UI avr Type-Prefab Mapping",
|
||||
menuName = "Xeric Library/UI Action Vessel/Reflection UI Gen/UI avr Type-Prefab Mapping",
|
||||
menuName = XericRegistrationPaths.UI + "/Reflection UI Gen/UI avr Type-Prefab Mapping",
|
||||
order = 15)]
|
||||
public class AvrgTypePrefabMappingConfig : ScriptableObject
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
{
|
||||
@@ -10,7 +11,7 @@ namespace XericUI.ReflectionUIGenerator
|
||||
/// </summary>
|
||||
[CreateAssetMenu(
|
||||
fileName = "Xeric UI avr Value Range Config",
|
||||
menuName = "Xeric Library/UI Action Vessel/Reflection UI Gen/UI avr Value Range Config",
|
||||
menuName = XericRegistrationPaths.UI + "/Reflection UI Gen/UI avr Value Range Config",
|
||||
order = 25)]
|
||||
public class AvrgValueRangeConfig : ScriptableObject
|
||||
{
|
||||
|
||||
@@ -4,10 +4,11 @@ using UnityEngine;
|
||||
using UnityEngine.Pool;
|
||||
using UnityEngine.UI;
|
||||
using XericLibrary.Runtime.MacroLibrary;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.OverrideLayout
|
||||
{
|
||||
[AddComponentMenu("Xeric UI Vessel/Layout/Xeric Horizontal Layout Group", 10)]
|
||||
[AddComponentMenu(XericRegistrationPaths.Layout + "/Xeric Horizontal Layout Group", 10)]
|
||||
/// <summary>
|
||||
/// Layout child layout elements below each other.
|
||||
/// </summary>
|
||||
|
||||
@@ -16,11 +16,12 @@ using XericLibraryEditor.Debug;
|
||||
#endif
|
||||
#if ODIN_INSPECTOR
|
||||
using Sirenix.OdinInspector;
|
||||
using XericUI.Core;
|
||||
#endif
|
||||
|
||||
namespace XericUI.OverrideLayout
|
||||
{
|
||||
[AddComponentMenu("Xeric UI Vessel/UI/ScrollRect", 50)]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/ScrollRect", 50)]
|
||||
[SelectionBase]
|
||||
[ExecuteAlways]
|
||||
[DisallowMultipleComponent]
|
||||
@@ -590,11 +591,11 @@ namespace XericUI.OverrideLayout
|
||||
#region 组件替换
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.MenuItem("CONTEXT/ScrollRect/Replace To XericScrollView", true)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ScrollRect/Replace To XericScrollView", true)]
|
||||
private static bool ValidateReplaceToXeric(UnityEditor.MenuCommand command)
|
||||
=> command.context is ScrollRect and not XericScrollRect;
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/ScrollRect/Replace To XericScrollView", false, 10)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ScrollRect/Replace To XericScrollView", false, 10)]
|
||||
private static void ReplaceToXeric(UnityEditor.MenuCommand command)
|
||||
=> command.ReplaceCommandContext<ScrollRect, XericScrollRect,
|
||||
(RectTransform Viewport, RectTransform Content, Scrollbar HScrollbar, Scrollbar VScrollbar)>(
|
||||
@@ -608,11 +609,11 @@ namespace XericUI.OverrideLayout
|
||||
t.verticalScrollbar = d.VScrollbar;
|
||||
});
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/ScrollRect/Replace To ScrollView", true)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ScrollRect/Replace To ScrollView", true)]
|
||||
private static bool ValidateReplaceToUnity(UnityEditor.MenuCommand command)
|
||||
=> command.context is XericScrollRect;
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/ScrollRect/Replace To ScrollView", false, 10)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ScrollRect/Replace To ScrollView", false, 10)]
|
||||
private static void ReplaceToUnity(UnityEditor.MenuCommand command)
|
||||
=> command.ReplaceCommandContext<XericScrollRect, ScrollRect,
|
||||
(RectTransform Viewport, RectTransform Content, Scrollbar HScrollbar, Scrollbar VScrollbar)>(
|
||||
|
||||
@@ -4,10 +4,11 @@ using UnityEngine;
|
||||
using UnityEngine.Pool;
|
||||
using UnityEngine.UI;
|
||||
using XericLibrary.Runtime.MacroLibrary;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.OverrideLayout
|
||||
{
|
||||
[AddComponentMenu("Xeric UI Vessel/Layout/Xeric Vertical Layout Group", 10)]
|
||||
[AddComponentMenu(XericRegistrationPaths.Layout + "/Xeric Vertical Layout Group", 10)]
|
||||
/// <summary>
|
||||
/// Layout child layout elements below each other.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
{
|
||||
/// <summary>
|
||||
/// Color 值组件 — 通过 Image 显示颜色,可选点击弹出颜色选择器
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDColorValue")]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDColorValue")]
|
||||
public class XUIAvrgMDColorValue : XUIAvrgMDValue
|
||||
{
|
||||
[SerializeField, Tooltip("关联的 Image 组件(未设置则自动查找)")]
|
||||
|
||||
@@ -2,6 +2,7 @@ using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
{
|
||||
@@ -12,7 +13,7 @@ namespace XericUI.ReflectionUIGenerator
|
||||
/// 选项动态创建:OnPoolGet 时根据元数据 PresetOptions 构建选项列表,
|
||||
/// BindToAccessor 时通过 AddOptions() 填充到 Dropdown 组件。
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDDropdownValue")]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDDropdownValue")]
|
||||
public class XUIAvrgMDDropdownValue : XUIAvrgMDValue
|
||||
{
|
||||
[SerializeField, Tooltip("关联的 Dropdown 组件(未设置则自动查找)")]
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
{
|
||||
/// <summary>
|
||||
/// InputField 值组件 — 处理 string / float / int / double 类型的文本输入交互
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDInputFieldValue")]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDInputFieldValue")]
|
||||
public class XUIAvrgMDInputFieldValue : XUIAvrgMDValue
|
||||
{
|
||||
[SerializeField]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
{
|
||||
@@ -6,7 +7,7 @@ namespace XericUI.ReflectionUIGenerator
|
||||
/// Label 只读值组件 — 纯文本展示,无交互控件
|
||||
/// 拥有自己的 _valueDisplayText 用于显示值
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDLabelValue")]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDLabelValue")]
|
||||
public class XUIAvrgMDLabelValue : XUIAvrgMDValue
|
||||
{
|
||||
[SerializeField, Tooltip("值显示文本 — 显示当前字段的值")]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
{
|
||||
@@ -8,7 +9,7 @@ namespace XericUI.ReflectionUIGenerator
|
||||
/// Slider 值组件 — 处理 float / int / double 类型的滑块交互
|
||||
/// 适用 Shader Range 属性或标记了 [XuiavrgFieldTag(Slider)] 的字段
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDSliderValue")]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDSliderValue")]
|
||||
public class XUIAvrgMDSliderValue : XUIAvrgMDValue
|
||||
{
|
||||
[SerializeField, Tooltip("关联的 Slider 组件(未设置则自动查找)")]
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
{
|
||||
/// <summary>
|
||||
/// Texture 值组件 — 通过 RawImage 显示纹理
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDTextureValue")]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDTextureValue")]
|
||||
public class XUIAvrgMDTextureValue : XUIAvrgMDValue
|
||||
{
|
||||
[SerializeField, Tooltip("关联的 RawImage 组件(未设置则自动查找)")]
|
||||
|
||||
@@ -2,6 +2,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
{
|
||||
@@ -12,7 +13,7 @@ namespace XericUI.ReflectionUIGenerator
|
||||
/// 选项动态创建:OnPoolGet 时根据元数据 PresetOptions 数量,
|
||||
/// 从 _toggleItemPrefab 实例化 Toggle 子对象。
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDToggleGroupValue")]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDToggleGroupValue")]
|
||||
public class XUIAvrgMDToggleGroupValue : XUIAvrgMDValue
|
||||
{
|
||||
[SerializeField, Tooltip("关联的 ToggleGroup 组件(未设置则自动查找)")]
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
{
|
||||
/// <summary>
|
||||
/// Toggle 值组件 — 处理 bool 类型的开关交互
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDToggleValue")]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDToggleValue")]
|
||||
public class XUIAvrgMDToggleValue : XUIAvrgMDValue
|
||||
{
|
||||
[SerializeField, Tooltip("关联的 Toggle 组件(未设置则自动查找)")]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
{
|
||||
@@ -16,7 +17,7 @@ namespace XericUI.ReflectionUIGenerator
|
||||
/// 6. 基类统一管理标签文本(名称 + 只读 + 警告标记)和单位可见性
|
||||
/// 值显示由各子类自行实现
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric Library/UI Action Vessel/XUIAvrgMDValue")]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/XUIAvrgMDValue")]
|
||||
public class XUIAvrgMDValue : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
{
|
||||
@@ -7,7 +8,7 @@ namespace XericUI.ReflectionUIGenerator
|
||||
/// 向量值组件 — 处理 Vector2 / Vector3 / Vector4 类型的多字段输入
|
||||
/// 子节点按 BindingSlots 绑定各分量(如 "x", "y", "z", "w")
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDVectorValue")]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDVectorValue")]
|
||||
public class XUIAvrgMDVectorValue : XUIAvrgMDValue
|
||||
{
|
||||
[SerializeField, Tooltip("X 分量 InputField(可选,也可通过 BindingSlots 的子节点绑定)")]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
{
|
||||
@@ -10,7 +11,7 @@ namespace XericUI.ReflectionUIGenerator
|
||||
/// 内部子元素通过锚点系统获得布局
|
||||
/// 可通过挂载 TMP_Text / Image 等组件实现组标题/背景装饰
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric Library/UI Action Vessel/XuiAvrgMDGroup")]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/XuiAvrgMDGroup")]
|
||||
public class XuiAvrgMDGroup : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
|
||||
@@ -2,10 +2,11 @@ using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XericUI.Helper;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.OverrideUI
|
||||
{
|
||||
[AddComponentMenu("Xeric UI Vessel/UI/Button", 50)]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/Button", 50)]
|
||||
public class XericButton : Button
|
||||
{
|
||||
|
||||
@@ -168,11 +169,11 @@ namespace XericUI.OverrideUI
|
||||
|
||||
#region 组件替换
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.MenuItem("CONTEXT/Button/Replace To/Xeric Button", true)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Xeric Button", true)]
|
||||
private static bool ValidateReplaceToXeric(UnityEditor.MenuCommand command)
|
||||
=> command.context is Button and not XericButton;
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Button/Replace To/Xeric Button", false, 10)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Xeric Button", false, 10)]
|
||||
private static void ReplaceToXeric(UnityEditor.MenuCommand command)
|
||||
=> command.ReplaceCommandContext<Button, XericButton,
|
||||
(Graphic targetGraphic, ButtonClickedEvent onClick)>(
|
||||
@@ -184,11 +185,11 @@ namespace XericUI.OverrideUI
|
||||
t.onClick = d.onClick;
|
||||
});
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Button/Replace To/Unity Button (Native)", true)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Unity Button (Native)", true)]
|
||||
private static bool ValidateReplaceToUnity(UnityEditor.MenuCommand command)
|
||||
=> command.context is XericButton;
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Button/Replace To/Unity Button (Native)", false, 100)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Unity Button (Native)", false, 100)]
|
||||
private static void ReplaceToUnity(UnityEditor.MenuCommand command)
|
||||
=> command.ReplaceCommandContext<XericButton, Button,
|
||||
(Graphic targetGraphic, ButtonClickedEvent onClick)>(
|
||||
|
||||
@@ -4,6 +4,7 @@ using UnityEngine.UI;
|
||||
using XericLibrary.Runtime.SuperStyleSheet;
|
||||
using XericUI.Core.StyleSheetUI;
|
||||
using XericUI.Helper;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.OverrideUI
|
||||
{
|
||||
@@ -12,7 +13,7 @@ namespace XericUI.OverrideUI
|
||||
/// 通过 TransitionMode 选择颜色切换、纹理切换或两者并用,
|
||||
/// 替代 Unity 内置的 ColorBlock 和 SpriteState。
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/UI/Style Button", 51)]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/Style Button", 51)]
|
||||
public class XericStyleButton : Button, IStyleRefreshable
|
||||
{
|
||||
/// <summary>样式过渡模式</summary>
|
||||
@@ -176,17 +177,17 @@ namespace XericUI.OverrideUI
|
||||
#region 组件替换
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.MenuItem("CONTEXT/XericStyleButton/Xeric UI/强制刷新样式", false, 1)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "XericStyleButton/Xeric UI/强制刷新样式", false, 1)]
|
||||
private static void ForceRefreshStyle(UnityEditor.MenuCommand command)
|
||||
{
|
||||
StyleRefreshManager.ForceRefreshAll();
|
||||
}
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Button/Replace To/Xeric (Style)", true)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Xeric (Style)", true)]
|
||||
private static bool ValidateReplaceToStyleButton(UnityEditor.MenuCommand command)
|
||||
=> command.context is Button and not XericStyleButton;
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Button/Replace To/Xeric (Style)", false, 11)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Xeric (Style)", false, 11)]
|
||||
private static void ReplaceToStyleButton(UnityEditor.MenuCommand command)
|
||||
=> command.ReplaceCommandContext<Button, XericStyleButton,
|
||||
(Graphic targetGraphic, ButtonClickedEvent onClick, Navigation navigation)>(
|
||||
@@ -198,11 +199,11 @@ namespace XericUI.OverrideUI
|
||||
t.navigation = d.navigation;
|
||||
});
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Button/Replace To/Unity Button (Style)", true)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Unity Button (Style)", true)]
|
||||
private static bool ValidateReplaceStyleToUnity(UnityEditor.MenuCommand command)
|
||||
=> command.context is XericStyleButton;
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Button/Replace To/Unity Button (Style)", false, 100)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Unity Button (Style)", false, 100)]
|
||||
private static void ReplaceStyleToUnity(UnityEditor.MenuCommand command)
|
||||
=> command.ReplaceCommandContext<XericStyleButton, Button,
|
||||
(Graphic targetGraphic, ButtonClickedEvent onClick, Navigation navigation)>(
|
||||
|
||||
@@ -4,6 +4,7 @@ using UnityEngine.UI;
|
||||
using XericLibrary.Runtime.SuperStyleSheet;
|
||||
using XericUI.Core.StyleSheetUI;
|
||||
using XericUI.Helper;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.OverrideUI
|
||||
{
|
||||
@@ -11,7 +12,7 @@ namespace XericUI.OverrideUI
|
||||
/// 基于 SuperStyleSheet 的图像组件。
|
||||
/// 使用 StyleField 引用样式表中的颜色和纹理路径,样式变更时自动刷新。
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/UI/Style Image", 53)]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/Style Image", 53)]
|
||||
public class XericStyleImage : Image
|
||||
{
|
||||
#region 序列化字段
|
||||
@@ -165,21 +166,21 @@ namespace XericUI.OverrideUI
|
||||
#region 组件替换
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.MenuItem("CONTEXT/Image/Replace To/Xeric (Style)", true)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Image/Replace To/Xeric (Style)", true)]
|
||||
private static bool ValidateReplaceToStyleImage(UnityEditor.MenuCommand command)
|
||||
=> command.context is Image and not XericStyleImage;
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Image/Replace To/Xeric (Style)", false, 11)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Image/Replace To/Xeric (Style)", false, 11)]
|
||||
private static void ReplaceToStyleImage(UnityEditor.MenuCommand command)
|
||||
=> command.ReplaceCommandContext<Image, XericStyleImage, Sprite>(
|
||||
o => o.sprite,
|
||||
(t, d) => { t.sprite = d; });
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Image/Replace To/Unity Image (Style)", true)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Image/Replace To/Unity Image (Style)", true)]
|
||||
private static bool ValidateReplaceStyleImageToUnity(UnityEditor.MenuCommand command)
|
||||
=> command.context is XericStyleImage;
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Image/Replace To/Unity Image (Style)", false, 100)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Image/Replace To/Unity Image (Style)", false, 100)]
|
||||
private static void ReplaceStyleImageToUnity(UnityEditor.MenuCommand command)
|
||||
=> command.ReplaceCommandContext<XericStyleImage, Image, Sprite>(
|
||||
o => o.sprite,
|
||||
|
||||
@@ -4,6 +4,7 @@ using UnityEngine.UI;
|
||||
using XericLibrary.Runtime.SuperStyleSheet;
|
||||
using XericUI.Core.StyleSheetUI;
|
||||
using XericUI.Helper;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.OverrideUI
|
||||
{
|
||||
@@ -12,7 +13,7 @@ namespace XericUI.OverrideUI
|
||||
/// 通过 TransitionMode 选择颜色切换、纹理切换或两者并用,
|
||||
/// 额外支持 isOn 覆盖和 Checkmark 样式。
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/UI/Style Toggle", 52)]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/Style Toggle", 52)]
|
||||
public class XericStyleToggle : Toggle, IStyleRefreshable
|
||||
{
|
||||
/// <summary>样式过渡模式</summary>
|
||||
@@ -236,28 +237,28 @@ namespace XericUI.OverrideUI
|
||||
#region 组件替换
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.MenuItem("CONTEXT/XericStyleToggle/Xeric UI/强制刷新样式", false, 1)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "XericStyleToggle/Xeric UI/强制刷新样式", false, 1)]
|
||||
private static void ForceRefreshStyle(UnityEditor.MenuCommand command)
|
||||
{
|
||||
StyleRefreshManager.ForceRefreshAll();
|
||||
}
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Toggle/Replace To/Xeric (Style)", true)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Toggle/Replace To/Xeric (Style)", true)]
|
||||
private static bool ValidateReplaceToStyleToggle(UnityEditor.MenuCommand command)
|
||||
=> command.context is Toggle and not XericStyleToggle;
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Toggle/Replace To/Xeric (Style)", false, 11)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Toggle/Replace To/Xeric (Style)", false, 11)]
|
||||
private static void ReplaceToStyleToggle(UnityEditor.MenuCommand command)
|
||||
=> command.ReplaceCommandContext<Toggle, XericStyleToggle,
|
||||
(Graphic graphic, ToggleGroup group, ToggleEvent onValueChanged, Navigation navigation)>(
|
||||
o => (o.graphic, o.group, o.onValueChanged, o.navigation),
|
||||
(t, d) => { t.graphic = d.graphic; t.group = d.group; t.onValueChanged = d.onValueChanged; t.navigation = d.navigation; });
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Toggle/Replace To/Unity Toggle (Style)", true)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Toggle/Replace To/Unity Toggle (Style)", true)]
|
||||
private static bool ValidateReplaceStyleToggleToUnity(UnityEditor.MenuCommand command)
|
||||
=> command.context is XericStyleToggle;
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Toggle/Replace To/Unity Toggle (Style)", false, 100)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Toggle/Replace To/Unity Toggle (Style)", false, 100)]
|
||||
private static void ReplaceStyleToggleToUnity(UnityEditor.MenuCommand command)
|
||||
=> command.ReplaceCommandContext<XericStyleToggle, Toggle,
|
||||
(Graphic graphic, ToggleGroup group, ToggleEvent onValueChanged, Navigation navigation)>(
|
||||
|
||||
@@ -7,11 +7,12 @@ using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
using XericUI.Helper;
|
||||
using XericUI.OverrideUI;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI
|
||||
{
|
||||
|
||||
[AddComponentMenu("Xeric UI Vessel/UI/Toggle", 31)]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/Toggle", 31)]
|
||||
[DisallowMultipleComponent]
|
||||
public class XericToggle : Toggle
|
||||
{
|
||||
@@ -279,11 +280,11 @@ namespace XericUI
|
||||
|
||||
#region 组件替换
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.MenuItem("CONTEXT/Toggle/Replace To/Xeric Toggle", true)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Toggle/Replace To/Xeric Toggle", true)]
|
||||
private static bool ValidateReplaceToXeric(UnityEditor.MenuCommand command)
|
||||
=> command.context is Toggle and not XericToggle;
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Toggle/Replace To/Xeric Toggle", false, 10)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Toggle/Replace To/Xeric Toggle", false, 10)]
|
||||
private static void ReplaceToXeric(UnityEditor.MenuCommand command)
|
||||
{
|
||||
command.ReplaceCommandContext<Toggle, XericToggle,
|
||||
@@ -299,11 +300,11 @@ namespace XericUI
|
||||
Debug.Log("请手动替换toggle下的Checkmark Image组件为XericImage,这样Toggle关闭时取消选中的状态会保持为ison状态");
|
||||
}
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Toggle/Replace To/Unity Toggle (Native)", true)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Toggle/Replace To/Unity Toggle (Native)", true)]
|
||||
private static bool ValidateReplaceToUnity(UnityEditor.MenuCommand command)
|
||||
=> command.context is XericToggle;
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/Toggle/Replace To/Unity Toggle (Native)", false, 100)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Toggle/Replace To/Unity Toggle (Native)", false, 100)]
|
||||
private static void ReplaceToUnity(UnityEditor.MenuCommand command)
|
||||
=> command.ReplaceCommandContext<XericToggle, Toggle,
|
||||
(Graphic graphic, ToggleGroup group, ToggleEvent onValueChanged)>(
|
||||
|
||||
@@ -2,29 +2,30 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XericUI.Helper;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.OverrideUI
|
||||
{
|
||||
[AddComponentMenu("Xeric UI Vessel/UI/ToggleGroup", 31)]
|
||||
[AddComponentMenu(XericRegistrationPaths.UI + "/ToggleGroup", 31)]
|
||||
[DisallowMultipleComponent]
|
||||
public class XericToggleGroup : ToggleGroup
|
||||
{
|
||||
|
||||
#region 组件替换
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.MenuItem("CONTEXT/ToggleGroup/Replace To/Xeric ToggleGroup", true)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ToggleGroup/Replace To/Xeric ToggleGroup", true)]
|
||||
private static bool ValidateReplaceToXeric(UnityEditor.MenuCommand command)
|
||||
=> command.context is ToggleGroup and not XericToggleGroup;
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/ToggleGroup/Replace To/Xeric ToggleGroup", false, 10)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ToggleGroup/Replace To/Xeric ToggleGroup", false, 10)]
|
||||
private static void ReplaceToXeric(UnityEditor.MenuCommand command)
|
||||
=> command.ReplaceCommandContext<ToggleGroup, XericToggleGroup>();
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/ToggleGroup/Replace To/Unity ToggleGroup", true)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ToggleGroup/Replace To/Unity ToggleGroup", true)]
|
||||
private static bool ValidateReplaceToUnity(UnityEditor.MenuCommand command)
|
||||
=> command.context is XericToggleGroup;
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/ToggleGroup/Replace To/Unity ToggleGroup", false, 100)]
|
||||
[UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ToggleGroup/Replace To/Unity ToggleGroup", false, 100)]
|
||||
private static void ReplaceToUnity(UnityEditor.MenuCommand command)
|
||||
=> command.ReplaceCommandContext<XericToggleGroup, ToggleGroup>();
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.VisualForm
|
||||
{
|
||||
@@ -14,7 +15,7 @@ namespace XericUI.VisualForm
|
||||
/// 4. 构建四叉树 → 迭代推挤分离 → 写入 CollisionOffset
|
||||
/// 5. 下一帧 UpdateStatePosition 通过 EffectiveOffset 自动应用碰撞偏移
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/AnchorWindow/AdvancedAnchorDock")]
|
||||
[AddComponentMenu(XericRegistrationPaths.AnchorWindow + "/AdvancedAnchorDock")]
|
||||
public class AdvancedAnchorDock : AnchorDock
|
||||
{
|
||||
[Header("碰撞分离")]
|
||||
|
||||
@@ -3,6 +3,7 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XericLibrary.Runtime.MacroLibrary;
|
||||
using System;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.VisualForm
|
||||
{
|
||||
@@ -10,7 +11,7 @@ namespace XericUI.VisualForm
|
||||
/// 锚点坞 - 挂载在Canvas上的主要布局组件管理器。
|
||||
/// 负责收集所有世界锚点,每帧将世界坐标转换到屏幕坐标,并管理中间窗口状态。
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/AnchorWindow/AnchorDock")]
|
||||
[AddComponentMenu(XericRegistrationPaths.AnchorWindow + "/AnchorDock")]
|
||||
[DefaultExecutionOrder(31000)]
|
||||
public class AnchorDock : MonoBehaviour
|
||||
{
|
||||
|
||||
@@ -2,13 +2,14 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.VisualForm
|
||||
{
|
||||
/// <summary>
|
||||
/// 锚点窗口
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/AnchorWindow/AnchorWindow")]
|
||||
[AddComponentMenu(XericRegistrationPaths.AnchorWindow + "/AnchorWindow")]
|
||||
public class AnchorWindowByDefaultEntry : AnchorWindow<WindowEntry> { }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.VisualForm
|
||||
{
|
||||
/// <summary>
|
||||
/// 世界对象锚点 - 挂载在场景对象上,将世界空间位置传递给锚点坞进行屏幕空间定位
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/AnchorWindow/WorldAnchor")]
|
||||
[AddComponentMenu(XericRegistrationPaths.AnchorWindow + "/WorldAnchor")]
|
||||
public class WorldAnchor : XvFormBase
|
||||
{
|
||||
[SerializeField, Tooltip("目标锚点坞,不填则自动在父级中查找")]
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.VisualForm
|
||||
{
|
||||
/// <summary>
|
||||
/// 虚拟窗体基类,提供基础的窗体标记功能
|
||||
/// </summary>
|
||||
[AddComponentMenu("Xeric UI Vessel/AnchorWindow/XvFormBase")]
|
||||
[AddComponentMenu(XericRegistrationPaths.AnchorWindow + "/XvFormBase")]
|
||||
public class XvFormBase : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using XericUI.Core;
|
||||
|
||||
namespace XericUI.XTable.Core
|
||||
{
|
||||
@@ -7,7 +8,7 @@ namespace XericUI.XTable.Core
|
||||
/// 表格组件在 Awake 时自动加载 Resources 中的 "XTableDefaultConfig",
|
||||
/// 或由外部脚本在初始化阶段显式赋值。
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "XTableConfig", menuName = "Xeric Library/Table/Table Config", order = 100)]
|
||||
[CreateAssetMenu(fileName = "XTableConfig", menuName = XericRegistrationPaths.Table + "/Table Config", order = 100)]
|
||||
public class XTableConfig : ScriptableObject
|
||||
{
|
||||
#region 布局
|
||||
|
||||
@@ -9,6 +9,8 @@ using XericUI.XTable.Core;
|
||||
using XericUI.XTable.Mapping;
|
||||
using XericUI.XTable.Rendering.Elements;
|
||||
using XericLibrary.Runtime.SuperStyleSheet;
|
||||
// 守卫外:[ContextMenu(XericRegistrationPaths.Table + …)] 是运行时属性,玩家编译也要算出常量
|
||||
using XericUI.Core;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
@@ -647,7 +649,7 @@ namespace XericUI.XTable.Rendering.Component
|
||||
/// 行为:立即销毁池与渲染器;CheckUpdate 内禁止调用。
|
||||
/// 建议:仅用于初始化或故障恢复,不要与批量业务更新混用。
|
||||
/// </summary>
|
||||
[ContextMenu("Xeric UI/完全重建表格")]
|
||||
[ContextMenu(XericRegistrationPaths.Table + "/完全重建表格")]
|
||||
public void FullRebuild()
|
||||
{
|
||||
ThrowIfCheckingUpdate(nameof(FullRebuild));
|
||||
|
||||
@@ -5,6 +5,8 @@ using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using XericUI.Core.Base;
|
||||
// 守卫外:下面 [AddComponentMenu(XericRegistrationPaths.Table + …)] 的参数玩家编译也要算出常量
|
||||
using XericUI.Core;
|
||||
using XericUI.XTable.Core;
|
||||
using XericUI.XTable.Mapping;
|
||||
using XericUI.XTable.Rendering.Elements;
|
||||
@@ -22,7 +24,7 @@ namespace XericUI.XTable.Rendering.Component
|
||||
/// 无行列标题、无样式差异分割线——所有内容由数据定义。
|
||||
/// </summary>
|
||||
[ExecuteAlways]
|
||||
[AddComponentMenu("Xeric UI Vessel/Table/Xeric UI Action Table", 60)]
|
||||
[AddComponentMenu(XericRegistrationPaths.Table + "/Xeric UI Action Table", 60)]
|
||||
public partial class XericUIActionTable : XericUIBehaviour
|
||||
{
|
||||
#region 序列化字段
|
||||
|
||||
Reference in New Issue
Block a user