DreamGUI
Reference

UDreamUIWidgetLibrary

Finding widgets, driving a drag, and building an image brush from Blueprint -- the parts of

Inherits from UBlueprintFunctionLibrary.

Declared in Public/DreamUIWidgetLibrary.h.

Finding widgets, driving a drag, and building an image brush from Blueprint -- the parts of UMG's UWidgetBlueprintLibrary that mean something in this framework.

The parts that do not are named in the parity table with their reasons, and they are all one reason: UMG's library is half Slate plumbing. FEventReply, the OnPaint drawing context and the Slate input-event structs describe an SWidget's conversation with Slate, and a DreamGUI widget never has that conversation -- its input arrives as a UDreamPointerEventData from the event system and its pixels come from its own mesh.

Functions

FunctionKindDescription
bool BeginDragWithOperation(UDreamPointerEventData* InPointerEvent, UDreamDragDropOperation* InOperation)callableStart a drag on a widget right now, from a pointer that is already pressed on it -- UMG's DetectDragIfPressed, minus the "if pressed" test, which the caller has already passed by having a pressed pointer's event data in hand.
bool CancelDragDrop(UObject* WorldContextObject)callableEnd every drag in flight without a drop -- what Escape does. True when there was one to cancel.
UDreamDragDropOperation* CreateDragDropOperation(TSubclassOf<UDreamDragDropOperation> InOperationClass)callableMake a drag operation to hand to a drag that is starting -- UMG's CreateDragDropOperation.
int32 DismissAllMenus(UObject* WorldContextObject)callableClose every menu anchor that is open, anywhere in this world -- UMG's DismissAllMenus.
bool EqualEqual_DreamUIImageBrush(FDreamUIImageBrush A, FDreamUIImageBrush B)pureAre two brushes the same brush? UMG's EqualEqual_SlateBrush, for this framework's brush type.
void GetAllWidgetsOfClass(UObject* WorldContextObject, TSubclassOf<UDreamWidget> InWidgetClass, TArray<UDreamWidget*>& OutFoundWidgets, bool bTopLevelOnly)callableEvery live widget of a class, anywhere in the world.
void GetAllWidgetsWithInterface(UObject* WorldContextObject, TSubclassOf<UInterface> InInterface, TArray<UDreamWidget*>& OutFoundWidgets, bool bTopLevelOnly)callableEvery live widget whose class implements an interface. Behaviours are not searched, only widgets.
UObject* GetBrushResource(FDreamUIImageBrush InBrush)pureGet Brush Resource
UMaterialInterface* GetBrushResourceAsMaterial(FDreamUIImageBrush InBrush)pureGet Brush Resource as Material
UTexture2D* GetBrushResourceAsTexture2D(FDreamUIImageBrush InBrush)pureGet Brush Resource as Texture 2D
UDreamDragDropOperation* GetDragDroppingContent(UObject* WorldContextObject, int32 InPointerID)pureThe operation a pointer is carrying, or null. Pointer 0 is the mouse.
UMaterialInstanceDynamic* GetDynamicMaterial(FDreamUIImageBrush& InBrush)callableThe brush's material as something whose parameters can be set -- UMG's GetDynamicMaterial.
bool GetSafeZonePadding(UObject* WorldContextObject, FVector4& OutSafePadding, FVector2D& OutSafePaddingScale)pureThe platform's title-safe inset, in pixels, and the same inset as a fraction of the viewport.
bool IsDragDropping(UObject* WorldContextObject)pureIs any pointer carrying a drag operation right now?
FDreamUIImageBrush MakeBrushFromAsset(UObject* InResource, int32 InWidth, int32 InHeight)pureAn image brush showing whatever the asset is -- a texture, a material, a sprite or an atlas.
FDreamUIImageBrush MakeBrushFromMaterial(UMaterialInterface* InMaterial, int32 InWidth, int32 InHeight)pureAn image brush showing a material.
FDreamUIImageBrush MakeBrushFromTexture(UTexture2D* InTexture, int32 InWidth, int32 InHeight)pureAn image brush showing a texture. UMG's MakeBrushFromTexture; zero size means the texture's own.
FDreamUIImageBrush NoResourceBrush()pureA brush that draws nothing. UMG's NoResourceBrush.
void SetBrushResourceToMaterial(FDreamUIImageBrush& InBrush, UMaterialInterface* InMaterial)callableSet Brush Resource to Material
void SetBrushResourceToTexture(FDreamUIImageBrush& InBrush, UTexture2D* InTexture)callableSet Brush Resource to Texture
void SetFocusToGameViewport()callableHand keyboard focus back to the game viewport -- UMG's SetFocusToGameViewport.
bool SetMousePosition(APlayerController* InPlayer, FVector2D InPosition)callablePut the cursor somewhere -- UMG's SetMousePosition, minus the FEventReply it was built into.

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
UWidgetBlueprintLibraryCreatemapUDreamUIBPLibrary::CreateDreamWidgetOfClassPre-existing. AddWidgetOfClassToViewport is the create-and-show pair.
UWidgetBlueprintLibraryCreateDragDropOperationadoptCreateDragDropOperationOutered to the transient package, as UMG does: an operation outlives the widget that made it, and a recycled list row mid-drag is the ordinary case.
UWidgetBlueprintLibrarySetInputMode_UIOnlyExmapUDreamUIInputModeLibrary::SetInputModeUIOnlyAddressed by DreamGUI user index rather than by a raw controller, so split screen does not have to rediscover which player a menu belongs to. Needs UDreamGameViewportClient as the game viewport client: the engine's UI-only mode ignores input at the client, which DreamGUI's input comes through, and that client lets it through while this mode holds.
UWidgetBlueprintLibrarySetInputMode_GameAndUIExmapUDreamUIInputModeLibrary::SetInputModeGameAndUI
UWidgetBlueprintLibrarySetInputMode_GameOnlymapUDreamUIInputModeLibrary::SetInputModeGameOnly
UWidgetBlueprintLibrarySetFocusToGameViewportadoptSetFocusToGameViewportA Slate focus change, not a DreamGUI one. UDreamWidget::ClearKeyboardFocus is the framework-level counterpart and the two are usually wanted together.
UWidgetBlueprintLibraryDrawBoxrejectUMG's Draw* family writes into an FPaintContext handed to a Blueprint OnPaint override. There is no immediate-mode paint pass here: a DreamGUI widget draws by owning a mesh, so anything drawn is a widget with a visual on it rather than a call inside a paint.
UWidgetBlueprintLibraryDrawSplinerejectSee DrawBox.
UWidgetBlueprintLibraryDrawLinerejectSee DrawBox.
UWidgetBlueprintLibraryDrawLinesrejectSee DrawBox.
UWidgetBlueprintLibraryDrawTextFormattedrejectSee DrawBox.
UWidgetBlueprintLibraryHandledrejectFEventReply is Slate's reply object, built by a handler and returned to Slate. A DreamGUI handler answers a bool meaning 'let this keep bubbling' (the IDreamPointer* interfaces), so there is no reply object to construct.
UWidgetBlueprintLibraryUnhandledrejectSee Handled.
UWidgetBlueprintLibraryCaptureMouserejectThere is no capture to take: a pressed pointer's PressWidget already receives every drag and the release wherever the pointer travels. UDreamWidget::HasMouseCapture reports that state.
UWidgetBlueprintLibraryReleaseMouseCapturerejectSee CaptureMouse.
UWidgetBlueprintLibraryLockMousemapUDreamUIInputModeLibrary::SetMouseLockModeSeparate from the input mode on purpose there: re-setting the whole input mode to change only the lock is how a project takes focus away from its own menu.
UWidgetBlueprintLibraryUnlockMousemapUDreamUIInputModeLibrary::SetMouseLockModeEMouseLockMode::DoNotLock.
UWidgetBlueprintLibrarySetUserFocusmapUDreamWidget::SetUserFocusA verb on the widget rather than a reply built inside a handler.
UWidgetBlueprintLibraryClearUserFocusmapUDreamWidget::ClearKeyboardFocus
UWidgetBlueprintLibrarySetMousePositionmapSetMousePositionA verb rather than UMG's FEventReply builder. Viewport pixels, the same space GetMousePositionOnViewport reports and a geometry's absolute coordinates are in, so 'warp the cursor onto this widget' is one conversion and not two.
UWidgetBlueprintLibraryDetectDragrejectUMG makes a handler arm drag detection for a key. Here the pointer pipeline detects drags itself against a distance and hold threshold (UDreamEventSystem's drag settings), so there is nothing for a handler to arm -- what a source supplies is the drag's MEANING, which is CreateDragDropOperation plus BeginDragWithOperation.
UWidgetBlueprintLibraryDetectDragIfPressedrejectSee DetectDrag.
UWidgetBlueprintLibraryEndDragDroprejectThe pipeline ends a drag when the pointer is released; a handler has no reply to end it through. CancelDragDrop is the verb for ending one early.
UWidgetBlueprintLibraryIsDragDroppingadoptIsDragDropping
UWidgetBlueprintLibraryGetDragDroppingContentadoptGetDragDroppingContentPer pointer, because several fingers can drag at once on a touch screen; pointer 0 is the mouse.
UWidgetBlueprintLibraryCancelDragDropadoptCancelDragDrop
UWidgetBlueprintLibraryMakeBrushFromAssetadoptMakeBrushFromAssetTakes any resource the brush can draw, which here includes sprites and atlases as well as textures and materials.
UWidgetBlueprintLibraryMakeBrushFromTextureadoptMakeBrushFromTextureZero width or height keeps the brush's own size rather than collapsing it.
UWidgetBlueprintLibraryMakeBrushFromMaterialadoptMakeBrushFromMaterial
UWidgetBlueprintLibraryGetBrushResourceadoptGetBrushResource
UWidgetBlueprintLibraryGetBrushResourceAsTexture2DadoptGetBrushResourceAsTexture2D
UWidgetBlueprintLibraryGetBrushResourceAsMaterialadoptGetBrushResourceAsMaterial
UWidgetBlueprintLibrarySetBrushResourceToTextureadoptSetBrushResourceToTexture
UWidgetBlueprintLibrarySetBrushResourceToMaterialadoptSetBrushResourceToMaterial
UWidgetBlueprintLibraryNoResourceBrushadoptNoResourceBrush
UWidgetBlueprintLibraryGetDynamicMaterialadoptGetDynamicMaterialSame verb on this framework's brush: a FDreamUIImageBrush holding a material is rewritten to hold a dynamic instance of it, which is returned; one already holding an instance returns it; a texture or sprite brush returns null. The brush is a value, so the caller hands it back to the image (UDreamImage::SetBrush). Not the same as a rect block's material, which belongs to the draw call and is deliberately not handed out (see Border.json).
UWidgetBlueprintLibraryDismissAllMenusadoptDismissAllMenusWalks the world's menu anchors and closes the open ones, skipping class defaults and archetypes. Walks rather than keeping a registry of open anchors: an anchor closed by any other route would have to remember to leave such a registry, and the one that forgot would leak a phantom. Returns how many it closed, so a caller can tell 'nothing was open' from 'did nothing'.
UWidgetBlueprintLibraryGetAllWidgetsOfClassadoptGetAllWidgetsOfClassReads UDreamUIManagerWorldSubsystem's registered-widget array, which is the only honest source: widgets are UObjects outered to a widget tree, so an actor iterator cannot see them and an object iterator would also sweep up archetypes, designer previews and other worlds.
UWidgetBlueprintLibraryGetAllWidgetsWithInterfaceadoptGetAllWidgetsWithInterfaceWidget classes only; a behaviour implementing the interface is found through the widget's GetComponentByInterface.
UWidgetBlueprintLibraryGetInputEventFromKeyEventrejectFKeyEvent and friends are Slate's input structs, delivered to SWidget handlers. Input arrives here as a UDreamPointerEventData or UDreamKeyEventData from the event system, so there is no Slate event to unwrap.
UWidgetBlueprintLibraryGetKeyEventFromAnalogInputEventrejectSee GetInputEventFromKeyEvent.
UWidgetBlueprintLibraryGetInputEventFromCharacterEventrejectSee GetInputEventFromKeyEvent.
UWidgetBlueprintLibraryGetInputEventFromPointerEventrejectSee GetInputEventFromKeyEvent.
UWidgetBlueprintLibraryGetInputEventFromNavigationEventrejectSee GetInputEventFromKeyEvent.
UWidgetBlueprintLibraryGetSafeZonePaddingadoptGetSafeZonePaddingReturns false when Slate is not running, so 'no inset needed' and 'could not ask' are not both a zero. UMG's SpillOverPadding is not returned: nothing here draws outside the viewport rect to spill over it.
UWidgetBlueprintLibrarySetColorVisionDeficiencyTyperejectAn engine-wide renderer simulation switch that happens to sit in UMG's library. It is not a widget-framework concern and the engine already exposes it; DreamGUI wrapping it would be a second door onto the same global.
UWidgetBlueprintLibrarySetHardwareCursorrejectRegisters a cursor SHAPE with the platform. DreamGUI's Cursor property picks among the shapes a project has registered and does not own the registry.
UWidgetBlueprintLibrarySetWindowTitleBarStaterejectThe game window's title bar is a Slate window concern. DreamGUI draws inside the viewport and has no window chrome of its own.
UWidgetBlueprintLibraryRestorePreviousWindowTitleBarStaterejectSee SetWindowTitleBarState.
UWidgetBlueprintLibrarySetWindowTitleBarOnCloseClickedDelegaterejectSee SetWindowTitleBarState.
UWidgetBlueprintLibrarySetWindowTitleBarCloseButtonActiverejectSee SetWindowTitleBarState.

On this page