类参考
UDreamLayoutContainerSizeBox
UMG Size Box
本页由 DreamGUIReferenceDocs commandlet 从反射生成,正文是头文件注释的原文(英文),所以不翻译——这样它永远和代码一致。概念讲解见核心概念。
Inherits from UDreamPanelLayoutBase.
Declared in Public/Core/Components/DreamPanelLayouts.h.
UMG Size Box
Properties
| Name | Type | Category | In the details panel | From Blueprint | Description |
|---|---|---|---|---|---|
Padding | FMargin | SizeBox | yes | SetPadding | |
bOverrideWidth | bool | SizeBox | yes | SetOverrideWidth | |
WidthOverride | float | SizeBox | yes | SetWidthOverride | |
bOverrideHeight | bool | SizeBox | yes | SetOverrideHeight | |
HeightOverride | float | SizeBox | yes | SetHeightOverride | |
MinDesiredSize | FVector2D | SizeBox | yes | SetMinDesiredSize | |
MaxDesiredSize | FVector2D | SizeBox | yes | SetMaxDesiredSize | |
MinAspectRatio | float | SizeBox | yes | SetMinAspectRatio | Width-over-height bounds on the CONTENT's rect, as SBox applies them: the box itself is sized by the rules above, and a content rect whose ratio falls outside these is shrunk on one axis until it does not, then re-aligned inside the space it was offered. |
MaxAspectRatio | float | SizeBox | yes | SetMaxAspectRatio |
Functions
| Function | Kind | Description |
|---|---|---|
void ClearHeightOverride() | callable | Clear Height Override |
void ClearMaxAspectRatio() | callable | Clear Max Aspect Ratio |
void ClearMaxDesiredHeight() | callable | Clear Max Desired Height |
void ClearMaxDesiredWidth() | callable | Clear Max Desired Width |
void ClearMinAspectRatio() | callable | Clear Min Aspect Ratio |
void ClearMinDesiredHeight() | callable | Clear Min Desired Height |
void ClearMinDesiredWidth() | callable | Clear Min Desired Width |
void ClearWidthOverride() | callable | USizeBox's per-axis accessors. The two bounds are stored as one FVector2D apiece here, which is the same four numbers with half the fields; these name the axis the way UMG does, and Clear is "put that axis back to zero", which is how this class already spells "no opinion". |
float GetMaxDesiredHeight() | pure | Get Max Desired Height |
float GetMaxDesiredWidth() | pure | Get Max Desired Width |
float GetMinDesiredHeight() | pure | Get Min Desired Height |
float GetMinDesiredWidth() | pure | Get Min Desired Width |
bool IsMaxAspectRatioOverride() | pure | Is Max Aspect Ratio Override |
bool IsMinAspectRatioOverride() | pure | Is Min Aspect Ratio Override |
void SetHeightOverride(float Value) | callable | Set Height Override |
void SetMaxAspectRatio(float Value) | callable | Set Max Aspect Ratio |
void SetMaxDesiredHeight(float InMaxDesiredHeight) | callable | Set Max Desired Height |
void SetMaxDesiredSize(FVector2D Value) | callable | Set Max Desired Size |
void SetMaxDesiredWidth(float InMaxDesiredWidth) | callable | Set Max Desired Width |
void SetMinAspectRatio(float Value) | callable | Set Min Aspect Ratio |
void SetMinDesiredHeight(float InMinDesiredHeight) | callable | Set Min Desired Height |
void SetMinDesiredSize(FVector2D Value) | callable | Set Min Desired Size |
void SetMinDesiredWidth(float InMinDesiredWidth) | callable | Set Min Desired Width |
void SetOverrideHeight(bool Value) | callable | Set Override Height |
void SetOverrideWidth(bool Value) | callable | Set Override Width |
void SetPadding(FMargin Value) | callable | Set Padding |
void SetWidthOverride(float Value) | callable | Set Width Override |
Compared with UMG
Every Blueprint-facing member of the UMG class, and where it went. adopt: same name, same meaning. map: here under another name or on another type. reject: deliberately absent, with the reason.
| UMG | Member | Status | Here | Note |
|---|---|---|---|---|
USizeBox | WidthOverride | adopt | WidthOverride | Its override bit is bOverrideWidth here; UMG spells it bOverride_WidthOverride. |
USizeBox | HeightOverride | adopt | HeightOverride | |
USizeBox | MinDesiredWidth | map | MinDesiredSize | One FVector2D holds both axes; zero on an axis is that axis's 'no opinion', where UMG spends a separate bOverride_ bit. GetMinDesiredWidth/SetMinDesiredWidth/ClearMinDesiredWidth exist under UMG's names. |
USizeBox | MinDesiredHeight | map | MinDesiredSize | The y of the same pair. |
USizeBox | MaxDesiredWidth | map | MaxDesiredSize | As MinDesiredWidth. |
USizeBox | MaxDesiredHeight | map | MaxDesiredSize | The y of the same pair. |
USizeBox | MinAspectRatio | adopt | MinAspectRatio | Zero means not set, the convention the two size bounds on this class already use. Applied to the CONTENT's rect in arrange, as SBox does, not to the box's own measured size. |
USizeBox | MaxAspectRatio | adopt | MaxAspectRatio | Tested before the minimum, so a pair that crosses resolves to the maximum. |
USizeBox | SetWidthOverride | adopt | SetWidthOverride | |
USizeBox | ClearWidthOverride | adopt | ClearWidthOverride | |
USizeBox | SetHeightOverride | adopt | SetHeightOverride | |
USizeBox | ClearHeightOverride | adopt | ClearHeightOverride | |
USizeBox | SetMinDesiredWidth | adopt | SetMinDesiredWidth | |
USizeBox | ClearMinDesiredWidth | adopt | ClearMinDesiredWidth | |
USizeBox | SetMinDesiredHeight | adopt | SetMinDesiredHeight | |
USizeBox | ClearMinDesiredHeight | adopt | ClearMinDesiredHeight | |
USizeBox | SetMaxDesiredWidth | adopt | SetMaxDesiredWidth | |
USizeBox | ClearMaxDesiredWidth | adopt | ClearMaxDesiredWidth | |
USizeBox | SetMaxDesiredHeight | adopt | SetMaxDesiredHeight | |
USizeBox | ClearMaxDesiredHeight | adopt | ClearMaxDesiredHeight | |
USizeBox | SetMinAspectRatio | adopt | SetMinAspectRatio | |
USizeBox | ClearMinAspectRatio | adopt | ClearMinAspectRatio | |
USizeBox | SetMaxAspectRatio | adopt | SetMaxAspectRatio | |
USizeBox | ClearMaxAspectRatio | adopt | ClearMaxAspectRatio |