DreamGUI
Reference

UDreamBorder

A border whose hierarchy is code, not an asset: a face, a padding, and a hole to put things in.

Inherits from UDreamUIControl.

Declared in Public/Controls/DreamBorder.h.

A border whose hierarchy is code, not an asset: a face, a padding, and a hole to put things in.

UMG's Border is a single-child panel that draws a brush behind whatever it holds, and this library already offers that SHAPE as a palette panel -- an overlay carrying an image visual. This is the CONTROL spelling, and the difference is the one that runs through this whole family: a panel's brush, colour and padding are authored per instance, and a control's come from the project style sheet, so restyling a project's boxes is one edit rather than one per box.

SEVERAL CHILDREN, deliberately, where UMG's border takes one. The face carries an overlay, so a Native.Border { A B } stacks A under B with both filling the padded area -- which is what an overlay means and what a reader of those two lines expects. UDreamScrollBox's content slot makes the same call for the same reason; a hole that took exactly one child would send every second child somewhere invisible.

The outline is part of the face rather than a second widget: UDreamRectBlock draws a border of its own, so BorderThickness and BorderColor are pushed into the rect and cost no node. Zero thickness is UMG's plain border, which is what the style ships.

Properties

NameTypeCategoryIn the details panelFrom BlueprintDescription
StyleFDreamBorderStyleBorderyesGetStyle / SetStyleThis instance's own look. The project sheet wins while StyleSource says so AND a sheet actually exists; with no sheet in the project this IS the look in effect.
HorizontalAlignmentEDreamPanelHorizontalAlignmentBorderyesGetHorizontalAlignment / SetHorizontalAlignmentWhere the content sits inside the padded area -- UMG's HorizontalAlignment / VerticalAlignment.
VerticalAlignmentEDreamPanelVerticalAlignmentBorderyesGetVerticalAlignment / SetVerticalAlignment
BrushColorFColorBorderyesGetBrushColor / SetBrushColorA tint over the style's background colour -- UMG's BrushColor, which is a tint over SBorder's brush for the same reason: the style says what a border looks like, and this says what is happening to this one right now. White is no opinion.
ContentColorAndOpacityFLinearColorBorderyesGetContentColorAndOpacity / SetContentColorAndOpacityA tint over the CONTENT -- UMG's ContentColorAndOpacity, colour and alpha both, and never over the border's own face.
bReportMouseEventsboolBorderyesGetReportMouseEvents / SetReportMouseEventsWhether this border reports the pointer -- UMG's four mouse events, off by default.
bConsumeMouseEventsboolBorderyesGetConsumeMouseEvents / SetConsumeMouseEventsWhether a reported pointer event stops here -- this framework's spelling of UMG's Handled.
FaceNodeTObjectPtr<UDreamWidget>Border-read onlyThe face: what draws the brush, the tint and the outline, and what clips to the rounding.
ContentNodeTObjectPtr<UDreamWidget>Border-read onlyThe hole. Whatever a host nests on this control ends up here.
EventTriggerTObjectPtr<UUIEventTrigger>Border-read onlyThe listener, while there is one. Transient: a component is remade with the tree, not loaded.

Functions

FunctionKindDescription
FDreamUIFaceBrush GetBrush()pureThe face's skin, read from the style in effect.
FColor GetBrushColor()pureGet Brush Color
bool GetConsumeMouseEvents()pureGet Consume Mouse Events
FLinearColor GetContentColorAndOpacity()pureGet Content Color and Opacity
UDreamWidget* GetContentNode()pureWhere things go. Parent into this, or nest in .dui, and the padding holds them off the edge.
UUIEventTrigger* GetEventTrigger()pureThe listener on the face, or null while bReportMouseEvents is off.
EDreamPanelHorizontalAlignment GetHorizontalAlignment()pureGet Horizontal Alignment
FMargin GetPadding()pureWhat holds the content off the edge, read from the style in EFFECT rather than from the field beside it -- so a border driven by the project sheet answers the number it is actually drawn with rather than the one this instance happens to be carrying.
bool GetReportMouseEvents()pureGet Report Mouse Events
FDreamBorderStyle GetStyle()pureGet Style
EDreamPanelVerticalAlignment GetVerticalAlignment()pureGet Vertical Alignment
void SetBrush(FDreamUIFaceBrush InBrush)callableSet Brush
void SetBrushColor(FColor InBrushColor)callableSet Brush Color
void SetBrushFromSprite(UDreamUISpriteData_BaseObject* InSprite)callableThe other thing a face brush takes: an atlas sprite. UMG has no call for it because Slate has no atlas; here it is the cheaper of the two, so leaving it unreachable would make the expensive road the only one a caller could find.
void SetBrushFromTexture(UTexture2D* InTexture)callableThe common case of the above, and the one UMG spells: put this texture on the face and leave every other thing about the brush where it was.
void SetConsumeMouseEvents(bool bInConsumeMouseEvents)callableSet Consume Mouse Events
void SetContentColorAndOpacity(FLinearColor InContentColorAndOpacity)callableSee the property: colour and alpha both tint everything inside, and nothing of the face.
void SetHorizontalAlignment(EDreamPanelHorizontalAlignment InHorizontalAlignment)callableSet Horizontal Alignment
void SetPadding(FMargin InPadding)callableEvery appearance setter below edits THIS INSTANCE'S style and re-pushes, because the padding, the brush and the rest are one quantity and the style is where it lives -- a second copy on the control is how a control and its style learn to disagree.
void SetReportMouseEvents(bool bInReportMouseEvents)callableMakes or unmakes the listener on the face. Off destroys it, so an off border costs nothing.
void SetStyle(FDreamBorderStyle InStyle)callableThis instance's whole look, replaced and pushed. See UDreamButton::SetStyle for the caveat.
void SetVerticalAlignment(EDreamPanelVerticalAlignment InVerticalAlignment)callableSet Vertical Alignment

Events

EventSignatureDescription
OnMouseButtonDownEventvoid DreamBorderPointerEvent__DelegateSignature(UDreamPointerEventData* PointerEvent)The four moments UMG's border speaks, re-broadcast from the pointer system.
OnMouseButtonUpEventvoid DreamBorderPointerEvent__DelegateSignature(UDreamPointerEventData* PointerEvent)
OnMouseMoveEventvoid DreamBorderPointerEvent__DelegateSignature(UDreamPointerEventData* PointerEvent)Pointer MOTION over the border, which this system reports as the drag it is part of.
OnMouseDoubleClickEventvoid DreamBorderPointerEvent__DelegateSignature(UDreamPointerEventData* PointerEvent)The second press of a double click, and the fourth, and the sixth -- said at that PRESS, and in place of OnMouseButtonDownEvent for it, which is how UBorder reports one: Slate routes the second press to OnMouseButtonDoubleClick and never to OnMouseButtonDown, so a double click here is one button down, one double click and two button ups.

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
UBorderHorizontalAlignmentadoptHorizontalAlignmentEDreamPanelHorizontalAlignment. On the control rather than in the style: where a thing sits is that thing's business, and two borders sharing a sheet hold different things.
UBorderVerticalAlignmentadoptVerticalAlignment
UBorderbShowEffectWhenDisabledmapUDreamLayoutContainerBorder::bShowEffectWhenDisabledOn the PANEL spelling of a border, on by default as UMG's is: while the border's widget is disabled (its own switch or an ancestor's, UDreamWidget::GetIsEnabledInHierarchy) the background -- the owning widget's visual -- draws at 45% of its alpha, which is what SBorder's disabled draw effect comes to in the default Slate shader. Only the background: what the border holds shows its own disabled look.
UBorderContentColorAndOpacityadoptContentColorAndOpacityColour and alpha both, as the content hole's content tint (UDreamWidget::SetContentTint): every visual below the hole is multiplied by it in linear space on its way to the screen, as SCompoundWidget blends its ColorAndOpacity into what its children paint with, and the border's own face is never tinted. Nothing inside is written to, and the content's RenderOpacity is left free for whatever fades it. UDreamLayoutContainerBorder::ContentColorAndOpacity is the same on the panel spelling.
UBorderPaddingmapFDreamBorderStyle::PaddingIn the style, because it is one quantity and a second copy on the control is how the two learn to disagree. GetPadding answers the RESOLVED number; SetPadding edits this instance's style.
UBorderBackgroundmapFDreamBorderStyle::BackgroundBrushFDreamUIFaceBrush rather than FSlateBrush -- a control face is a procedural rect, and the brush is its body texture. See the struct's own note.
UBorderBrushColoradoptBrushColorFColor, and a TINT over the style's background colour -- which is what it is in Slate too.
UBorderDesiredSizeScalemapUDreamLayoutContainerBorder::DesiredSizeScaleOn the PANEL spelling of a border, where it already scales what the panel reports (MeasureLayout multiplies the result and arranges the content in the rect it actually got -- UBorder's rule exactly). The control lays its face and its content out with an overlay of its own rather than through that panel; a project that needs the report scaled uses the panel, or wraps the control in one.
UBorderbFlipForRightToLeftFlowDirectionmapUDreamLayoutContainerBorder::bFlipForRightToLeftFlowDirectionOn the PANEL spelling of a border, off by default as UMG's is: while it is on and the border lays out right to left, the background -- the owning widget's visual -- is mirrored about its own centre by a run-time UDreamMeshModifierMirror, as SBorder draws its brush through a (-1, 1) render transform. The content is not mirrored by it: where the content sits is the panel's to mirror, and every panel that arranges through CommitChildRect already reflects its children across its width under a right-to-left flow (UDreamWidget::FlowDirectionPreference).
UBorderOnMouseButtonDownEventadoptOnMouseButtonDownEventA multicast carrying UDreamPointerEventData, not UMG's FEventReply-returning single binding: nothing in this event system asks a handler per call whether the event carries on. That answer is one property for all four -- bConsumeMouseEvents, which is UUIEventTrigger::AllowEventBubbleUp inverted. Gated on bReportMouseEvents, off by default, because a listening border is a consuming border.
UBorderOnMouseButtonUpEventadoptOnMouseButtonUpEvent
UBorderOnMouseMoveEventadoptOnMouseMoveEventFed by the DRAG seam: this event system reports a moving pointer to the element it pressed on, which is the only motion a border can honestly claim. A hover that never pressed is OnPointerEnter/Exit, which UMG spells elsewhere.
UBorderOnMouseDoubleClickEventadoptOnMouseDoubleClickEventSaid at the SECOND PRESS and in place of OnMouseButtonDownEvent for it, as UBorder's is: the event system routes the second press of a double click to the double click and not to the down, which is Slate's FSlateApplication::ProcessMouseButtonDoubleClickEvent. So a double click is one down, one double click and two ups. What counts as a double is the event system's own rule (its DoubleClickTime, the same widget and button, and a second press within the pointer's drag threshold of the first -- the desktop's double-click rectangle and drag threshold are the same few pixels), not a second rule here that could disagree with it.
UBorderSetContentColorAndOpacitymapSetContentColorAndOpacityColour and alpha both, straight onto the content hole's content tint, as the property above.
UBorderSetPaddingadoptSetPadding
UBorderSetHorizontalAlignmentadoptSetHorizontalAlignmentPushed straight onto the content slot.
UBorderSetVerticalAlignmentadoptSetVerticalAlignment
UBorderSetBrushColoradoptSetBrushColor
UBorderSetBrushadoptSetBrushTakes FDreamUIFaceBrush; see Background above for why that is not FSlateBrush.
UBorderSetBrushFromAssetrejectUSlateBrushAsset wraps an FSlateBrush, which a procedural rect face cannot draw. The two things this framework's face brush takes -- a texture and an atlas sprite -- are what SetBrush and SetBrushFromTexture take.
UBorderSetBrushFromTextureadoptSetBrushFromTextureReplaces the image and leaves the nine-slice, the scale mode and the tint where they were.
UBorderSetBrushFromMaterialrejectA procedural rect has no material of its own to set. Its material is GetMaterialToCreateGeometry -- the shared one the canvas batches every rect with -- and there is no per-instance override anywhere on UDreamVisual (the CustomUIMaterial the comments mention is a leftover name from the upstream library; nothing in this plugin declares it). The two visuals that do carry a material, UDreamText and UDreamImage, are what a material-drawn face is: put one inside the border. SetBrushFromSprite is here instead, which is the thing this face CAN take and Slate cannot.
UBorderSetShowEffectWhenDisabledmapUDreamLayoutContainerBorder::SetShowEffectWhenDisabledSee bShowEffectWhenDisabled: the background's alpha follows at once.
UBorderGetDynamicMaterialrejectA rect has no material instance of its own: it draws through its draw call's material, whose parameters the canvas answers through a render-thread proxy shared with every other widget batched into the same call. There is nothing to hand out that setting a parameter on would recolour this border alone.
UBorderSetDesiredSizeScalemapUDreamLayoutContainerBorder::SetDesiredSizeScaleSee DesiredSizeScale above.
UBorderSetStyleadoptSetStyleUBorder has no style struct at all; this is the family's spelling of replacing a look at runtime.

On this page