类参考
UDreamWidget
UDreamWidget
继承自 UObject。
声明于 Public/Core/Components/DreamWidget.h。
几乎所有 UI 相关内容的基类。
Properties
| Name | Type | Category | In the details panel | From Blueprint | Description |
|---|---|---|---|---|---|
RelativeLocation | FVector | Transform | yes | read only | 局部空间位置。DuiHidden:setter 会重新计算锚点,而 .dui 所书写的是 AnchorData——如果反射扫描也写入此属性,同一个位置就会被编写两次。 |
RelativeRotation | FQuat | Transform | - | read only | 局部空间旋转。未标记 Interp:Sequencer 没有针对 FQuat 的属性轨道,因此无法直接为其打关键帧。请改为对 RelativeRotationEuler 做动画,它镜像了此值。 // DuiHidden:RelativeRotationEuler 是此值面向作者的一面,而四元数没有 // 书写形式——但 FQuat 是普通结构体,所以如果没有此标记,反射扫描会 // 递归它,并在已经写入的欧拉角旁边再写入 X/Y/Z/W 分量行。 |
RelativeRotationEuler | FRotator | Transform | yes | read only | 局部空间旋转的欧拉角表示,镜像 RelativeRotation,以便旋转可以被动画化:Sequencer 有 FRotator 属性轨道,但没有针对 FQuat 的。 |
RelativeScale | FVector | Transform | 是 | 只读 | 局部空间缩放 // 此属性和 RelativeLocation 上标记 DreamGUI_Hidden:Layout 分区的 position 与 scale 行会编辑它们(Interp 使其可编辑)。 |
RenderTranslation | FVector | Render Transform | yes | read only | 渲染变换。 |
RenderRotation | FRotator | Render Transform | 是 | 只读 | 围绕 RenderTransformPivot 的仅渲染旋转,单位为度。Roll 是平面内角度,正的 Roll 会让控件在屏幕上顺时针旋转(其右边缘向下),与 UMG 的角度一致;Pitch 和 Yaw 则绕其水平轴和垂直轴把控件转出平面。使用 FRotator 而非 FQuat 的原因与 RelativeRotationEuler 存在的原因相同:Sequencer 对其中一个有属性轨道,对另一个没有。此处不需要临时镜像,因为它本身就是序列化的真实来源。 |
RenderScale | FVector | Render Transform | yes | read only | 围绕 RenderTransformPivot 的仅渲染缩放。 |
RenderTransformPivot | FVector2D | Render Transform | yes | read only | RenderRotation 和 RenderScale 围绕其旋转的中心,在控件自身矩形内归一化。(0,0) 为左下角,(1,1) 为右上角,与 AnchorData.Pivot 一致,而非 UMG 的左上角原点——此分支内部的一致性优先于与另一个引擎的一致性。使用二维是因为矩形本身就是二维的:它解析为控件自身平面上的一个点。独立于属于布局的 AnchorData.Pivot。 |
RenderShear | FVector2D | Render Transform | yes | read only | 围绕此控件自身轴心的仅渲染斜切,单位为度,应用于此控件及其整个子树。关于它影响和不影响什么,请参见 GetRenderShear。 |
RenderLayer | EDreamWidgetRenderLayer | Render Transform | yes | - | 此控件是否可以成为其画布的渲染层,以及何时:当其渲染变换持续变化时(Auto),只要可以时(Always),或从不。图层的变换在 GPU 上应用于其下的所有内容。 |
bPerspective | bool | Perspective | yes | read only | 透视,采用 CSS 使用的形式。 |
PerspectiveFieldOfView | float | Perspective | yes | read only | 观察子树的角度,单位为度。角度越大效果越强,其含义与 UDreamCanvas::FieldOfView 完全一致——眼睛距离由同一公式针对此控件自身宽度推导而来。 |
PerspectiveOrigin | FVector2D | Perspective | yes | read only | 眼睛在此控件自身矩形上方所处的位置,已归一化:(0,0) 左下角,(1,1) 右上角,与 RenderTransformPivot 一致。即 CSS 的 perspective-origin,也是子树汇聚的消失点。 |
AnchorData | FDreamUIAnchorData | DreamGUI-AnchorData | 是 | - | AnchorData 包含矩形变换和颜色 // DreamGUI_Hidden:Layout 分区的 anchor、position 和 size 行会编辑它。 |
AnimatableWidth | float | DreamGUI-AnchorData | 是 | 只读 | 已解析几何体的可动画镜像,每个可由 Sequencer 打关键帧的通道各一个。Sequencer 直接读取属性内存,而写入则通过 setter(即 RelativeRotationEuler 的故事),因此每个都必须是真实存储的字段;SyncAnimatableGeometryMirrors 使它们与下面的缓存保持相等。过期的缓存及其镜像会一起过期,这也正是细节面板所显示的内容。 // 六个属性都标记 DuiHidden:它们是供 Sequencer 使用的 AnchorData 的 Interp 镜像,其 setter // 会写回 AnchorData——这正是它们免于临时拒绝的原因,// 也正是反射扫描不得书写它们的原因:AnchorData 已经携带了该值。出于同样的原因标记 DreamGUI_Hidden:Layout 分区的行会编辑该值。 |
AnimatableHeight | float | DreamGUI-AnchorData | yes | read only | |
AnimatableAnchorLeft | float | DreamGUI-AnchorData | yes | read only | |
AnimatableAnchorRight | float | DreamGUI-AnchorData | yes | read only | |
AnimatableAnchorTop | float | DreamGUI-AnchorData | yes | read only | |
AnimatableAnchorBottom | float | DreamGUI-AnchorData | yes | read only | |
RenderOpacity | float | DreamGUI | 是 | 只读 | Interp,因此 .dui 时间轴和动画编辑器可以像为移动打关键帧那样为淡入淡出打关键帧。 |
Clipping | EDreamWidgetClipping | DreamGUI | yes | read only | |
ClippingCornerRadius | FVector4f | DreamGUI | yes | read only | X- 右下,Y- 右上,Z- 左上,W- 左下 |
ClippingMargin | FMargin | DreamGUI | yes | read only | 向外扩展裁剪区域。 |
ClipMask | FDreamClipMask | DreamGUI | 是 | 只读 | 当此控件裁剪到自身边界时,作用于其裁剪的遮罩:可以是形状、羽化边缘、纹理或程序化图案,并可按需反转。它像裁剪矩形一样裁剪整个子树。在其默认值下不产生任何遮罩。 |
bClipToBelow | bool | DreamGUI | 是 | 只读 | 仅在其下一层被绘制的位置、并按该层的不透明度显示此控件及其下所有内容:一种裁剪遮罩。下一层是在此控件之前绘制、且自身不裁剪到其下一层的同级控件,因此连续裁剪到下一层的同级控件会共用同一个。它可以是普通图像或纹理,也可以是九宫格图像或纹理,或矩形块;其他任何内容都不会被裁剪到,并给出警告。隐藏的下一层也会隐藏此控件。 |
bUniformSetClippingCornerRadius | bool | DreamGUI | 是 | - | DreamGUI_Hidden:Clipping 组中 Corner Radius 行上的锁。 |
bWidgetActive | bool | DreamGUI | yes | read only | 如果不是 WidgetActive,则不可见、不占用布局空间、不可交互、不可命中测试 |
Visibility | EDreamWidgetVisibility | DreamGUI | yes | read only | 独立于 WidgetActive 控制布局、绘制和命中测试。 |
Shown | bool | DreamGUI | - | read only | 以是或否表示的可见性:true 为 Visible,false 为 Collapsed。这就是 Shown <- HasSave() 在 .dui 中绑定的内容,也是 if 块在其各分支的每个控件上绑定的内容。它不保留自身的任何内容——读取它即读取 Visibility(除 Collapsed 外的任何值都表示显示),写入它即写入 Visibility——因此下面的字段只是反射为具有 getter 和 setter 的属性所需的槽位。DuiHidden:写入回写所书写的是 Visibility,因此反射扫描不得将同一个值编写两次。 |
PixelSnapping | EWidgetPixelSnapping | DreamGUI | yes | read only | 控件是否会吸附到最近的像素进行绘制。可提高清晰度,但可能导致动画中出现可见的阶梯感。 |
Raycastable | EDreamWidgetRaycastableType | DreamGUI | yes | read only | |
Interactable | EDreamWidgetInteractableType | DreamGUI | yes | read only | 控件是否启用交互? |
bIsEnabled | bool | Behavior | yes | read only | UMG 的 bIsEnabled:游戏用来将某物置灰并使其停止响应的开关。 |
bRestrictNavigationArea | uint8 | DreamGUI | yes | read only | 将导航区域限制为此 UI 节点的子级,以禁止其导航出去。 |
NavigationBoundaryRule | EDreamUINavigationBoundaryRule | DreamGUI | yes | read only | 当方向性移动到达此区域边缘时发生什么。仅在本身即为受限区域的控件上被读取;Stop 保持每个现有预制体已有的行为。 |
bIgnoreLayout | bool | DreamGUI | yes | read only | 忽略父级布局容器 |
Visual | TObjectPtr<UDreamVisual> | Visual | yes | read only | |
LayoutContainer | TObjectPtr<UDreamLayoutContainer> | LayoutContainer | yes | read only | |
LayoutSelf | TObjectPtr<UDreamLayoutSelf> | LayoutSelf | yes | read only | |
PanelSlot | TObjectPtr<UDreamPanelSlot> | PanelSlot | 是 | 只读 | 由父面板拥有的布局数据。它与 LayoutSelf 分开,以便旧版 Flex/Grid 资源仍然有效。 // DreamGUI_Hidden:槽自身的属性属于 Slot 分区,针对控件所在的面板。 |
bIsFocusable | bool | Interaction | Focus | 是 | 只读 |
bIsTabStop | bool | Interaction | Focus | 是 | 只读 |
TabIndex | int32 | Interaction | Focus | 是 | 只读 |
TabNavigation | EDreamWidgetTabNavigation | Interaction | Focus | 是 | 只读 |
Cursor | TEnumAsByte<EMouseCursor::Type> | Interaction | 是 | 只读 | |
ToolTipText | FText | Interaction | 是 | 只读 | |
ToolTipWidgetClass | TSubclassOf<UDreamUserWidget> | Interaction | 是 | 只读 | 将此控件类本身显示为工具提示,而不是使用内置的文本气泡。当两者都设置时优先级高于 ToolTipText,与工具提示服务解析其两条内容路径的既有顺序一致。 |
FlowDirectionPreference | EDreamFlowDirectionPreference | Localization | 是 | 只读 | 此控件的布局流向。Inherit——默认值,也是在此存在之前创作的每个资源所持有的值——从最近声明了流向的祖先获取答案,因此只需在其根节点上设置一次 Culture 即可镜像整个界面。 |
AccessibleBehavior | EDreamAccessibleBehavior | Accessibility | 是 | 只读 | |
AccessibleText | FText | Accessibility | 是 | 只读 | |
AccessibleSummaryText | FText | Accessibility | 是 | 只读 | |
SiblingIndex | int32 | DreamGUI | 是 | - | 层级索引、层级顺序、渲染顺序 |
FlattenHierarchyIndex | int32 | DreamGUI | - | - | 相对于根 DreamWidget 的扁平化深度/层级索引。-1 表示尚未设置。RootWidget - 0 Widget - 1 Widget - 2 Widget - 3 Widget - 4 Widget - 5 Widget - 6 |
DisplayName | FString | DreamGUI | - | - | 当你需要按名称查找子 UI 元素时这很有用,可使用函数 "FindChildByDisplayName" 或 "FindChildArrayByDisplayName" 来完成。displayName 通常与 Actor 的 ActorLabel 相同。如果你想更改它,只需更改 Actor 标签(Actor 在世界大纲中的名称)。如果 Actor 的 ActorLabel 以 "//" 开头,则 "//" 会被忽略。ActorLabel 仅在编辑器中有效,但此属性在运行时也有效。 |
Tags | TArray<FName> | DreamGUI | 是 | read / write | 为按控件的本质(而非其 id)查找控件的代码提供名称——每一个 trim、每一个 sigil——正如 AActor::Tags 之于 Actor。.dui 会写入它们 @tag Trim, Glow;UDreamUserWidget::GetWidgetsByTag 会在用户控件自身的树中查找它们。库中没有任何代码读取它们。 |
函数
| 函数 | 类型 | 描述 |
|---|---|---|
UDreamPanelSlot* AddChild(UDreamWidget* InChild, int32 InSiblingIndex) | callable | UMG 的 UPanelWidget::AddChild 的改编版。UMG 需要八个带类型的变体,因为每个面板都有自己的插槽类;这里只有一个 UDreamPanelSlot,因此一个动词即可返回它,你可以直接从结果上设置内边距。 |
UDreamUIBehaviour* AddComponent(TSubclassOf<UDreamUIBehaviour> ComponentClass) | callable | 添加组件 |
void AddTag(FName InTag) | callable | 若 InTag 尚不存在(或为 None)则添加它。 |
UDreamTweener* AnchoredPositionTo(FVector2D endValue, float duration, float delay, EDreamTweenEase ease) | callable | 锚定位置到 |
void AnnounceAccessibleText(FText Announcement) | callable | 通过 Slate 的平台无障碍公告通道发送文本。 |
bool CanAcceptAdditionalChildren(int32 AdditionalChildCount) | pure | 可接受额外子级 |
bool CanAcceptChild(UDreamWidget* InChild) | pure | 可接受子级 |
void ClearFocus(int32 UserIndex, int32 PointerId) | callable | 清除焦点 |
void ClearKeyboardFocus() | callable | 如果此控件持有所属玩家的焦点,则放弃焦点。 |
void ClearRenderTransform() | callable | 在一次失效中回到布局所放置的精确位置进行绘制。 |
UDreamLayoutContainer* CreateNewLayoutContainer(TSubclassOf<UDreamLayoutContainer> Class) | callable | 创建新的布局容器 |
UDreamLayoutSelf* CreateNewLayoutSelf(TSubclassOf<UDreamLayoutSelf> Class) | callable | 创建新的布局自身 |
UDreamPanelSlot* CreateNewPanelSlot(TSubclassOf<UDreamPanelSlot> SlotClass) | callable | 创建新的面板插槽 |
UDreamVisual* CreateNewVisual(TSubclassOf<UDreamVisual> VisualClass) | callable | 创建新的视觉 |
void DestroyAllChildren() | callable | 销毁每个子级及其子树。顾名思义:UMG 的 ClearChildren 只是分离并让 GC 回收这些片段,在这里会留下仍然注册着的活动控件却无人持有。 |
bool DestroyChild(UDreamWidget* InChild) | callable | 分离并销毁一个子级及其下方的所有内容。当你用完它时使用此方法。"销毁"是 DestroyWidget 意义上的词:之后 IsValid(InChild) 返回 false。 |
void DestroyWidget() | callable | 拆除此控件及其整个子树:取消注册、从父级分离、结束播放,并将其中的每个控件标记为垃圾。 |
TArray<UDreamWidget*> FindChildArrayByDisplayName(FString InName, bool IncludeChildren) | pure | 类似 "FindChildByDisplayName",但返回所有匹配该名称的子级。@param InName 需要查找的子级名称,区分大小写 @param IncludeChildren 同时在子级中搜索 |
UDreamWidget* FindChildByDisplayName(FString InName, bool IncludeChildren) | pure | 在子级中搜索并返回第一个 displayName 与输入名称匹配的 UIItem。支持层级嵌套搜索,例如:InName = "Content/ListItem/NameLabel"。@param InName 需要查找的子级名称,区分大小写 @param IncludeChildren 同时在子级中搜索 |
UDreamWidget* FindClipToBelowUnderlay() | 纯函数 | 当此控件裁剪到下一层(bClipToBelow)时,它所裁剪到的层:即在其之前绘制、且自身不裁剪到其下一层的同级控件。当它不裁剪到下一层,或之前没有绘制任何内容时,为 null。 |
void ForceLayoutPrepass() | callable | 立即对此控件的树进行布局,而不是在下一轮进行——UMG 的 ForceLayoutPrepass。 |
EDreamAccessibleBehavior GetAccessibleBehavior() | pure | 获取无障碍行为 |
FText GetAccessibleSummaryText() | pure | 获取无障碍摘要文本 |
FText GetAccessibleText() | pure | 获取无障碍文本 |
TArray<UDreamUIBehaviour*> GetAllComponents() | pure | 获取所有组件 |
FDreamUIAnchorData GetAnchorData() | pure | 获取锚点数据 |
FVector2D GetAnchoredPosition() | pure | 获取锚定位置 |
FVector2D GetAnchorMax() | pure | 获取锚点最大值 |
FVector2D GetAnchorMin() | pure | 获取锚点最小值 |
FMargin GetAnchorOffset() | pure | 获取锚点偏移 |
float GetAnchorOffsetBottom() | pure | 获取锚点偏移底部 |
float GetAnchorOffsetLeft() | pure | 获取锚点偏移左侧 |
float GetAnchorOffsetRight() | pure | 获取锚点偏移右侧 |
float GetAnchorOffsetTop() | pure | 获取锚点偏移顶部 |
USceneComponent* GetAttachedRootSceneComponent() | pure | 获取附加的根场景组件 |
UDreamWidget* GetChildByIndex(int32 index) | pure | 按索引获取子级 |
int32 GetChildIndex(UDreamWidget* InChild) | pure | InChild 在此控件子级中的位置,如果不是其子级则为 INDEX_NONE。 |
TArray<UDreamWidget*> GetChildren() | pure | 获取子级 |
int32 GetChildrenCount() | pure | 获取子级数量 |
bool GetChildrenHitTestVisibleInHierarchy() | pure | 获取层级中可见命中测试的子级 |
FDreamClipMask GetClipMask() | 纯函数 | 获取裁剪遮罩 |
EDreamWidgetClipping GetClipping() | pure | 获取裁剪 |
FVector4f GetClippingCornerRadius() | pure | 获取裁剪圆角半径 |
FMargin GetClippingMargin() | pure | 获取裁剪边距 |
bool GetClipToBelow() | 纯函数 | 获取裁剪到下一层 |
UDreamUIBehaviour* GetComponent(TSubclassOf<UDreamUIBehaviour> ComponentClass) | pure | 获取组件 |
UDreamUIBehaviour* GetComponentByInterface(UClass* InterfaceClass) | pure | 按接口获取组件 |
TArray<UDreamUIBehaviour*> GetComponents(TSubclassOf<UDreamUIBehaviour> ComponentClass) | pure | 获取组件 |
FLinearColor GetContentTint() | pure | 获取内容着色 |
TEnumAsByte<EMouseCursor::Type> GetCursor() | pure | 获取光标 |
FVector2D GetDesiredSize() | pure | 此控件希望多大,由其父面板进行测量的结果。 |
FString GetDisplayName() | pure | 获取显示名称 |
float GetFinalRenderOpacity() | pure | 检索此控件在渲染时使用的最终不透明度值,考虑所有相关设置和父级不透明度。此值受控件自身的 RenderOpacity 属性和层级父级 RenderOpacity 影响。 |
int32 GetFlattenHierarchyIndex() | pure | 从扁平层级中最顶层的控件获取此控件的索引顺序。 |
EDreamFlowDirectionPreference GetFlowDirectionPreference() | pure | 获取流向偏好 |
FVector GetForwardVector() | pure | 获取前向向量 |
UGameInstance* GetGameInstance() | pure | 获取游戏实例 |
float GetHeight() | pure | 获取高度 |
bool GetHitTestVisibleInHierarchy() | pure | 获取层级中可见命中测试 |
float GetHorizontalAnchoredPosition() | pure | 获取水平锚定位置 |
bool GetIgnoreLayout() | pure | 获取忽略布局 |
FLinearColor GetInheritedContentTint() | pure | 每个祖先的 ContentTint 的乘积,不包含此控件自身的:即此控件视觉的着色来源。无着色时为白色。 |
EDreamWidgetInteractableType GetInteractable() | pure | 获取可交互 |
bool GetInteractableInHierarchy() | pure | 获取在使用输入交互时此控件是否可交互,需考虑所有父级设置。@return 此控件是否可交互 |
bool GetIsEnabled() | pure | 此控件自身的启用开关。要获取最终有效的答案,请调用 GetIsEnabledInHierarchy。 |
bool GetIsEnabledInHierarchy() | pure | 当此控件及其所有祖先均已启用时为 true。这是级联后的答案。 |
bool GetIsFocusable() | pure | 获取是否可聚焦 |
bool GetIsTabStop() | pure | 参见 bIsTabStop。 |
UDreamLayoutContainer* GetLayoutContainer() | pure | 获取布局容器 |
UDreamLayoutSelf* GetLayoutSelf() | pure | 获取布局自身 |
bool GetLayoutVisibleInHierarchy() | pure | Hidden 仍参与布局;Collapsed 则不参与。 |
float GetLocalSpaceBottom() | pure | 获取本地空间底部 |
FVector2D GetLocalSpaceCenter() | pure | 获取本地空间中心 |
float GetLocalSpaceLeft() | pure | 获取本地空间左侧 |
FVector2D GetLocalSpaceLeftBottomPoint() | pure | 获取本地空间左下点 |
float GetLocalSpaceRight() | pure | 获取本地空间右侧 |
FVector2D GetLocalSpaceRightTopPoint() | pure | 获取本地空间右上点 |
float GetLocalSpaceTop() | pure | 获取本地空间顶部 |
int32 GetMaxChildrenCapacity() | pure | 由当前 LayoutContainer 和 Behaviours 施加的最小子项容量。INDEX_NONE 表示无限制。 |
UDreamWidgetNavigation* GetNavigation() | pure | 此控件的各方向导航规则;若没有则为 null。 |
EDreamUINavigationBoundaryRule GetNavigationBoundaryRule() | pure | 获取导航边界规则 |
UDreamWidgetNavigation* GetOrCreateNavigation() | callable | 规则;若此控件原本没有,则创建一个未经改动的规则集。在活动控件上永不为 null。 |
ULocalPlayer* GetOwningLocalPlayer() | pure | 获取所属本地玩家 |
APlayerController* GetOwningPlayer() | pure | 此控件所属的本地玩家:其上方最近的用户控件拥有它,而不含任何用户控件的树属于第一个本地玩家,在单人游戏中这就是全部答案。 |
int32 GetOwningPlayerIndex() | pure | 此控件的屏幕、聚焦和输入所使用的本地玩家索引——与 UDreamEventSystem、射线投射器和指针事件携带的数字相同。无法解析时为 0。 |
UDreamPanelSlot* GetPanelSlot() | pure | 获取面板插槽 |
UDreamWidget* GetParent() | pure | 获取父级 |
FString GetPathDisplayName(UObject* StopOuter) | pure | 获取路径显示名称 |
bool GetPerspective() | pure | 获取透视 |
float GetPerspectiveDistance() | pure | 视场角相对于当前宽度换算出的视点距离。 |
float GetPerspectiveFieldOfView() | pure | 获取透视视场角 |
FVector2D GetPerspectiveOrigin() | pure | 获取透视原点 |
FVector2D GetPivot() | pure | 获取轴心点 |
EWidgetPixelSnapping GetPixelSnapping() | pure | 获取像素对齐 |
bool GetPixelSnappingInHierarchy() | pure | 获取层级中的像素对齐 |
EDreamWidgetRaycastableType GetRaycastable() | pure | 获取可射线投射 |
bool GetRaycastableInHierarchy() | pure | 获取层级中的可射线投射 |
FVector GetRelativeLocation() | pure | 获取相对位置 |
FQuat GetRelativeRotation() | pure | 获取相对旋转 |
FRotator GetRelativeRotationEuler() | pure | GetRelativeRotation 的欧拉角镜像,用于通过 Sequencer 制作旋转动画。 |
FVector GetRelativeScale() | pure | 获取相对缩放 |
UDreamCanvas* GetRenderCanvas() | pure | 获取渲染和更新此 UI 元素的画布 |
EDreamWidgetRenderLayer GetRenderLayerMode() | pure | 此控件何时可以成为其画布的渲染层。IsRenderLayer 表示它现在是否是。 |
FVector2D GetRenderOffset() | pure | Get Render Offset |
float GetRenderOpacity() | pure | 获取渲染不透明度 |
FRotator GetRenderRotation() | pure | 获取渲染旋转 |
FVector GetRenderScale() | pure | 获取渲染缩放 |
FVector2D GetRenderShear() | pure | 绘制此控件及其下方所有内容时施加的倾斜——UMG 的 FWidgetTransform::Shear,以度为单位,绕此控件自身的轴心点。 |
float GetRenderTransformAngle() | pure | 获取渲染变换角度 |
FVector2D GetRenderTransformPivot() | pure | 获取渲染变换轴心点 |
FVector GetRenderTranslation() | pure | 获取渲染平移 |
bool GetRenderVisibleInHierarchy() | pure | 获取层级中的渲染可见性 |
EDreamFlowDirection GetResolvedFlowDirection() | pure | 沿父级链跟踪 Inherit 后,此控件的布局实际流动的方向。 |
bool GetRestrictNavigationArea() | pure | 获取限制导航区域 |
UDreamWidget* GetRestrictNavigationAreaWidget() | pure | 向上搜索 bRestrictNavigationArea 为 true 的父 DreamWidget 并返回它,包括此 DreamWidget 自身 |
FVector GetRightVector() | pure | 获取右向量 |
UDreamCanvas* GetRootCanvas() | pure | 获取层级的根画布 |
UDreamWidget* GetRootWidgetInHierarchy() | pure | 返回层级中的根控件,若尚未初始化则可能为 null。 |
bool GetShown() | pure | 除 Collapsed 之外的任何状态。参见 Shown。 |
int32 GetSiblingIndex() | pure | 获取同级索引 |
FVector2D GetSize() | pure | 获取大小 |
FVector2D GetSizeDelta() | pure | 获取大小增量 |
int32 GetTabIndex() | pure | 参见 TabIndex。 |
EDreamWidgetTabNavigation GetTabNavigation() | pure | 参见 TabNavigation。 |
FText GetToolTipText() | pure | 获取工具提示文本 |
TSubclassOf<UDreamUserWidget> GetToolTipWidgetClass() | pure | 获取工具提示控件类 |
FVector GetUpVector() | pure | 获取上向量 |
float GetVerticalAnchoredPosition() | pure | 获取垂直锚定位置 |
EDreamWidgetVisibility GetVisibility() | pure | 获取可见性 |
UDreamVisual* GetVisual() | pure | 获取视觉 |
bool GetWidgetActive() | pure | 获取 WidgetActive 属性值 @return WidgetActive 自身属性 |
bool GetWidgetActiveInHierarchy() | pure | 获取层级中控件是否激活 @return 控件在层级中是否激活 |
float GetWidth() | pure | 获取宽度 |
FVector GetWorldLocation() | pure | 获取世界位置 |
FQuat GetWorldRotation() | pure | 获取世界旋转 |
FVector GetWorldScale() | pure | 获取世界缩放 |
FTransform GetWorldTransform() | pure | 获取世界变换 |
bool HasAnyChildren() | pure | 是否有任何子项 |
bool HasAnyUserFocus() | pure | 是否有任何本地玩家的焦点落在此控件上? |
bool HasChild(UDreamWidget* InChild) | pure | 是否有子项 |
bool HasFocus(int32 UserIndex, int32 PointerId) | pure | 是否有焦点 |
bool HasFocusedDescendants() | pure | 是否有任何本地玩家的焦点落在此控件下方的内容上?UMG 的拼写方式相同。 |
bool HasInheritedPerspective() | pure | 当某个祖先声明了透视时为 true。与 HasPerspectiveApplied 不同,后者包括此控件自身的透视。 |
bool HasKeyboardFocus() | pure | 是否有键盘焦点 |
bool HasMouseCapture() | pure | 是否有指针在此控件上按住其按键?这是此框架最接近 Slate 鼠标捕获的概念:此处没有捕获对象,但被按下指针的 PressWidget 正是持续接收其拖拽和释放的对象,对调用者而言这就是捕获的含义。 |
bool HasMouseCaptureByUser(int32 InUserIndex, int32 InPointerIndex) | pure | 针对单个玩家、并可选单个指针的相同问题。-1 表示该玩家的任意指针。 |
bool HasOwnRenderShear() | pure | 此控件自身的倾斜,忽略链路。 |
bool HasPanelSlots() | pure | 此控件的布局容器是否向其子项提供 UDreamPanelSlot。这就是 AddChild 返回 null 背后的原因:控件可以在完全没有容器的情况下接收子项,而 Dream flex box 和 grid 在没有插槽的情况下排列子项,因此“排列子项”和“拥有插槽”并非同一回事。 |
bool HasPerspectiveApplied() | pure | 当某个作用域塑造此控件自身的几何时为 true——无论是其自身声明还是祖先的声明。控件位于其自身的透视之内:作用域的平面取自布局放置控件的位置,因此其自身的渲染旋转是相对于该平面度量的,并像其他任何内容一样产生透视缩短。没有渲染变换的控件在该平面内是平的,返回时不受影响,因此在有内容获得深度之前,开启透视仍然不会改变任何东西。 |
bool HasPerspectiveInHierarchy() | pure | 当此控件或任何祖先声明了透视时为 true。一个位,与变换保持同步。 |
bool HasRenderTransform() | pure | 当任何渲染通道偏离其默认值时为 true,即绘制与布局不同之时。 |
bool HasShearApplied() | pure | 当此控件或任何祖先被倾斜时为 true——决定矩阵路径的位。 |
bool HasTag(FName InTag) | pure | Tags 是否包含 InTag。None 永远不是标签。 |
bool HasUserFocus(APlayerController* InPlayerController) | pure | 是否有用户焦点 |
bool HasUserFocusedDescendants(APlayerController* InPlayerController) | pure | 是否有用户聚焦的后代 |
UDreamTweener* HeightTo(float endValue, float duration, float delay, EDreamTweenEase ease) | callable | 高度到 |
UDreamTweener* HorizontalAnchoredPositionTo(float endValue, float duration, float delay, EDreamTweenEase ease) | callable | 水平锚定位置到 |
void InvalidateLayoutAndVolatility() | callable | 请求在下一帧对该控件进行布局。这是 UMG 的命名;其中与易变性相关的部分在此没有对应物,也不作暗示——参见对照表。 |
bool IsChildOf(UDreamWidget* InTarget) | pure | 沿父级列表递归向上查找,如果此控件是 InTarget 的后代则返回 true。 |
bool IsHovered() | pure | 是否有指针悬停在此控件上——或悬停在其内部的任何对象上?即 UMG 的 IsHovered,悬停会向上传递到祖先,这正是按钮自身的悬停状态在指针位于其标签之上时仍能保持的原因。 |
bool IsInViewport() | pure | 此控件,或它所依附的某个对象,当前是否在玩家屏幕上? |
bool IsPointVisibleOnClip(FVector Value) | pure | 点是否在裁剪区域内可见 |
bool IsRendered() | pure | 可见且确实在贡献颜色。淡出到全透明的子树是可见的,但并未被渲染。 |
bool IsRenderTargetUI() | pure | 此 UI 元素是否渲染到 RenderTarget? |
bool IsScreenSpaceOverlayUI() | pure | 此 UI 元素是否渲染到屏幕空间叠加层? |
bool IsVisible() | pure | 即 UMG 的 IsVisible。层级关系已被折叠纳入其中,与 UMG 的不同,UMG 只询问此控件:这里缓存的级联结果才是每位调用者所说的“在屏幕上”的含义。 |
bool IsWorldSpaceUI() | pure | 此 UI 元素是否在世界空间中渲染? |
UDreamTweener* LocalPositionTo(FVector endValue, float duration, float delay, EDreamTweenEase ease) | callable | 本地位置到 |
UDreamTweener* LocalPositionXTo(double endValue, float duration, float delay, EDreamTweenEase ease) | callable | 本地 X 位置到 |
UDreamTweener* LocalPositionYTo(double endValue, float duration, float delay, EDreamTweenEase ease) | callable | 本地 Y 位置到 |
UDreamTweener* LocalPositionZTo(double endValue, float duration, float delay, EDreamTweenEase ease) | callable | 本地 Z 位置到 |
UDreamTweener* LocalRotationQuaternionTo(FQuat endValue, float duration, float delay, EDreamTweenEase ease) | callable | 旋转到绝对四元数旋转值 |
UDreamTweener* LocalRotatorTo(FRotator endValue, bool shortestPath, float duration, float delay, EDreamTweenEase ease) | callable | 旋转到绝对旋转体值 |
UDreamTweener* LocalScaleTo(FVector endValue, float duration, float delay, EDreamTweenEase ease) | callable | 本地缩放至 |
UDreamTweener* LocalUniformScaleTo(float endValue, float duration, float delay, EDreamTweenEase ease) | callable | 本地等比缩放至 |
void MarkLayoutForRebuild(UDreamWidget* InWidget) | callable | 标记布局以重建 |
void MoveComponentToIndex(UDreamUIBehaviour* Component, int32 NewIndex) | callable | 移动组件到索引 |
void RebuildLayoutImmediately(UDreamWidget* InWidget) | callable | 立即重建布局 |
bool RemoveChild(UDreamWidget* InChild) | callable | 分离一个子级并使其保持存活:仍处于注册状态,子树完好,可随时被添加到别处。它会回到刚创建的控件所处的尚未添加状态,因此在此期间不绘制任何内容,其行为也被禁用——这正是它成为池化操作代词的原因,也是池化控件仍显示为被持有而非泄漏的原因。 |
bool RemoveChildAt(int32 InIndex) | callable | 移除指定索引处的子级 |
void RemoveComponent(UDreamUIBehaviour* Component) | callable | 移除组件 |
bool RemoveFromParent() | callable | 将此控件从其依附的任何对象上取下,并保持存活——即 UMG 的 RemoveFromParent,从子级一侧来看。当它未依附于任何对象时返回 false。 |
void RemoveLayoutContainer() | callable | 移除布局容器 |
void RemoveLayoutSelf() | callable | 移除自身布局 |
void RemovePanelSlot() | callable | 移除面板槽位 |
bool RemoveTag(FName InTag) | callable | 移除 InTag;若它原本不存在则返回 false。 |
void RemoveVisual() | callable | 移除视觉 |
UDreamTweener* RenderAngleTo(float endValue, float duration, float delay, EDreamTweenEase ease) | callable | 渲染角度到 |
UDreamTweener* RenderOffsetTo(FVector2D endValue, float duration, float delay, EDreamTweenEase ease) | callable | 渲染偏移到 |
UDreamTweener* RenderOpacityTo(float endValue, float duration, float delay, EDreamTweenEase ease) | callable | 渲染不透明度到 |
UDreamTweener* RenderPoseTo(FVector endTranslation, FRotator endRotation, float duration, float delay, EDreamTweenEase ease) | callable | 渲染平移与旋转合在一起,共用同一个时钟和同一条缓动曲线:控件移动到的某个姿态。 |
UDreamTweener* RenderRotationTo(FRotator endValue, float duration, float delay, EDreamTweenEase ease) | callable | 完整的渲染旋转,既包括平面内也包括平面外:侧面板绕铰链打开、卡片翻转。Pitch、Yaw 和 Roll 各自从当前位置运行到指定位置,因此 yaw 从 0 到 180 是转半圈,而不是不转。 |
UDreamTweener* RenderScaleTo(FVector endValue, float duration, float delay, EDreamTweenEase ease) | callable | 渲染缩放至 |
UDreamTweener* RenderTranslationTo(FVector endValue, float duration, float delay, EDreamTweenEase ease) | callable | 渲染变换的补间:它们移动、缩放和旋转被绘制和被命中的内容,而从不作用于布局,因此它们适用于由面板放置的控件——垂直框中的一行滑入、一个标签被推向一旁、一条线从其左侧生长出来。上方的锚定位置和尺寸补间则改为写入控件的布局,而其面板会在下一次遍历时覆盖它。RenderTranslationTo 处于本地空间(X 为深度,Y 为右,Z 为上);RenderOffsetTo 是在画布平面上的同一种移动(x 为右,y 为上),深度保持不变;RenderAngleTo 是平面内角度(SetRenderTransformAngle)。 |
void ResetCursor() | callable | 回到不发表意见的状态,从而使祖先的光标再次显现。即 UMG 的 ResetCursor。 |
void SetAccessibleBehavior(EDreamAccessibleBehavior Value) | callable | 设置无障碍行为 |
void SetAccessibleSummaryText(FText Value) | callable | 设置无障碍摘要文本 |
void SetAccessibleText(FText Value) | callable | 设置无障碍文本 |
void SetAnchorData(FDreamUIAnchorData Value) | callable | 设置锚点数据 |
void SetAnchoredPosition(FVector2D Value) | callable | 设置锚定位置 |
void SetAnchoredPositionAndSizeDelta(FVector2D Position, FVector2D Size) | callable | 设置锚定位置和尺寸增量 |
void SetAnchorMax(FVector2D Value) | callable | 设置锚点最大值 |
void SetAnchorMin(FVector2D Value) | callable | 设置锚点最小值 |
void SetAnchorOffset(FMargin Value) | callable | 设置锚点偏移 |
void SetAnchorOffsetBottom(float Value) | callable | 此函数仅在 UIItem 有父级时有效 |
void SetAnchorOffsetLeft(float Value) | callable | 此函数仅在 UIItem 有父级时有效 |
void SetAnchorOffsetRight(float Value) | callable | 此函数仅在 UIItem 有父级时有效 |
void SetAnchorOffsetTop(float Value) | callable | 此函数仅在 UIItem 有父级时有效 |
void SetAsFirstSibling() | callable | 设为第一个同级 |
void SetAsLastSibling() | callable | 设为最后一个同级 |
void SetClipMask(FDreamClipMask Value) | 可调用 | 设置裁剪遮罩 |
void SetClipping(EDreamWidgetClipping Value) | callable | 设置裁剪 |
void SetClippingCornerRadius(FVector4f Value) | callable | 设置裁剪圆角半径 |
void SetClippingMargin(FMargin Value) | callable | 设置裁剪边距 |
void SetClipToBelow(bool Value) | 可调用 | 设置裁剪到下一层 |
void SetContentTint(FLinearColor Value) | callable | 为此控件下方绘制的所有内容着色——即其后代的视觉,从不作用于自身——正如 UMG 的内容颜色所做的那样(边框的 ContentColorAndOpacity 会传递给其子级,SCompoundWidget 的 ColorAndOpacity)。在线性空间中,与每个祖先的颜色一起,相乘到每个后代视觉的 UDreamVisual::GetFinalColor 中;将其颜色标记为脏。白色不改变任何内容。 |
void SetCursor(TEnumAsByte<EMouseCursor::Type> Value) | callable | 当指针悬停在此控件上时要显示的光标。Default 表示“无意见”,让下方的任何对象来认领它,这就是为什么这里没有 UMG 中那样的单独覆盖标志——DreamPointerPolicy::ResolveCursor 会按最内层优先遍历悬停栈,并取第一个有意见的控件。 |
void SetDisplayName(FString InName) | callable | 设置显示名称 |
void SetFlowDirectionPreference(EDreamFlowDirectionPreference Value) | callable | 更改此项会重新排列此控件以及每个从它继承该答案的后代。 |
bool SetFocus(int32 UserIndex, int32 PointerId) | callable | 设置焦点 |
void SetHeight(float Value) | callable | 设置高度 |
void SetHorizontalAnchoredPosition(float Value) | callable | 设置水平锚定位置 |
void SetHorizontalAnchorMinMax(FVector2D Value, bool bKeepSize, bool bKeepRelativeLocation) | callable | 设置水平锚点最小最大值 |
void SetHorizontalAndVerticalAnchorMinMax(FVector2D MinValue, FVector2D MaxValue, bool bKeepSize, bool bKeepRelativeLocation) | callable | 设置水平和垂直锚点最小最大值 |
void SetIgnoreLayout(bool Value) | callable | 设置忽略布局 |
void SetInteractable(EDreamWidgetInteractableType Value) | callable | 设置可交互 |
void SetIsEnabled(bool bInIsEnabled) | callable | 禁用(或重新启用)此控件及其下方的所有内容:该子树停止接收输入,其中的每个控件都会呈现其禁用外观,因为两者都会读取 GetInteractableInHierarchy,而此项会与之进行 AND 运算。 |
void SetIsFocusable(bool Value) | callable | 关闭此项也会放弃控件当前持有的任何焦点。 |
void SetIsTabStop(bool Value) | callable | 设置是否为 Tab 停靠点 |
bool SetKeyboardFocus() | callable | 在所属玩家的事件系统上获取焦点。当前无法获得时返回 false;在首次布局之前(本帧才显示)被请求的控件会在下一帧获取焦点,除非该玩家的焦点先移动。 |
void SetNavigationBoundaryRule(EDreamUINavigationBoundaryRule Value) | callable | 设置导航边界规则 |
void SetParent(UDreamWidget* InParent, bool InKeepWorldPosition, int32 InSiblingIndex) | callable | 设置此控件的父级,可使用 null 将其从原父级分离。@InKeepWorldPosition true - 更改父级后保持世界位置、旋转和缩放,false - 保持相对位置、旋转和缩放。@InSiblingIndex 如果 InParent 是有效控件,则将控件放在父级子级列表中的指定索引处,-1 或其他超出范围的值表示控件将被放在末尾。 |
void SetPerspective(bool Value) | callable | 设置透视 |
void SetPerspectiveFieldOfView(float Value) | callable | 设置透视视场角 |
void SetPerspectiveOrigin(FVector2D Value) | callable | 设置透视原点 |
void SetPivot(FVector2D Value) | callable | 设置轴心点 |
void SetPixelSnapping(EWidgetPixelSnapping Value) | callable | 设置像素对齐 |
void SetPositionAndSizeForLayoutAnimation(FVector2D Position, FVector2D Size) | callable | 为布局动画设置位置和尺寸 |
void SetPositionForLayoutAnimation(FVector2D Position) | callable | 为布局动画设置位置 |
void SetRaycastable(EDreamWidgetRaycastableType Value) | callable | 设置可射线检测 |
void SetRelativeLocation(FVector Value) | callable | 设置相对位置 |
void SetRelativeLocationAndRotation(FVector InLocation, FQuat InRotation) | callable | 设置相对位置和旋转 |
void SetRelativeRotation(FQuat Value) | callable | 设置相对旋转 |
void SetRelativeRotationEuler(FRotator Value) | callable | 从欧拉角设置旋转。这是 Sequencer 驱动的旋转入口点。 |
void SetRelativeScale(FVector Value) | callable | 设置相对缩放 |
void SetRenderLayerMode(EDreamWidgetRenderLayer Value) | callable | 此控件是否可以成为其画布的渲染层,以及何时成为;其画布在下次更新时使其成为渲染层,或将其收回。 |
void SetRenderOffset(FVector2D InOffset) | callable | 渲染平移在画布平面上的位移——x 向右、y 向上——同时其深度(RenderTranslation.X)保持不变:SetRenderTranslation(FVector(0, x, y)) 也会将深度设为 0。设置器 RenderOffsetTo 会进行补间。 |
void SetRenderOpacity(float Value) | callable | 设置渲染不透明度 |
void SetRenderRotation(FRotator Value) | callable | 设置渲染旋转 |
void SetRenderScale(FVector Value) | callable | 设置渲染缩放 |
void SetRenderShear(FVector2D Value) | callable | 设置渲染切变 |
void SetRenderTransformAngle(float InAngle) | callable | 平面内旋转,以度为单位——UMG 的渲染变换角度。 |
void SetRenderTransformPivot(FVector2D Value) | callable | 设置渲染变换轴心 |
void SetRenderTranslation(FVector Value) | callable | 设置渲染平移 |
void SetRestrictNavigationArea(bool Value) | callable | 设置限制导航区域 |
void SetShown(bool Value) | callable | 为 true 时可见,为 false 时折叠;已显示但处于隐藏或命中测试不可见的控件保持该状态。请参阅 Shown。 |
void SetSiblingIndex(int32 Value) | callable | 设置此控件在其父级子项列表中的同级索引。 |
void SetSizeDelta(FVector2D Value) | callable | 设置尺寸增量 |
void SetSizeForLayoutAnimation(FVector2D Position) | callable | 为布局动画设置尺寸 |
void SetTabIndex(int32 Value) | callable | 设置 Tab 索引 |
void SetTabNavigation(EDreamWidgetTabNavigation Value) | callable | 设置 Tab 导航 |
void SetToolTipText(FText Value) | callable | 设置工具提示文本 |
void SetToolTipWidgetClass(TSubclassOf<UDreamUserWidget> Value) | callable | UMG 的 SetToolTip,按类。Null 则回到文本气泡。 |
bool SetUserFocus(APlayerController* InPlayerController) | callable | 在指定玩家的事件系统上获取焦点。 |
void SetVerticalAnchoredPosition(float Value) | callable | 设置垂直锚定位置 |
void SetVerticalAnchorMinMax(FVector2D Value, bool bKeepSize, bool bKeepRelativeLocation) | callable | 设置垂直锚点最小最大值 |
void SetVisibility(EDreamWidgetVisibility Value) | callable | 设置可见性 |
void SetWidgetActive(bool Value) | callable | 设置 WidgetActive 自身属性 @param Value |
void SetWidgetTweenerAffectByGamePauseAndTimeDilation(UDreamWidget* Widget, UDreamTweener* Tweener) | callable | 上述每个补间动词——以及视觉元素的 ColorTo、AlphaTo 及其同类方法——在启动时会替换同一属性上较早的补间:在 RenderOpacityTo(1) 之后启动的 RenderOpacityTo(0) 会停止淡入,而不是两者同时运行并让后结束者胜出。由序列运行的动词补间会交由序列处理,而通过 SetAutoKill(false) 保留的补间会被暂停而不是终止。对补间调用 SetReplacesEarlierTweens(false) 可让其与其他补间一同运行(UDreamTweener::SetExclusive)。 |
void SetWidth(float Value) | callable | 设置宽度 |
void SetWorldLocation(FVector Value) | callable | 设置世界位置 |
void SetWorldLocationAndRotation(FVector InLocation, FQuat InRotation) | callable | 设置世界位置和旋转 |
void SetWorldRotation(FQuat Value) | callable | 设置世界旋转 |
UDreamTweener* SizeDeltaTo(FVector2D endValue, float duration, float delay, EDreamTweenEase ease) | callable | 尺寸增量至 |
bool SupportsKeyboardFocus() | pure | UMG 的 SupportsKeyboardFocus:与 GetIsFocusable 答案相同,只是用的是 UMG 使用的名称。 |
bool TrySetParent(UDreamWidget* InParent, bool InKeepWorldPosition, int32 InSiblingIndex) | callable | 与 SetParent 操作相同,但会向调用方报告容量/循环拒绝。 |
UDreamTweener* VerticalAnchoredPositionTo(float endValue, float duration, float delay, EDreamTweenEase ease) | callable | 垂直锚定位置至 |
UDreamTweener* WidthTo(float endValue, float duration, float delay, EDreamTweenEase ease) | callable | 宽度至 |
UDreamTweener* WorldPositionTo(FVector endValue, float duration, float delay, EDreamTweenEase ease) | callable | 世界位置至 |
UDreamTweener* WorldPositionXTo(double endValue, float duration, float delay, EDreamTweenEase ease) | callable | 世界位置 X 至 |
UDreamTweener* WorldPositionYTo(double endValue, float duration, float delay, EDreamTweenEase ease) | callable | 世界位置 Y 至 |
UDreamTweener* WorldPositionZTo(double endValue, float duration, float delay, EDreamTweenEase ease) | callable | 世界位置 Z 至 |
UDreamTweener* WorldRotationQuaternionTo(FQuat endValue, float duration, float delay, EDreamTweenEase ease) | callable | 旋转绝对四元数旋转值 |
UDreamTweener* WorldRotatorTo(FRotator endValue, bool shortestPath, float duration, float delay, EDreamTweenEase ease) | callable | 旋转绝对旋转体值 |
事件
| 事件 | 签名 | 描述 |
|---|---|---|
OnVisibilityChanged | void DreamWidgetVisibilityChangedEvent__DelegateSignature(EDreamWidgetVisibility Visibility) | |
OnFocusReceived | void DreamWidgetFocusEvent__DelegateSignature(int32 UserIndex, int32 PointerId) | 公开的,与 UMG 的一样:蓝图能绑定的委托,C++ 也应该能绑定;一个从其某个部分转发焦点的控件会在自身上引发这些事件。 |
OnFocusLost | void DreamWidgetFocusEvent__DelegateSignature(int32 UserIndex, int32 PointerId) |
与 UMG 的对比
UMG 类中每一个面向蓝图的成员,以及它们的去向。adopt:名称相同,含义相同。map:此处以另一个名称或在另一个类型上。reject:有意缺失,并附带原因。
| UMG | 成员 | 状态 | 此处 | 说明 |
|---|---|---|---|---|
UWidget | Slot | map | PanelSlot | 所有面板共用一个 UDreamPanelSlot 类,而不是每个面板一个插槽类,因此无需进行类型转换。GetPanelSlot / CreateNewPanelSlot / HasPanelSlots 是相关动词。 |
UWidget | ToolTipText | adopt | ToolTipText | 由 UDreamUITooltipSubsystem 绘制,它解析提供文本或工具提示控件最近的祖先。 |
UWidget | ToolTipWidget | map | ToolTipWidgetClass | 是一个类,而不是实例:工具提示服务在气泡出现时实例化其内容,并在气泡消失时销毁它,因此对于一个只显示几秒钟的气泡,不会为每个宿主保持存活。 |
UWidget | RenderTransform | map | RenderTranslation | 拆分为 RenderTranslation / RenderRotation / RenderScale / RenderTransformPivot / RenderShear,并且是 3D 的,而非 UMG 的 FWidgetTransform,因为它所镜像的已创作变换是 FVector/FQuat/FVector。RenderShear 与其他三个分开存储,不属于 HasRenderTransform:那三个组合成一个 FTransform,而切变无法在该过程中保留,因此它改在矩阵路径上应用。 |
UWidget | RenderTransformPivot | adopt | RenderTransformPivot | 在控件自身矩形内归一化,(0,0) 位于左下角,与 AnchorData.Pivot 匹配,而不是 UMG 的左上角原点。 |
UWidget | FlowDirectionPreference | adopt | FlowDirectionPreference | EDreamFlowDirectionPreference 逐值镜像 EFlowDirectionPreference。GetResolvedFlowDirection 是解析后的答案;一个未声明任何内容的树从左到右读取,因为 DreamGUI 从不加入 Slate 的绘制阶段,因此无法有意义地读取 GSlateFlowDirection。 |
UWidget | bIsEnabled | adopt | bIsEnabled | 与现有的三值 Interactable 级联进行与运算,因此 GetInteractableInHierarchy——输入、导航以及每个控件的禁用外观都已读取的——是唯一答案。被禁用的祖先优先于后代固定为 Interactable=Enabled 的情况。GetIsEnabledInHierarchy 是级联查询。 |
UWidget | bOverrideAccessibleDefaults | reject | 此处没有 Slate 可访问控件层可供获取默认值:DreamGUI 控件是网格,而不是 SWidget,因此可访问性是控件自身的 AccessibleBehavior/AccessibleText 对,没有可供覆盖标志切换的对象。 | |
UWidget | bCanChildrenBeAccessible | reject | 原因相同:未构建可访问控件树,因此没有可抑制的子级可访问性。AccessibleBehavior=NotAccessible 是逐控件的答案。 | |
UWidget | AccessibleBehavior | adopt | AccessibleBehavior | EDreamAccessibleBehavior 镜像 ESlateAccessibleBehavior 的 Auto/NotAccessible/Summary/Custom。 |
UWidget | AccessibleSummaryBehavior | map | AccessibleBehavior | 此处一个行为覆盖两个文本,而非两个:AccessibleBehavior=Summary 播报 AccessibleSummaryText,Custom 播报 AccessibleText。 |
UWidget | AccessibleText | adopt | AccessibleText | |
UWidget | AccessibleSummaryText | adopt | AccessibleSummaryText | |
UWidget | bIsVolatile | reject | 易变性是 Slate 失效面板的概念——“不要缓存此控件的绘制元素”。DreamGUI 从其自己的脏标记重建绘制调用,没有可选择的缓存元素列表。 | |
UWidget | Cursor | adopt | Cursor | 由 DreamPointerPolicy::ResolveCursor 在悬停栈上逐帧解析,最内层优先;EMouseCursor::Default 表示“无意见”,这就是为什么没有单独的 bOverride_Cursor。 |
UWidget | Clipping | adopt | Clipping | EDreamWidgetClipping 镜像 EWidgetClipping;ClippingCornerRadius 和 ClippingMargin 是额外的。 |
UWidget | Visibility | adopt | Visibility | EDreamWidgetVisibility 与 ESlateVisibility 一一对应(Visible/Hidden/Collapsed/HitTestInvisible/SelfHitTestInvisible)。命中测试还额外受 Raycastable 限制,UMG 中没有对应项;也受 WidgetActive 限制,它是行为生命周期开关。 |
UWidget | PixelSnapping | adopt | PixelSnapping | 引擎自带的 EWidgetPixelSnapping 类型。 |
UWidget | RenderOpacity | adopt | RenderOpacity | 在此沿树向下继承;GetFinalRenderOpacity 是累积后的结果。 |
UWidget | Navigation | map | GetOrCreateNavigation | 各方向的规则位于 UDreamWidgetNavigation 行为上,正如 UMG 将它们挂在 UWidgetNavigation 对象上。GetNavigation 读取它,GetOrCreateNavigation 创建一个。 |
UWidget | SetRenderTransform | map | SetRenderTranslation | 用四个通道 setter 代替一个 FWidgetTransform:SetRenderTranslation、SetRenderRotation、SetRenderScale、SetRenderTransformPivot,外加 ClearRenderTransform 将它们全部还原。 |
UWidget | SetRenderScale | adopt | SetRenderScale | 接受 FVector 而非 FVector2D:此框架的控件是 3D 的,且存在世界空间画布。 |
UWidget | SetRenderShear | adopt | SetRenderShear | 沿用透视作用域已使用的矩阵路径,因为透视重映射正是一种切变,顶点变换必须为此增长出那个分支。未切变的树仍走 FTransform 分支,逐个字节一致。与 UMG 有两处不同,均已在属性上注明:布局永远不会看到它,且命中测试不会跟随——射线检测器仅在透视作用域内切换到矩阵,因此被切变的控件按其未倾斜的矩形被点击。 |
UWidget | SetRenderTransformAngle | adopt | SetRenderTransformAngle | 写入 RenderRotation 的 Roll 通道——此处深度沿本地 X 轴延伸,所以 roll 是保持控件平贴画布的旋转。Pitch 和 yaw 不受影响。 |
UWidget | GetRenderTransformAngle | adopt | GetRenderTransformAngle | |
UWidget | SetRenderTranslation | adopt | SetRenderTranslation | 接受 FVector。负 X 将控件拉向观察者。 |
UWidget | SetRenderTransformPivot | adopt | SetRenderTransformPivot | |
UWidget | GetIsEnabled | adopt | GetIsEnabled | 此控件自身的开关;GetIsEnabledInHierarchy 是级联后的结果。 |
UWidget | SetIsEnabled | adopt | SetIsEnabled | 虚函数,与 UMG 的一样。通过 GetInteractableInHierarchy 级联,输入、导航以及控件禁用外观已经读取的就是它。 |
UWidget | IsInViewport | adopt | IsInViewport | 向上走到最近被跟踪的页面,因为调用者通常是嵌套其中的某一层控件。 |
UWidget | SetToolTipText | adopt | SetToolTipText | |
UWidget | SetToolTip | map | SetToolTipWidgetClass | 按类而非按实例;参见 ToolTipWidget 行。 |
UWidget | SetCursor | adopt | SetCursor | |
UWidget | ResetCursor | adopt | ResetCursor | 回到 EMouseCursor::Default,在这里意味着“不表态”而非“强制箭头”。 |
UWidget | IsRendered | adopt | IsRendered | 可见且贡献颜色:淡化到零不透明度的子树是可见的,但不被渲染。 |
UWidget | IsVisible | adopt | IsVisible | 层级被折叠进来,不同于 UMG 的只询问控件本身。级联后的结果是已缓存的那个,也是调用者所说的“在屏幕上”。 |
UWidget | GetVisibility | adopt | GetVisibility | |
UWidget | SetVisibility | adopt | SetVisibility | |
UWidget | GetRenderOpacity | adopt | GetRenderOpacity | GetFinalRenderOpacity 是折叠了祖先后的相同值。 |
UWidget | SetRenderOpacity | adopt | SetRenderOpacity | |
UWidget | GetClipping | adopt | GetClipping | |
UWidget | SetClipping | adopt | SetClipping | |
UWidget | ForceVolatile | reject | 参见 bIsVolatile:没有缓存的 Slate 元素列表可供控件从中退出。 | |
UWidget | IsHovered | adopt | IsHovered | 对于指针下的控件及其进入所经过的每个祖先为真,这正是 Slate 的悬停传播为 UMG 免费提供的。向拥有者玩家的事件系统查询。 |
UWidget | HasKeyboardFocus | adopt | HasKeyboardFocus | 从 UDreamUserWidget 下移,以便任何控件都能回答它。使用拥有者玩家的索引而非玩家零。 |
UWidget | SupportsKeyboardFocus | adopt | SupportsKeyboardFocus | 与 GetIsFocusable 相同的答案,采用 UMG 的名称。 |
UWidget | HasMouseCapture | adopt | HasMouseCapture | 这里没有捕获对象;对调用者而言,捕获意味着某个指针仍在此控件上按住其按钮——无论它移动到什么之上,其拖拽和释放都来到此处。 |
UWidget | HasMouseCaptureByUser | adopt | HasMouseCaptureByUser | 指针索引 -1 表示该玩家的任意指针,与 UMG 中一样。 |
UWidget | SetKeyboardFocus | adopt | SetKeyboardFocus | 返回 bool 而非 UMG 的 void——此框架中既有的签名,予以保留。 |
UWidget | HasUserFocus | adopt | HasUserFocus | |
UWidget | HasAnyUserFocus | adopt | HasAnyUserFocus | 询问每个本地玩家的事件系统。 |
UWidget | HasFocusedDescendants | adopt | HasFocusedDescendants | 严格为后代,与 UMG 中一样。 |
UWidget | HasUserFocusedDescendants | adopt | HasUserFocusedDescendants | |
UWidget | SetFocus | adopt | SetFocus | 既有的,UserIndex 和 PointerId 有默认值,因此蓝图可像 UMG 中那样无参数调用它。当控件无法接受焦点时返回 false。 |
UWidget | SetUserFocus | adopt | SetUserFocus | 返回 bool 而非 void,与此框架中的 SetFocus 一致。 |
UWidget | ForceLayoutPrepass | adopt | ForceLayoutPrepass | 该控件自身对 UDreamUIBPLibrary::ForceLayoutPrepass 已完成工作的呈现。 |
UWidget | InvalidateLayoutAndVolatility | adopt | InvalidateLayoutAndVolatility | 仅为布局部分;易变性部分被拒绝,原因见 bIsVolatile。 |
UWidget | GetDesiredSize | adopt | GetDesiredSize | 由父面板回答,因为测量是容器与其子项之间的对话。没有测量父项的控件报告它已有的尺寸。 |
UWidget | SetAllNavigationRules | map | UDreamWidgetNavigation::SetAllNavigationRules | 通过 UDreamWidget::GetOrCreateNavigation 访问该组件。 |
UWidget | SetNavigationRuleBase | map | UDreamWidgetNavigation::SetRule | |
UWidget | SetNavigationRuleExplicit | map | UDreamWidgetNavigation::SetExplicitTarget | Null 将方向清除回 Escape。 |
UWidget | SetNavigationRuleCustom | map | UDreamWidgetNavigation::SetCustomDelegate | |
UWidget | SetNavigationRuleCustomBoundary | map | UDreamWidgetNavigation::SetNavigationRuleCustomBoundary | EDreamUINavigationRule::CustomBoundary,添加在枚举的末尾,因此没有序列化值被移动。扫描先运行,只有当它在那个方向什么也没找到时才询问委托——这就是这里“移动离开了区域”的含义。与 Custom 不同,后者对每次移动都被询问,因此也必须回答普通步骤。 |
UWidget | GetParent | adopt | GetParent | 返回一个 UDreamWidget:这里的任何控件都可以接收子项,因此没有单独的容器类需要返回。 |
UWidget | RemoveFromParent | adopt | RemoveFromParent | 让控件保持存活并被停放,如果它曾拥有屏幕页面名称则释放该名称。 |
UWidget | GetCachedGeometry | map | UDreamUIWidgetGeometryLibrary::GetWidgetGeometry | FDreamUIWidgetGeometry 代替 FGeometry。这里只有一份几何数据而不是三份,因为没有延迟绘制阶段会落后于 tick——参见 GetTickSpaceGeometry 和 GetPaintSpaceGeometry 两行。 |
UWidget | GetTickSpaceGeometry | map | UDreamUIWidgetGeometryLibrary::GetWidgetGeometry | 与 GetCachedGeometry 取值相同:DreamGUI 在同一个阶段完成排列与绘制,因此 tick 空间与绘制空间不可能不一致。 |
UWidget | GetPaintSpaceGeometry | map | UDreamUIWidgetGeometryLibrary::GetWidgetGeometry | 与 GetCachedGeometry 取值相同,原因也相同。 |
UWidget | K2_AddFieldValueChangedDelegate | map | UDreamUserWidget::K2_AddFieldValueChangedDelegate | 字段通知由 UDreamUserWidget 实现,蓝图作者子类化的正是它;裸的 UDreamWidget 没有可供通知的已编译字段列表。 |
UWidget | K2_RemoveFieldValueChangedDelegate | map | UDreamUserWidget::K2_RemoveFieldValueChangedDelegate | |
UWidget | K2_BroadcastFieldValueChanged | map | UDreamUserWidget::K2_BroadcastFieldValueChanged | BlueprintInternalUseOnly,正如 UMG 所标记的:作者使用的节点是由字段通知属性生成的节点,而不是这个按名称调用的函数。与添加和移除相同的两道防护——一个不指向此类上任何字段的 id 是创作错误,而不是向无人的广播。 |
UWidget | GetGameInstance | adopt | GetGameInstance | |
UWidget | GetOwningPlayer | adopt | GetOwningPlayer | 在 UDreamWidget 上是虚函数;UDreamUserWidget 重写它以优先检查显式设置的控制器。 |
UWidget | GetOwningLocalPlayer | adopt | GetOwningLocalPlayer | |
UWidget | GetAccessibleText | adopt | GetAccessibleText | |
UWidget | GetAccessibleSummaryText | adopt | GetAccessibleSummaryText |