DreamGUI
Reference

UDreamLayoutContainerScaleBox

UMG Scale Box

Inherits from UDreamPanelLayoutBase.

Declared in Public/Core/Components/DreamPanelLayouts.h.

UMG Scale Box

Properties

NameTypeCategoryIn the details panelFrom BlueprintDescription
PaddingFMarginScaleBoxyesSetPadding
StretchEDreamScaleBoxStretchScaleBoxyesSetStretchHow the content is scaled. ScaleToFitX, ScaleToFitY, ScaleToFill and UserSpecifiedWithClipping clip it to the box while the widget's own Clipping is left at Inherit, as SScaleBox's paint does.
UserSpecifiedScalefloatScaleBoxyesSetUserSpecifiedScale
bIgnoreInheritedScaleboolScaleBoxyesSetIgnoreInheritedScaleDivide whatever scale the stretch mode arrived at by the scale this box inherits from above, so the content is drawn at that scale on screen. Every mode, as SScaleBox divides them all -- and measured exactly as it is arranged, so the box asks its parent for the room its content will actually take.
StretchDirectionEDreamScaleBoxStretchDirectionScaleBoxyesSetStretchDirectionWhich way the box is allowed to scale, matching Slate's EStretchDirection. DownOnly is the one that gets used: art authored at its intended size should shrink to fit a small screen and never be blown up past it, which is a rule the Stretch modes cannot state on their own.

Functions

FunctionKindDescription
float GetSafeZoneScale()pureThe scale ScaleBySafeZone draws at right now: 1 under any other stretch, and wherever there is no game viewport to ask.
void SetIgnoreInheritedScale(bool Value)callableSet Ignore Inherited Scale
void SetPadding(FMargin Value)callableSet Padding
void SetStretch(EDreamScaleBoxStretch Value)callableSet Stretch
void SetStretchDirection(EDreamScaleBoxStretchDirection Value)callableSet Stretch Direction
void SetUserSpecifiedScale(float Value)callableSet User Specified Scale

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.

UMGMemberStatusHereNote
UScaleBoxStretchadoptStretchEDreamScaleBoxStretch, with all nine of Slate's EStretch cases; ScaleBySafeZone and UserSpecifiedWithClipping came last and were appended, so every value saved before them keeps its meaning. ScaleBySafeZone draws at one scale taken from the game viewport's safe margin (GetSafeZoneScale, refreshed when the stretch or the platform's safe frame changes; 1 with no game viewport). ScaleToFitX, ScaleToFitY, ScaleToFill and UserSpecifiedWithClipping clip to the box while the widget's own Clipping is Inherit, as SScaleBox's paint does.
UScaleBoxStretchDirectionadoptStretchDirectionEDreamScaleBoxStretchDirection. Bounds the scale the mode arrived at, and only that: the stated scales (UserSpecified, UserSpecifiedWithClipping, ScaleBySafeZone) and Fill state a scale rather than derive one, so they are left alone as in Slate.
UScaleBoxUserSpecifiedScaleadoptUserSpecifiedScale
UScaleBoxIgnoreInheritedScalemapbIgnoreInheritedScaleSame name with this plugin's boolean prefix. Every mode's scale is divided by the inherited one, as SScaleBox divides them all, and measured as it is arranged, so the box asks its parent for the room its content takes.
UScaleBoxSetStretchadoptSetStretch
UScaleBoxSetStretchDirectionadoptSetStretchDirection
UScaleBoxSetUserSpecifiedScaleadoptSetUserSpecifiedScale
UScaleBoxSetIgnoreInheritedScaleadoptSetIgnoreInheritedScale

On this page