UUserWidget

A widget that enables UI extensibility through WidgetBlueprint.

Inheritance Hierarchy

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Blueprint/UserWidget.h

Include

#include "Blueprint/UserWidget.h"

Syntax

class UUserWidget :
    public UWidget,
    public INamedSlotInterface

Remarks

A widget that enables UI extensibility through WidgetBlueprint.

Variables

Name Description

Public variable

TArray< TObject...

 

ActiveSequencePlayers

All the sequence players currently playing

Protected variable

TArray< FAnimat...

 

AnimationCallbacks

Public variable

TObjectPtr< UUM...

 

AnimationTickManager

Public variable

uint8: 1

 

bHasScriptImplementedPaint

If a widget has an implemented paint blueprint function

Public variable

uint8: 1

 

bHasScriptImplementedTick

If a widget has an implemented tick blueprint function

Public variable

FGetLinearColor

 

ColorAndOpacityDelegate

Public variable

EDesignPreviewS...

 

DesignSizeMode

Public variable

FVector2D

 

DesignTimeSize

Stores the design time desired size of the user widget

Public variable

FGetSlateColor

 

ForegroundColorDelegate

Protected variable

TObjectPtr< cla...

 

InputComponent

Protected variable

FLinearColor

 

K2_Cache_ColorAndOpacity

Protected variable

FSlateColor

 

K2_Cache_ForegroundColor

Public variable

FNativeOnVisibi...

 

OnNativeVisibilityChanged

Public variable

FOnVisibilityCh...

 

OnVisibilityChanged

Called when the visibility has changed

Public variable

FText

 

PaletteCategory

The category this widget appears in the palette.

Public variable

TObjectPtr< UTe...

 

PreviewBackground

A preview background that you can use when designing the UI to get a sense of scale on the screen.

Public variable

TArray< TObject...

 

StoppedSequencePlayers

List of sequence players to cache and clean up when safe

Protected variable

friend

 

UUMGSequencePlayer

The sequence player is a friend because we need to be alerted when animations start and finish without going through the normal event callbacks as people have a tendency to RemoveAll(this), which would permanently disable callbacks that are critical for UserWidget's base class - so rather we just directly report to the owning UserWidget of state transitions.

Protected variable

friend

 

UUMGSequenceTickManager

Public variable

TObjectPtr< UWi...

 

WidgetTree

The widget tree contained inside this user widget initialized by the blueprint

Constructors

Name Description

Public function

UUserWidget

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

ExtensionTyp...

 

AddExtension()

Add the extension of the requested type.

Public function

UUserWidgetE...

 

AddExtension

Add the extension of the requested type.

Public function

bool

 

AddToPlayerScreen

(
    int32 ZOrder
)

Adds the widget to the game's viewport in a section dedicated to the player.

Public function

void

 

AddToViewport

(
    int32 ZOrder
)

Adds it to the game's viewport and fills the entire screen, unless SetDesiredSizeInViewport is called to explicitly set the size.

Public function

void

 

AssignGUIDToBindings()

Add the GUID of each Namedslot widget to its corresponding binding, if any.

Public function

void

 

BindToAnimationEvent

(
    UWidgetAnimation* Animation,
    FWidgetAnimationDynamicEvent Delega...,
    EWidgetAnimationEvent AnimationEven...,
    FName UserTag
)

Allows binding to a specific animation's event.

Public function

void

 

BindToAnimationFinished

(
    UWidgetAnimation* Animation,
    FWidgetAnimationDynamicEvent Delega...
)

Bind an animation finished delegate.

Public function

void

 

BindToAnimationStarted

(
    UWidgetAnimation* Animation,
    FWidgetAnimationDynamicEvent Delega...
)

Bind an animation started delegate.

Protected function

void

 

BroadcastAnimationStateChange

(
    const UUMGSequencePlayer& Player,
    EWidgetAnimationEvent AnimationEven...
)

Broadcast any events based on a state transition for the sequence player, started, finished...etc.

Public function

void

 

CancelLatentActions()

Cancels any pending Delays or timer callbacks for this widget.

Protected function

void

 

ConditionalTearDownAnimations()

Public function

void

 

Construct()

Called after the underlying slate widget is constructed.

Public function Static

UUserWidget ...

 

CreateWidgetInstance

(
    UWidget& OwningWidget,
    TSubclassOf< UUserWidget > UserWidg...,
    FName WidgetName
)

Public function Static

UUserWidget ...

 

CreateWidgetInstance

(
    UWorld& World,
    TSubclassOf< UUserWidget > UserWidg...,
    FName WidgetName
)

Public function Static

UUserWidget ...

 

CreateWidgetInstance

(
    UGameInstance& GameInstance,
    TSubclassOf< UUserWidget > UserWidg...,
    FName WidgetName
)

Public function Static

UUserWidget ...

 

CreateWidgetInstance

(
    APlayerController& OwnerPC,
    TSubclassOf< UUserWidget > UserWidg...,
    FName WidgetName
)

Public function Static

UUserWidget ...

 

CreateWidgetInstance

(
    UWidgetTree& OwningWidgetTree,
    TSubclassOf< UUserWidget > UserWidg...,
    FName WidgetName
)

Public function

void

 

Destruct()

Called when a widget is no longer referenced causing the slate resource to destroyed.

Protected function

void

 

DisableAnimations()

Public function

void

 

DuplicateAndInitializeFromWidgetTree

(
    UWidgetTree* InWidgetTree,
    const TMap< FName, UWidget* > ...
)

Public function

void

 

FlushAnimations()

Flushes all animations on all widgets to guarantee that any queued updates are processed before this call returns

Public function Const

FVector2D

 

GetAlignmentInViewport()

Public function Const

FAnchors

 

GetAnchorsInViewport()

Public function Const

float

 

GetAnimationCurrentTime

(
    const UWidgetAnimation* InAnim...
)

Gets the current time of the animation in this widget

Public function Const

const FLinea...

 

GetColorAndOpacity()

Gets the tint of the widget.

Public function Const

UWidget *...

 

GetDesiredFocusWidget()

Public function Const

FName

 

GetDesiredFocusWidgetName()

Public function Const

EWidgetTickF...

 

GetDesiredTickFrequency()

Public function Const

ExtensionTyp...

 

GetExtension()

Find the first extension of the requested type.

Public function Const

UUserWidgetE...

 

GetExtension

Find the first extension of the requested type.

Public function Const

TArray< UUse...

 

GetExtensions

Find the extensions of the requested type.

Public function Const

const FSlate...

 

GetForegroundColor()

Gets the foreground color of the widget, this is inherited by sub widgets.

Public function Const

int32

 

GetInputActionPriority()

Gets the priority of the input action.

Protected function Const

FVector2D

 

GetMinimumDesiredSize()

Protected function

UUMGSequence...

 

GetOrAddSequencePlayer

(
    UWidgetAnimation* InAnimation
)

Public function Const

APlayerCamer...

 

GetOwningPlayerCameraManager()

Gets the player camera manager associated with this UI.

Public function Const

T *

 

GetOwningPlayerCameraManager()

Gets the player camera manager associated with this UI cast to the template type.

Public function Const

T *

 

GetOwningPlayerPawn()

Gets the player pawn associated with this UI cast to the template type.

Public function Const

APawn *

 

GetOwningPlayerPawn()

Gets the player pawn associated with this UI.

Public function Const

TPlayerState...

 

GetOwningPlayerState

(
    bool bChecked
)

Get the owning player's PlayerState.

Public function Const

FMargin

 

GetPadding()

Gets the padding for the user widget.

Public function Const

const FLocal...

 

GetPlayerContext()

Gets the player context associated with this UI.

Public function Const

UWidget *...

 

GetRootWidget()

Protected function Const

UUMGSequence...

 

GetSequencePlayer

(
    const UWidgetAnimation* InAnim...
)

Public function Const

TSharedPtr< ...

 

GetSlateWidgetFromName

(
    const FName& Name
)

Public function Const

UWidget *...

 

GetWidgetFromName

(
    const FName& Name
)

Public function

UWidget *...

 

GetWidgetHandle

(
    TSharedRef< SWidget > InWidget
)

Public function Const

UWidgetBluep...

 

GetWidgetTreeOwningClass()

Returns the BlueprintGeneratedClass that generated the WidgetTree.

Public function Virtual

bool

 

Initialize()

Protected function Virtual

void

 

InitializeInputComponent()

Protected function

void

 

InitializeNamedSlots()

Protected function Virtual

void

 

InitializeNativeClassData()

The function is implemented only in nativized widgets (automatically converted from BP to c++)

Protected function

void

 

Invalidate

(
    EInvalidateWidgetReason InvalidateR...
)

Public function Const

bool

 

IsAnimationPlaying

(
    const UWidgetAnimation* InAnim...
)

Gets whether an animation is currently playing on this widget.

Public function

bool

 

IsAnimationPlayingForward

(
    const UWidgetAnimation* InAnim...
)

Returns true if the animation is currently playing forward, false otherwise.

Public function Const

bool

 

IsAnyAnimationPlaying()

Public function Virtual Const

bool

 

IsEditorUtility()

Is this widget an editor utility widget.

Public function Const

bool

 

IsFocusable()

Sets whether this widget to accept focus when clicked, or when navigated to.

Public function Const

bool

 

IsInputActionBlocking()

Returns whether the input action is blocking.

Public function Const

bool

 

IsInteractable()

Gets a value indicating if the widget is interactive.

Protected function Const

bool

 

IsListeningForInputAction

(
    FName ActionName
)

Checks if the action has a registered callback with the input component.

Public function Const

bool

 

IsPlayingAnimation()

Are we currently playing any animations?

Protected function

FLinearColor

 

K2_Gate_ColorAndOpacity()

Protected function

FSlateColor

 

K2_Gate_ForegroundColor()

Protected function

void

 

ListenForInputAction

(
    FName ActionName,
    TEnumAsByte< EInputEvent > EventTyp...,
    bool bConsume,
    FOnInputAction Callback
)

Listens for a particular Player Input Action by name.

Protected function Virtual

void

 

NativeConstruct()

Protected function Virtual

void

 

NativeDestruct()

Protected function Virtual Const

bool

 

NativeIsInteractable()

Protected function Virtual

void

 

NativeOnAddedToFocusPath

(
    const FFocusEvent& InFocusEvent
)

Protected function Virtual

FReply

 

NativeOnAnalogValueChanged

(
    const FGeometry& InGeometry,
    const FAnalogInputEvent& InAnalogE...
)

Protected function Virtual

FCursorReply

 

NativeOnCursorQuery

(
    const FGeometry& InGeometry,
    const FPointerEvent& InCursorEvent
)

Protected function Virtual

void

 

NativeOnDragCancelled

(
    const FDragDropEvent& InDragDropEv...,
    UDragDropOperation* InOperatio...
)

Protected function Virtual

void

 

NativeOnDragDetected

(
    const FGeometry& InGeometry,
    const FPointerEvent& InMouseEvent,
    UDragDropOperation*& OutOperat...
)

Protected function Virtual

void

 

NativeOnDragEnter

(
    const FGeometry& InGeometry,
    const FDragDropEvent& InDragDropEv...,
    UDragDropOperation* InOperatio...
)

Protected function Virtual

void

 

NativeOnDragLeave

(
    const FDragDropEvent& InDragDropEv...,
    UDragDropOperation* InOperatio...
)

Protected function Virtual

bool

 

NativeOnDragOver

(
    const FGeometry& InGeometry,
    const FDragDropEvent& InDragDropEv...,
    UDragDropOperation* InOperatio...
)

Protected function Virtual

bool

 

NativeOnDrop

(
    const FGeometry& InGeometry,
    const FDragDropEvent& InDragDropEv...,
    UDragDropOperation* InOperatio...
)

Protected function Virtual

void

 

NativeOnFocusChanging

(
    const FWeakWidgetPath& PreviousFoc...,
    const FWidgetPath& NewWidgetPath,
    const FFocusEvent& InFocusEvent
)

Protected function Virtual

void

 

NativeOnFocusLost

(
    const FFocusEvent& InFocusEvent
)

Protected function Virtual

FReply

 

NativeOnFocusReceived

(
    const FGeometry& InGeometry,
    const FFocusEvent& InFocusEvent
)

Protected function Virtual

void

 

NativeOnInitialized()

Protected function Virtual

FReply

 

NativeOnKeyChar

(
    const FGeometry& InGeometry,
    const FCharacterEvent& InCharEvent
)

Protected function Virtual

FReply

 

NativeOnKeyDown

(
    const FGeometry& InGeometry,
    const FKeyEvent& InKeyEvent
)

Protected function Virtual

FReply

 

NativeOnKeyUp

(
    const FGeometry& InGeometry,
    const FKeyEvent& InKeyEvent
)

Protected function Virtual

FReply

 

NativeOnMotionDetected

(
    const FGeometry& InGeometry,
    const FMotionEvent& InMotionEvent
)

Protected function Virtual

FReply

 

NativeOnMouseButtonDoubleClick

(
    const FGeometry& InGeometry,
    const FPointerEvent& InMouseEvent
)

Protected function Virtual

FReply

 

NativeOnMouseButtonDown

(
    const FGeometry& InGeometry,
    const FPointerEvent& InMouseEvent
)

Protected function Virtual

FReply

 

NativeOnMouseButtonUp

(
    const FGeometry& InGeometry,
    const FPointerEvent& InMouseEvent
)

Protected function Virtual

void

 

NativeOnMouseCaptureLost

(
    const FCaptureLostEvent& CaptureLo...
)

Protected function Virtual

void

 

NativeOnMouseEnter

(
    const FGeometry& InGeometry,
    const FPointerEvent& InMouseEvent
)

Protected function Virtual

void

 

NativeOnMouseLeave

(
    const FPointerEvent& InMouseEvent
)

Protected function Virtual

FReply

 

NativeOnMouseMove

(
    const FGeometry& InGeometry,
    const FPointerEvent& InMouseEvent
)

Protected function Virtual

FReply

 

NativeOnMouseWheel

(
    const FGeometry& InGeometry,
    const FPointerEvent& InMouseEvent
)

Protected function Virtual

FNavigationR...

 

NativeOnNavigation

(
    const FGeometry& InGeometry,
    const FNavigationEvent& InNavigati...
)

Protected function Virtual

FNavigationR...

 

NativeOnNavigation

(
    const FGeometry& MyGeometry,
    const FNavigationEvent& InNavigati...,
    const FNavigationReply& InDefaultR...
)

Protected function Virtual

FReply

 

NativeOnPreviewKeyDown

(
    const FGeometry& InGeometry,
    const FKeyEvent& InKeyEvent
)

Protected function Virtual

FReply

 

NativeOnPreviewMouseButtonDown

(
    const FGeometry& InGeometry,
    const FPointerEvent& InMouseEvent
)

Protected function Virtual

void

 

NativeOnRemovedFromFocusPath

(
    const FFocusEvent& InFocusEvent
)

Protected function Virtual

FReply

 

NativeOnTouchEnded

(
    const FGeometry& InGeometry,
    const FPointerEvent& InGestureEven...
)

Protected function Virtual

FReply

 

NativeOnTouchForceChanged

(
    const FGeometry& MyGeometry,
    const FPointerEvent& TouchEvent
)

Protected function Virtual

FReply

 

NativeOnTouchGesture

(
    const FGeometry& InGeometry,
    const FPointerEvent& InGestureEven...
)

Protected function Virtual

FReply

 

NativeOnTouchMoved

(
    const FGeometry& InGeometry,
    const FPointerEvent& InGestureEven...
)

Protected function Virtual

FReply

 

NativeOnTouchStarted

(
    const FGeometry& InGeometry,
    const FPointerEvent& InGestureEven...
)

Protected function Virtual Const

int32

 

NativePaint

(
    const FPaintArgs& Args,
    const FGeometry& AllottedGeometry,
    const FSlateRect& MyCullingRect,
    FSlateWindowElementList& OutDrawEl...,
    int32 LayerId,
    const FWidgetStyle& InWidgetStyle,
    bool bParentEnabled
)

Native implemented paint function for the Widget Returns the maximum LayerID painted on

Protected function Virtual

void

 

NativePreConstruct()

Protected function Virtual Const

bool

 

NativeSupportsCustomNavigation()

Protected function Virtual Const

bool

 

NativeSupportsKeyboardFocus()

Protected function Virtual

void

 

NativeTick

(
    const FGeometry& MyGeometry,
    float InDeltaTime
)

Public function

void

 

OnAddedToFocusPath

(
    FFocusEvent InFocusEvent
)

If focus is gained on on this widget or on a child widget and this widget is added to the focus path, and wasn't previously part of it, this event is called.

Public function

FEventReply

 

OnAnalogValueChanged

(
    FGeometry MyGeometry,
    FAnalogInputEvent InAnalogInputEven...
)

Called when an analog value changes on a button that supports analog

Protected function

void

 

OnAnimationFinished

(
    const UWidgetAnimation* Animat...
)

Called when an animation has either played all the way through or is stopped

Protected function Virtual

void

 

OnAnimationFinished_Implementation

(
    const UWidgetAnimation* Animat...
)

Protected function Virtual

void

 

OnAnimationFinishedPlaying

(
    UUMGSequencePlayer& Player
)

Called when a sequence player is finished playing an animation

Protected function

void

 

OnAnimationStarted

(
    const UWidgetAnimation* Animat...
)

Called when an animation is started.

Protected function Virtual

void

 

OnAnimationStarted_Implementation

(
    const UWidgetAnimation* Animat...
)

Protected function Virtual

void

 

OnAnimationStartedPlaying

(
    UUMGSequencePlayer& Player
)

Called when a sequence player is finished playing an animation

Public function

void

 

OnDragCancelled

(
    const FPointerEvent& PointerEvent,
    UDragDropOperation* Operation
)

Called when the user cancels the drag operation, typically when they simply release the mouse button after beginning a drag operation, but failing to complete the drag.

Public function

void

 

OnDragDetected

(
    FGeometry MyGeometry,
    const FPointerEvent& PointerEvent,
    UDragDropOperation*& Operation
)

TODO.

Public function

void

 

OnDragEnter

(
    FGeometry MyGeometry,
    FPointerEvent PointerEvent,
    UDragDropOperation* Operation
)

Called during drag and drop when the drag enters the widget.

Public function

void

 

OnDragLeave

(
    FPointerEvent PointerEvent,
    UDragDropOperation* Operation
)

Called during drag and drop when the drag leaves the widget.

Public function

bool

 

OnDragOver

(
    FGeometry MyGeometry,
    FPointerEvent PointerEvent,
    UDragDropOperation* Operation
)

Called during drag and drop when the the mouse is being dragged over a widget.

Public function

bool

 

OnDrop

(
    FGeometry MyGeometry,
    FPointerEvent PointerEvent,
    UDragDropOperation* Operation
)

Called when the user is dropping something onto a widget.

Public function

void

 

OnFocusLost

(
    FFocusEvent InFocusEvent
)

Called when this widget loses focus. This event does not bubble.

Public function

FEventReply

 

OnFocusReceived

(
    FGeometry MyGeometry,
    FFocusEvent InFocusEvent
)

Called when keyboard focus is given to this widget. This event does not bubble.

Public function

void

 

OnInitialized()

Called once only at game time on non-template instances.

Protected function

void

 

OnInputAction

(
    FOnInputAction Callback
)

Public function

FEventReply

 

OnKeyChar

(
    FGeometry MyGeometry,
    FCharacterEvent InCharacterEvent
)

Called after a character is entered while this widget has focus

Public function

FEventReply

 

OnKeyDown

(
    FGeometry MyGeometry,
    FKeyEvent InKeyEvent
)

Called after a key (keyboard, controller, ...) is pressed when this widget has focus (this event bubbles if not handled)

Public function

FEventReply

 

OnKeyUp

(
    FGeometry MyGeometry,
    FKeyEvent InKeyEvent
)

Called after a key (keyboard, controller, ...) is released when this widget has focus

Public function

FEventReply

 

OnMotionDetected

(
    FGeometry MyGeometry,
    FMotionEvent InMotionEvent
)

Called when motion is detected (controller or device) e.g. Someone tilts or shakes their controller.

Public function

FEventReply

 

OnMouseButtonDoubleClick

(
    FGeometry InMyGeometry,
    const FPointerEvent& InMouseEvent
)

Called when a mouse button is double clicked. Override this in derived classes.

Public function

FEventReply

 

OnMouseButtonDown

(
    FGeometry MyGeometry,
    const FPointerEvent& MouseEvent
)

The system calls this method to notify the widget that a mouse button was pressed within it.

Public function

FEventReply

 

OnMouseButtonUp

(
    FGeometry MyGeometry,
    const FPointerEvent& MouseEvent
)

The system calls this method to notify the widget that a mouse button was release within it.

Public function

void

 

OnMouseCaptureLost()

Called when mouse capture is lost if it was owned by this widget.

Public function

void

 

OnMouseEnter

(
    FGeometry MyGeometry,
    const FPointerEvent& MouseEvent
)

The system will use this event to notify a widget that the cursor has entered it.

Public function

void

 

OnMouseLeave

(
    const FPointerEvent& MouseEvent
)

The system will use this event to notify a widget that the cursor has left it.

Public function

FEventReply

 

OnMouseMove

(
    FGeometry MyGeometry,
    const FPointerEvent& MouseEvent
)

The system calls this method to notify the widget that a mouse moved within it.

Public function

FEventReply

 

OnMouseWheel

(
    FGeometry MyGeometry,
    const FPointerEvent& MouseEvent
)

Called when the mouse wheel is spun. This event is bubbled.

Public function Const

void

 

OnPaint

(
    FPaintContext& Context
)

Public function

FEventReply

 

OnPreviewKeyDown

(
    FGeometry MyGeometry,
    FKeyEvent InKeyEvent
)

Called after a key (keyboard, controller, ...) is pressed when this widget or a child of this widget has focus If a widget handles this event, OnKeyDown will not be passed to the focused widget.

Public function

FEventReply

 

OnPreviewMouseButtonDown

(
    FGeometry MyGeometry,
    const FPointerEvent& MouseEvent
)

Just like OnMouseButtonDown, but tunnels instead of bubbling.

Public function

void

 

OnRemovedFromFocusPath

(
    FFocusEvent InFocusEvent
)

If focus is lost on on this widget or on a child widget and this widget is no longer part of the focus path.

Public function

FEventReply

 

OnTouchEnded

(
    FGeometry MyGeometry,
    const FPointerEvent& InTouchEvent
)

Called when a touchpad touch is ended (finger lifted)

Public function

FEventReply

 

OnTouchForceChanged

(
    FGeometry MyGeometry,
    const FPointerEvent& InTouchEvent
)

Called when a touchpad force has changed (user pressed down harder or let up)

Public function

FEventReply

 

OnTouchGesture

(
    FGeometry MyGeometry,
    const FPointerEvent& GestureEvent
)

Called when the user performs a gesture on trackpad. This event is bubbled.

Public function

FEventReply

 

OnTouchMoved

(
    FGeometry MyGeometry,
    const FPointerEvent& InTouchEvent
)

Called when a touchpad touch is moved (finger moved)

Public function

FEventReply

 

OnTouchStarted

(
    FGeometry MyGeometry,
    const FPointerEvent& InTouchEvent
)

Called when a touchpad touch is started (finger down)

Public function

float

 

PauseAnimation

(
    const UWidgetAnimation* InAnim...
)

Pauses an already running animation in this widget

Public function

UUMGSequence...

 

PlayAnimation

(
    UWidgetAnimation* InAnimation,
    float StartAtTime,
    int32 NumLoopsToPlay,
    EUMGSequencePlayMode::Type PlayMode,
    float PlaybackSpeed,
    bool bRestoreState
)

Plays an animation in this widget a specified number of times

Public function

UUMGSequence...

 

PlayAnimationForward

(
    UWidgetAnimation* InAnimation,
    float PlaybackSpeed,
    bool bRestoreState
)

Plays an animation on this widget relative to it's current state forward.

Public function

UUMGSequence...

 

PlayAnimationReverse

(
    UWidgetAnimation* InAnimation,
    float PlaybackSpeed,
    bool bRestoreState
)

Plays an animation on this widget relative to it's current state in reverse.

Public function

UUMGSequence...

 

PlayAnimationTimeRange

(
    UWidgetAnimation* InAnimation,
    float StartAtTime,
    float EndAtTime,
    int32 NumLoopsToPlay,
    EUMGSequencePlayMode::Type PlayMode,
    float PlaybackSpeed,
    bool bRestoreState
)

Plays an animation in this widget a specified number of times stopping at a specified time

Public function

void

 

PlaySound

(
    USoundBase* SoundToPlay
)

Plays a sound through the UI

Protected function

void

 

PostTickActionsAndAnimation

(
    float InDeltaTime
)

Ticks the active sequences and latent actions that have been scheduled for this Widget.

Public function

void

 

PreConstruct

(
    bool IsDesignTime
)

Called by both the game and the editor.

Protected function

void

 

RegisterInputComponent()

ListenForInputAction will automatically Register an Input Component with the player input system.

Public function

void

 

RemoveExtension

(
    UUserWidgetExtension* InExtens...
)

Remove the extension.

Public function

void

 

RemoveExtensions()

Remove all extensions of the requested type.

Public function

void

 

RemoveExtensions

Remove all extensions of the requested type.

Protected function

void

 

RemoveObsoleteBindings

(
    const TArray< FName >& NamedSlots
)

Public function

void

 

ReverseAnimation

(
    const UWidgetAnimation* InAnim...
)

If an animation is playing, this function will reverse the playback.

Public function

void

 

SetAlignmentInViewport

(
    FVector2D Alignment
)

Public function

void

 

SetAnchorsInViewport

(
    FAnchors Anchors
)

Public function

void

 

SetAnimationCurrentTime

(
    const UWidgetAnimation* InAnim...,
    float InTime
)

Sets the current time of the animation in this widget. Does not change state.

Public function

void

 

SetColorAndOpacity

(
    FLinearColor InColorAndOpacity
)

Sets the tint of the widget, this affects all child widgets.

Public function

bool

 

SetDesiredFocusWidget

(
    FName WidgetName
)

Sets the child Widget that should receive focus when this UserWidget gets focus using it's name.

Public function

bool

 

SetDesiredFocusWidget

(
    UWidget* Widget
)

Sets the child Widget that should receive focus when this UserWidget gets focus.

Public function

void

 

SetDesiredSizeInViewport

(
    FVector2D Size
)

Public function

void

 

SetForegroundColor

(
    FSlateColor InForegroundColor
)

Sets the foreground color of the widget, this is inherited by sub widgets.

Protected function

void

 

SetInputActionBlocking

(
    bool bShouldBlock
)

Protected function

void

 

SetInputActionPriority

(
    int32 NewPriority
)

Public function

void

 

SetIsFocusable

(
    bool InIsFocusable
)

Protected function

void

 

SetMinimumDesiredSize

(
    FVector2D InMinimumDesiredSize
)

Public function

void

 

SetNumLoopsToPlay

(
    const UWidgetAnimation* InAnim...,
    int32 NumLoopsToPlay
)

Changes the number of loops to play given a playing animation

Public function

void

 

SetOwningLocalPlayer

(
    ULocalPlayer* LocalPlayer
)

Sets the player associated with this UI via LocalPlayer reference.

Public function

void

 

SetOwningPlayer

(
    APlayerController* LocalPlayer...
)

Sets the local player associated with this UI via PlayerController reference.

Public function

void

 

SetPadding

(
    FMargin InPadding
)

Sets the padding for the user widget, putting a larger gap between the widget border and it's root widget.

Public function

void

 

SetPlaybackSpeed

(
    const UWidgetAnimation* InAnim...,
    float PlaybackSpeed
)

Changes the playback rate of a playing animation

Public function

void

 

SetPlayerContext

(
    const FLocalPlayerContext& InPlaye...
)

Sets the player context associated with this UI.

Public function

void

 

SetPositionInViewport

(
    FVector2D Position,
    bool bRemoveDPIScale
)

Sets the widgets position in the viewport.

Public function

void

 

StopAllAnimations()

Stop All actively running animations.

Public function

void

 

StopAnimation

(
    const UWidgetAnimation* InAnim...
)

Stops an already running animation in this widget

Public function

void

 

StopAnimationsAndLatentActions()

Cancels any pending Delays or timer callbacks for this widget, and stops all active animations on the widget.

Protected function

void

 

StopListeningForAllInputActions()

Stops listening to all input actions, and unregisters the input component with the player controller.

Protected function

void

 

StopListeningForInputAction

(
    FName ActionName,
    TEnumAsByte< EInputEvent > EventTyp...
)

Removes the binding for a particular action's callback.

Protected function

void

 

TearDownAnimations()

Public function

void

 

Tick

(
    FGeometry MyGeometry,
    float InDeltaTime
)

Ticks this widget. Override in derived classes, but always call the parent implementation.

Protected function

void

 

TickActionsAndAnimation

(
    float InDeltaTime
)

Ticks the active sequences and latent actions that have been scheduled for this Widget.

Public function

void

 

UnbindAllFromAnimationFinished

(
    UWidgetAnimation* Animation
)

Public function

void

 

UnbindAllFromAnimationStarted

(
    UWidgetAnimation* Animation
)

Public function

void

 

UnbindFromAnimationFinished

(
    UWidgetAnimation* Animation,
    FWidgetAnimationDynamicEvent Delega...
)

Unbind an animation finished delegate.

Public function

void

 

UnbindFromAnimationStarted

(
    UWidgetAnimation* Animation,
    FWidgetAnimationDynamicEvent Delega...
)

Unbind an animation started delegate.

Protected function

void

 

UnregisterInputComponent()

StopListeningForAllInputActions will automatically Register an Input Component with the player input system.

Public function

void

 

UpdateBindingForSlot

(
    FName SlotName
)

Update the binding for this namedslot if the name is not found but GUID is matched.

Public function

void

 

UpdateCanTick()

Public function Const

void

 

ValidateBlueprint

(
    const UWidgetTree& BlueprintWidget...,
    IWidgetCompilerLog& CompileLog
)

Final step of Widget Blueprint compilation.

Public function Virtual Const

void

 

ValidateCompiledWidgetTree

(
    const UWidgetTree& BlueprintWidget...,
    IWidgetCompilerLog& CompileLog
)

Override to perform any custom inspections of the default widget tree at the end of compilation.

Overridden from UWidget

Name Description

Public function Virtual Const

T *

 

GetOwningLocalPlayer()

Gets the local player associated with this UI cast to the template type.

Public function Virtual Const

ULocalPlayer...

 

GetOwningLocalPlayer()

Gets the local player associated with this UI.

Public function Virtual Const

APlayerContr...

 

GetOwningPlayer()

Gets the player controller associated with this UI.

Public function Virtual Const

T *

 

GetOwningPlayer()

Gets the player controller associated with this UI cast to the template type.

Public function Virtual

const FText

 

GetPaletteCategory()

Gets the palette category of the widget

Public function Virtual Const

UWorld *

 

GetWorld()

Public function Virtual

void

 

OnDesignerChanged

(
    const FDesignerChangedEventArgs& E...
)

Protected function Virtual

void

 

OnWidgetRebuilt()

Function called after the underlying SWidget is constructed.

Protected function Virtual

TSharedRef< ...

 

RebuildWidget()

Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed.

Public function Virtual

void

 

SetDesignerFlags

(
    EWidgetDesignFlags NewFlags
)

Sets the designer flags on the widget.

Public function Virtual

void

 

SetVisibility

(
    ESlateVisibility InVisibility
)

Sets the visibility of the widget.

Public function Virtual

void

 

SynchronizeProperties()

Applies all properties to the native widget if possible.

Overridden from UVisual

Name Description

Public function Virtual

void

 

ReleaseSlateResources

(
    bool bReleaseChildren
)

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual Const

bool

 

IsAsset()

Returns true if this object is considered an asset.

Public function Virtual

void

 

PostDuplicate

(
    bool bDuplicateForPIE
)

Called after duplication & serialization and before PostLoad.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

PreSave

(
    FObjectPreSaveContext SaveContext
)

Presave function.

Overridden from INamedSlotInterface

Name Description

Public function Virtual Const

UWidget *...

 

GetContentForSlot

(
    FName SlotName
)

Gets the widget for a given slot by name, will return nullptr if no widget is in the slot.

Public function Virtual Const

void

 

GetSlotNames

(
    TArray< FName >& SlotNames
)

Gets the names for slots that we can store widgets into.

Public function Virtual

void

 

SetContentForSlot

(
    FName SlotName,
    UWidget* Content
)

Sets the widget for a given slot by name.

Classes

Constants

Deprecated Variables

Name Description

Public variable

uint8: 1

 

bIsFocusable

Direct access to bIsFocusable is deprecated. Please use the getter. Note that this property is only set at construction and is not modifiable at runtime.

Public variable

uint8: 1

 

bStopAction

Direct access to bStopAction is deprecated. Please use the getter or setter.

Public variable

FLinearColor

 

ColorAndOpacity

Direct access to ColorAndOpacity is deprecated. Please use the getter or setter.

Public variable

FSlateColor

 

ForegroundColor

Direct access to ForegroundColor is deprecated. Please use the getter or setter.

Public variable

FMargin

 

Padding

Direct access to Padding is deprecated. Please use the getter or setter.

Public variable

int32

 

Priority

Direct access to Priority is deprecated. Please use the getter or setter.

Deprecated Functions

Name Description

Protected function Const

FMargin

 

GetFullScreenOffset()

GetFullScreenOffset is deprecated. Use the GameViewportSubsystem.

Public function Const

bool

 

GetIsVisible()

GetIsVisible is deprecated. Please use IsInViewport instead.

Public function

void

 

RemoveFromViewport()

RemoveFromViewport is deprecated. Use RemoveFromParent instead.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Cancel