G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
UUserWidget Class Reference

A widget that enables UI extensibility through WidgetBlueprint. More...

Public Member Functions

Animation
void OnAnimationFinished (const UWidgetAnimation Animation)
 Called when an animation has either played all the way through or is stopped.
void OnAnimationStarted (const UWidgetAnimation Animation)
 Called when an animation is started.
void BindToAnimationStarted (UWidgetAnimation Animation, FWidgetAnimationDynamicEvent Delegate=FWidgetAnimationDynamicEvent())
 Bind an animation started delegate.
void UnbindAllFromAnimationStarted (UWidgetAnimation Animation)
void BindToAnimationEvent (UWidgetAnimation Animation, FWidgetAnimationDynamicEvent Delegate, EWidgetAnimationEvent AnimationEvent, FName UserTag=NAME_None)
 Allows binding to a specific animation's event.
void UnbindFromAnimationStarted (UWidgetAnimation Animation, FWidgetAnimationDynamicEvent Delegate=FWidgetAnimationDynamicEvent())
 Unbind an animation started delegate.
void UnbindAllFromAnimationFinished (UWidgetAnimation Animation)
void UnbindFromAnimationFinished (UWidgetAnimation Animation, FWidgetAnimationDynamicEvent Delegate=FWidgetAnimationDynamicEvent())
 Unbind an animation finished delegate.
void BindToAnimationFinished (UWidgetAnimation Animation, FWidgetAnimationDynamicEvent Delegate=FWidgetAnimationDynamicEvent())
 Bind an animation finished delegate.
Delay
void StopAnimationsAndLatentActions ()
 Cancels any pending Delays or timer callbacks for this widget, and stops all active animations on the widget.
void CancelLatentActions ()
 Cancels any pending Delays or timer callbacks for this widget.
Drag and Drop
void OnDragCancelled (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.
void OnDragDetected (FGeometry MyGeometry, FPointerEvent PointerEvent, UDragDropOperation &Operation)
 Called when Slate detects that a widget started to be dragged.
bool OnDrop (FGeometry MyGeometry, FPointerEvent PointerEvent, UDragDropOperation Operation)
 Called when the user is dropping something onto a widget. Ends the drag and drop operation, even if no widget handles this.
void OnDragLeave (FPointerEvent PointerEvent, UDragDropOperation Operation)
 Called during drag and drop when the drag leaves the widget.
void OnDragEnter (FGeometry MyGeometry, FPointerEvent PointerEvent, UDragDropOperation Operation)
 Called during drag and drop when the drag enters the widget.
bool OnDragOver (FGeometry MyGeometry, FPointerEvent PointerEvent, UDragDropOperation Operation)
 Called during drag and drop when the the mouse is being dragged over a widget.
Mouse
void OnMouseLeave (FPointerEvent MouseEvent)
 The system will use this event to notify a widget that the cursor has left it. This event is NOT bubbled.
void OnMouseEnter (FGeometry MyGeometry, FPointerEvent MouseEvent)
 The system will use this event to notify a widget that the cursor has entered it. This event is NOT bubbled.
FEventReply OnPreviewMouseButtonDown (FGeometry MyGeometry, FPointerEvent MouseEvent)
 Just like OnMouseButtonDown, but tunnels instead of bubbling. If this event is handled, OnMouseButtonDown will not be sent.
FEventReply OnMouseButtonUp (FGeometry MyGeometry, FPointerEvent MouseEvent)
 The system calls this method to notify the widget that a mouse button was release within it. This event is bubbled.
FEventReply OnMouseWheel (FGeometry MyGeometry, FPointerEvent MouseEvent)
 Called when the mouse wheel is spun. This event is bubbled.
FEventReply OnMouseMove (FGeometry MyGeometry, FPointerEvent MouseEvent)
 The system calls this method to notify the widget that a mouse moved within it. This event is bubbled.
FEventReply OnMouseButtonDown (FGeometry MyGeometry, FPointerEvent MouseEvent)
 The system calls this method to notify the widget that a mouse button was pressed within it. This event is bubbled.
FEventReply OnMouseButtonDoubleClick (FGeometry InMyGeometry, FPointerEvent InMouseEvent)
 Called when a mouse button is double clicked. Override this in derived classes.
Sound
void PlaySound (USoundBase SoundToPlay)
 Plays a sound through the UI.
Touch Input
FEventReply OnTouchForceChanged (FGeometry MyGeometry, FPointerEvent InTouchEvent)
 Called when a touchpad force has changed (user pressed down harder or let up).
FEventReply OnTouchGesture (FGeometry MyGeometry, FPointerEvent GestureEvent)
 Called when the user performs a gesture on trackpad. This event is bubbled.
void OnMouseCaptureLost ()
 Called when mouse capture is lost if it was owned by this widget.
FEventReply OnTouchEnded (FGeometry MyGeometry, FPointerEvent InTouchEvent)
 Called when a touchpad touch is ended (finger lifted).
FEventReply OnTouchMoved (FGeometry MyGeometry, FPointerEvent InTouchEvent)
 Called when a touchpad touch is moved (finger moved).
FEventReply OnTouchStarted (FGeometry MyGeometry, FPointerEvent InTouchEvent)
 Called when a touchpad touch is started (finger down).
FEventReply OnMotionDetected (FGeometry MyGeometry, FMotionEvent InMotionEvent)
 Called when motion is detected (controller or device) e.g. Someone tilts or shakes their controller.
User Interface
void Tick (FGeometry MyGeometry, float32 InDeltaTime)
 Ticks this widget. Override in derived classes, but always call the parent implementation.
void Construct ()
 Called after the underlying slate widget is constructed. Depending on how the slate object is used this event may be called multiple times due to adding and removing from the hierarchy. If you need a true called-once-when-created event, use OnInitialized.
void Destruct ()
 Called when a widget is no longer referenced causing the slate resource to destroyed. Just like Construct this event can be called multiple times.
void PreConstruct (bool IsDesignTime)
 Called by both the game and the editor. Allows users to run initial setup for their widgets to better preview the setup in the designer and since generally that same setup code is required at runtime, it's called there as well.
void OnInitialized ()
 Called once only at game time on non-template instances. While Construct/Destruct pertain to the underlying Slate, this is called only once for the UUserWidget. If you have one-time things to establish up-front (like binding callbacks to events on BindWidget properties), do so here.
User Interface | Interaction
bool IsInteractable () const
 Gets a value indicating if the widget is interactive.
User Interface | Painting
void OnPaint (FPaintContext &Context) const
User Interface|Animation
bool IsAnimationPlaying (const UWidgetAnimation InAnimation) const
 Gets whether an animation is currently playing on this widget.
bool IsAnimationPlayingForward (const UWidgetAnimation InAnimation)
 returns true if the animation is currently playing forward, false otherwise.
float32 GetAnimationCurrentTime (const UWidgetAnimation InAnimation) const
 Gets the current time of the animation in this widget.
bool IsAnyAnimationPlaying () const
bool IsPlayingAnimation () const
 Are we currently playing any animations?
void FlushAnimations ()
 Flushes all animations on all widgets to guarantee that any queued updates are processed before this call returns.
void QueuePlayAnimation (UWidgetAnimation InAnimation, float32 StartAtTime=0.000000, int NumLoopsToPlay=1, EUMGSequencePlayMode PlayMode=EUMGSequencePlayMode ::Forward, float32 PlaybackSpeed=1.000000, bool bRestoreState=false)
 Plays an animation in this widget a specified number of times.
UUMGSequencePlayer PlayAnimationTimeRange (UWidgetAnimation InAnimation, float32 StartAtTime=0.000000, float32 EndAtTime=0.000000, int NumLoopsToPlay=1, EUMGSequencePlayMode PlayMode=EUMGSequencePlayMode ::Forward, float32 PlaybackSpeed=1.000000, bool bRestoreState=false)
 Plays an animation in this widget a specified number of times stopping at a specified time.
void StopAnimation (const UWidgetAnimation InAnimation)
 Stops an already running animation in this widget.
void StopAllAnimations ()
 Stop All actively running animations.
void SetNumLoopsToPlay (const UWidgetAnimation InAnimation, int NumLoopsToPlay)
 Changes the number of loops to play given a playing animation.
void SetPlaybackSpeed (const UWidgetAnimation InAnimation, float32 PlaybackSpeed=1.000000)
 Changes the playback rate of a playing animation.
float32 PauseAnimation (const UWidgetAnimation InAnimation)
 Pauses an already running animation in this widget.
UUMGSequencePlayer PlayAnimation (UWidgetAnimation InAnimation, float32 StartAtTime=0.000000, int NumLoopsToPlay=1, EUMGSequencePlayMode PlayMode=EUMGSequencePlayMode ::Forward, float32 PlaybackSpeed=1.000000, bool bRestoreState=false)
 Plays an animation in this widget a specified number of times.
UUMGSequencePlayer PlayAnimationForward (UWidgetAnimation InAnimation, float32 PlaybackSpeed=1.000000, bool bRestoreState=false)
 Plays an animation on this widget relative to it's current state forward. You should use this version in situations where say a user can click a button and that causes a panel to slide out, and you want to reverse that same animation to begin sliding in the opposite direction.
UUMGSequencePlayer PlayAnimationReverse (UWidgetAnimation InAnimation, float32 PlaybackSpeed=1.000000, bool bRestoreState=false)
 Plays an animation on this widget relative to it's current state in reverse. You should use this version in situations where say a user can click a button and that causes a panel to slide out, and you want to reverse that same animation to begin sliding in the opposite direction.
void QueueStopAnimation (const UWidgetAnimation InAnimation)
 Stops an already running animation in this widget.
void SetAnimationCurrentTime (const UWidgetAnimation InAnimation, float32 InTime)
 Sets the current time of the animation in this widget. Does not change state.
float32 QueuePauseAnimation (const UWidgetAnimation InAnimation)
 Pauses an already running animation in this widget.
void ReverseAnimation (const UWidgetAnimation InAnimation)
 If an animation is playing, this function will reverse the playback.
void QueuePlayAnimationForward (UWidgetAnimation InAnimation, float32 PlaybackSpeed=1.000000, bool bRestoreState=false)
 Plays an animation on this widget relative to it's current state forward. You should use this version in situations where say a user can click a button and that causes a panel to slide out, and you want to reverse that same animation to begin sliding in the opposite direction.
void QueuePlayAnimationReverse (UWidgetAnimation InAnimation, float32 PlaybackSpeed=1.000000, bool bRestoreState=false)
 Plays an animation on this widget relative to it's current state in reverse. You should use this version in situations where say a user can click a button and that causes a panel to slide out, and you want to reverse that same animation to begin sliding in the opposite direction.
void QueuePlayAnimationTimeRange (UWidgetAnimation InAnimation, float32 StartAtTime=0.000000, float32 EndAtTime=0.000000, int NumLoopsToPlay=1, EUMGSequencePlayMode PlayMode=EUMGSequencePlayMode ::Forward, float32 PlaybackSpeed=1.000000, bool bRestoreState=false)
 Plays an animation in this widget a specified number of times stopping at a specified time.
void QueueStopAllAnimations ()
 Stop All actively running animations.
User Interface|Extension
UUserWidgetExtension AddExtension (TSubclassOf< UUserWidgetExtension > InExtensionType)
 Add the extension of the requested type.
void RemoveExtensions (TSubclassOf< UUserWidgetExtension > InExtensionType)
 Remove all extensions of the requested type.
void RemoveExtension (UUserWidgetExtension InExtension)
 Remove the extension.
TArray< UUserWidgetExtension > GetExtensions (TSubclassOf< UUserWidgetExtension > ExtensionType) const
 Find the extensions of the requested type.
UUserWidgetExtension GetExtension (TSubclassOf< UUserWidgetExtension > ExtensionType) const
 Find the first extension of the requested type.
Functions
void GetSlotNames (TArray< FName > &OutSlotNames) const
bool SetDesiredFocusWidget (FName WidgetName)
void GetAllWidgetsOfClass (TSubclassOf< UWidget > WidgetClass, TArray< UWidget > &OutWidgets, bool bIncludeDescendants=false) const
FName GetDesiredFocusWidgetName () const
UWidget GetDesiredFocusWidget () const
UWidget GetContentForSlot (FName SlotName) const
FText GetPaletteCategory () const
bool SetDesiredFocusWidget (UWidget Widget)
void GetAllWidgetsAndDescendants (TArray< UWidget > &OutWidgets) const
UWidget GetWidgetFromNameRecursive (FName Name) const
UWidget GetWidgetFromName (FName Name, TSubclassOf< UWidget > WidgetClass) const
void SetContentForSlot (FName SlotName, UWidget Content)
UWidget GetWidgetFromName (FName Name) const
void GetAllWidgets (TArray< UWidget > &Widgets) const
bool RemoveWidget (UWidget WidgetToRemove)
UWidget ConstructWidget (UClass WidgetClass, FName WidgetName=NAME_None)
void SetRootWidget (UWidget NewRootWidget)
UWidget GetRootWidget () const
void SetPaletteCategory (FText InPaletteCategory)
const FLinearColor & GetColorAndOpacity () const
 The color and opacity of this widget. Tints all child widgets.
const FSlateColor & GetForegroundColor () const
 The foreground color of the widget, this is inherited by sub widgets. Any color property that is marked as inherit will use this color.
const FMargin & GetPadding () const
 The padding area around the content.
const int & GetPriority () const
bool GetbIsFocusable () const
 Setting this flag to true, allows this widget to accept focus when clicked, or when navigated to.
void SetbIsFocusable (bool Value)
 Setting this flag to true, allows this widget to accept focus when clicked, or when navigated to.
bool GetbStopAction () const
Public Member Functions inherited from UWidget
bool IsInViewport () const
void RemoveFieldValueChangedDelegate (FFieldNotificationId FieldId, FFieldValueChangedDynamicDelegate Delegate=FFieldValueChangedDynamicDelegate())
void BroadcastFieldValueChanged (FFieldNotificationId FieldId)
void AddFieldValueChangedDelegate (FFieldNotificationId FieldId, FFieldValueChangedDynamicDelegate Delegate=FFieldValueChangedDynamicDelegate())
void SetbOverride_Cursor (bool Value)
void SetToolTipWidget (UWidget Widget)
 Tooltip widget to show when the user hovers over the widget with the mouse.
bool GetbIsEnabled () const
 Sets whether this widget can be modified interactively by the user.
void SetbIsEnabled (bool bInIsEnabled)
 Sets whether this widget can be modified interactively by the user.
const FWidgetTransform & GetRenderTransform ()
const FText & GetToolTipText () const
 Tooltip text to show when the user hovers over the widget with the mouse.
UWidget GetToolTipWidget () const
 Tooltip widget to show when the user hovers over the widget with the mouse.
const FVector2D & GetRenderTransformPivot () const
 The render transform pivot controls the location about which transforms are applied. This value is a normalized coordinate about which things like rotations will occur.
void GetChildWidgets (TArray< UWidget > &OutChildWidgets) const
void SetbOverrideAccessibleDefaults (bool Value)
 Override all of the default accessibility behavior and text for this widget.
void SetbCanChildrenBeAccessible (bool Value)
 Whether or not children of this widget can appear as distinct accessible widgets.
void SetAccessibleText (FText Value)
 When AccessibleBehavior is set to Custom, this is the text that will be used to describe the widget.
void SetAccessibleSummaryText (FText Value)
 When AccessibleSummaryBehavior is set to Custom, this is the text that will be used to describe the widget.
bool GetbIsVolatile () const
 If true prevents the widget or its child's geometry or layout information from being cached. If this widget changes every frame, but you want it to still be in an invalidation panel you should make it as volatile instead of invalidating it every frame, which would prevent the invalidation panel from actually ever caching anything.
void SetbIsVolatile (bool Value)
 If true prevents the widget or its child's geometry or layout information from being cached. If this widget changes every frame, but you want it to still be in an invalidation panel you should make it as volatile instead of invalidating it every frame, which would prevent the invalidation panel from actually ever caching anything.
const EMouseCursor & GetCursor () const
 The cursor to show when the mouse is over the widget.
const FGeometry & GetCachedGeometry () const
 Gets the last geometry used to Tick the widget. This data may not exist yet if this call happens prior to the widget having been ticked/painted, or it may be out of date, or a frame behind.
EWidgetClipping GetClipping () const
 Gets the clipping state of this widget.
FVector2D GetDesiredSize () const
 Gets the widgets desired size. NOTE: The underlying Slate widget must exist and be valid, also at least one pre-pass must have occurred before this value will be of any use.
FText GetAccessibleText () const
 Gets the accessible text from the underlying Slate accessible widget.
FText GetAccessibleSummaryText () const
 Gets the accessible summary text from the underlying Slate accessible widget.
UGameInstance GetGameInstance () const
 Gets the game instance associated with this UI.
ULocalPlayer GetOwningLocalPlayer () const
 Gets the local player associated with this UI.
APlayerController GetOwningPlayer () const
 Gets the player controller associated with this UI.
const FGeometry & GetPaintSpaceGeometry () const
UPanelWidget GetParent () const
 Gets the parent widget.
float32 GetRenderOpacity () const
 Gets the current visibility of the widget.
bool GetIsEnabled () const
 Gets the current enabled status of the widget.
void ForceVolatile (bool bForce)
 Sets the forced volatility of the widget.
ESlateVisibility GetVisibility () const
 Gets the current visibility of the widget.
bool HasAnyUserFocus () const
 Returns true if this widget is focused by any user.
bool HasFocusedDescendants () const
 Returns true if any descendant widget is focused by any user.
bool HasKeyboardFocus () const
 Checks to see if this widget currently has the keyboard focus.
bool HasMouseCapture () const
 Checks to see if this widget is the current mouse captor.
bool HasMouseCaptureByUser (int UserIndex, int PointerIndex=- 1) const
 Checks to see if this widget is the current mouse captor.
bool HasUserFocus (APlayerController PlayerController) const
 Returns true if this widget is focused by a specific user.
bool HasUserFocusedDescendants (APlayerController PlayerController) const
 Returns true if any descendant widget is focused by a specific user.
void InvalidateLayoutAndVolatility ()
 Invalidates the widget from the view of a layout caching widget that may own this widget. will force the owning widget to redraw and cache children on the next paint pass.
bool IsHovered () const
 Returns true if the widget is currently being hovered by a pointer device.
void ForceLayoutPrepass ()
 Forces a pre-pass. A pre-pass caches the desired size of the widget hierarchy owned by this widget. One pre-pass already happens for every widget before Tick occurs. You only need to perform another pre-pass if you are adding child widgets this frame and want them to immediately be visible this frame.
bool IsRendered () const
 Returns true if the widget is Visible, HitTestInvisible or SelfHitTestInvisible and the Render Opacity is greater than 0.
bool IsVisible () const
 Returns true if the widget is Visible, HitTestInvisible or SelfHitTestInvisible.
const FGeometry & GetTickSpaceGeometry () const
void SetClipping (EWidgetClipping InClipping)
 Sets the clipping state of this widget.
void SetNavigationRuleCustom (EUINavigation Direction, FCustomWidgetNavigationDelegate InCustomDelegate=FCustomWidgetNavigationDelegate())
 Sets the widget navigation rules for a specific direction. This can only be called on widgets that are in a widget tree. This works only for Custom Rule.
void RemoveFromParent ()
 Removes the widget from its parent widget. If this widget was added to the player's screen or the viewport it will also be removed from those containers.
void ResetCursor ()
 Resets the cursor to use on the widget, removing any customization for it.
void SetAllNavigationRules (EUINavigationRule Rule, FName WidgetToFocus)
 Sets the widget navigation rules for all directions. This can only be called on widgets that are in a widget tree.
void SetVisibility (ESlateVisibility InVisibility)
 Sets the visibility of the widget.
void SetCursor (EMouseCursor InCursor)
 Sets the cursor to show over the widget.
void SetFocus ()
 Sets the focus to this widget for the owning user.
void SetIsEnabled (bool bInIsEnabled)
 Sets the current enabled status of the widget.
void SetKeyboardFocus ()
 Sets the focus to this widget.
void SetNavigationRule (EUINavigation Direction, EUINavigationRule Rule, FName WidgetToFocus)
void SetNavigationRuleBase (EUINavigation Direction, EUINavigationRule Rule)
 Sets the widget navigation rules for a specific direction. This can only be called on widgets that are in a widget tree. This works only for non Explicit, non Custom and non CustomBoundary Rules.
void SetUserFocus (APlayerController PlayerController)
 Sets the focus to this widget for a specific user (if setting focus for the owning user, prefer SetFocus()).
void SetNavigationRuleCustomBoundary (EUINavigation Direction, FCustomWidgetNavigationDelegate InCustomDelegate=FCustomWidgetNavigationDelegate())
 Sets the widget navigation rules for a specific direction. This can only be called on widgets that are in a widget tree. This works only for CustomBoundary Rule.
void SetNavigationRuleExplicit (EUINavigation Direction, UWidget InWidget)
 Sets the widget navigation rules for a specific direction. This can only be called on widgets that are in a widget tree. This works only for Explicit Rule.
void SetRenderOpacity (float32 InOpacity)
 Sets the visibility of the widget.
void SetToolTip (UWidget Widget)
 Sets a custom widget as the tooltip of the widget.
void SetToolTipText (FText InToolTipText)
 Sets the tooltip text for the widget.
void SetRenderTransformAngle (float32 Angle)
void SetRenderTransformPivot (FVector2D Pivot)
float32 GetRenderTransformAngle () const
void SetRenderTransform (FWidgetTransform InTransform)
void SetRenderShear (FVector2D Shear)
void SetRenderScale (FVector2D Scale)
void SetRenderTranslation (FVector2D Translation)
Public Member Functions inherited from UObject
bool MarkPackageDirty () const
void RemoveFromRoot ()
bool GetIsRooted () const
bool IsTransient () const
bool Modify (bool bAlwaysMarkDirty=true)
void SetTransactional (bool bTransactional)
bool IsSupportedForNetworking () const
UClass GetClass () const
UObject GetOuter () const
UObject GetTypedOuter (TSubclassOf< UObject > Target) const
 Traverses the outer chain searching for the next object of a certain type.
UPackage GetOutermost () const
UPackage GetPackage () const
void AddToRoot ()
UWorld GetWorld () const
FName GetName () const
FString GetFullName (const UObject StopOuter=nullptr) const
FString GetPathName (const UObject StopOuter=nullptr) const
bool IsA (const UClass Class) const
 Returns true if this object is of the specified type, or a child of that type.
void SaveConfig ()
void LoadConfig ()
void ReloadConfig ()
void CopyScriptPropertiesFrom (const UObject OtherObject)
void opCast (?&Address) const
FString ToString () const

Static Public Member Functions

Static Functions
static UClass StaticClass ()
Static Public Member Functions inherited from UWidget
static UClass StaticClass ()
Static Public Member Functions inherited from UVisual
static UClass StaticClass ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Public Attributes

Appearance|Event
FOnVisibilityChangedEvent OnVisibilityChanged
 Called when the visibility has changed.
Designer
UTexture2D PreviewBackground
 A preview background that you can use when designing the UI to get a sense of scale on the screen. Use a texture with a screenshot of your game in it, for example if you were designing a HUD.
Interaction
UWidget DesiredFocusWidget
bool bIsFocusable
 Setting this flag to true, allows this widget to accept focus when clicked, or when navigated to.
Performance
EWidgetTickFrequency TickFrequency
 This widget is allowed to tick. If this is unchecked tick will never be called, animations will not play correctly, and latent actions will not execute. Uncheck this for performance reasons only.
Variables
UWidget RootWidget
FText PaletteCategory
 The category this widget appears in the palette.
const FName DesiredFocusWidgetName
Public Attributes inherited from UWidget
FText AccessibleSummaryText
 When AccessibleSummaryBehavior is set to Custom, this is the text that will be used to describe the widget.
FText AccessibleText
 When AccessibleBehavior is set to Custom, this is the text that will be used to describe the widget.
ESlateAccessibleBehavior AccessibleBehavior
 Whether or not the widget is accessible, and how to describe it. If set to custom, additional customization options will appear.
ESlateAccessibleBehavior AccessibleSummaryBehavior
 How to describe this widget when it's being presented through a summary of a parent widget. If set to custom, additional customization options will appear.
EMouseCursor Cursor
 The cursor to show when the mouse is over the widget.
FText ToolTipText
 Tooltip text to show when the user hovers over the widget with the mouse.
UWidget ToolTipWidget
 Tooltip widget to show when the user hovers over the widget with the mouse.
bool bIsEnabled
 Sets whether this widget can be modified interactively by the user.
ESlateVisibility Visibility
 The visibility of the widget.
UPanelSlot Slot
 The parent slot of the UWidget. Allows us to easily inline edit the layout controlling this widget.
EFlowDirectionPreference FlowDirectionPreference
 Allows you to set a new flow direction.
UWidgetNavigation Navigation
 The navigation object for this widget is optionally created if the user has configured custom navigation rules for this widget in the widget designer. Those rules determine how navigation transitions can occur between widgets.
bool bIsVolatile
 If true prevents the widget or its child's geometry or layout information from being cached. If this widget changes every frame, but you want it to still be in an invalidation panel you should make it as volatile instead of invalidating it every frame, which would prevent the invalidation panel from actually ever caching anything.
FVector2D RenderTransformPivot
 The render transform pivot controls the location about which transforms are applied. This value is a normalized coordinate about which things like rotations will occur.
FWidgetTransform RenderTransform
 The render transform of the widget allows for arbitrary 2D transforms to be applied to the widget.
EWidgetPixelSnapping PixelSnapping
 If the widget will draw snapped to the nearest pixel. Improves clarity but might cause visibile stepping in animation.
EWidgetClipping Clipping
 Controls how the clipping behavior of this widget. Normally content that overflows the bounds of the widget continues rendering. Enabling clipping prevents that overflowing content from being seen.
float32 RenderOpacity
 The opacity of the widget.
const FGeometry CachedGeometry
 Gets the last geometry used to Tick the widget. This data may not exist yet if this call happens prior to the widget having been ticked/painted, or it may be out of date, or a frame behind.
const FGeometry PaintSpaceGeometry
const UGameInstance GameInstance
 Gets the game instance associated with this UI.
const UPanelWidget Parent
 Gets the parent widget.
const FVector2D DesiredSize
 Gets the widgets desired size. NOTE: The underlying Slate widget must exist and be valid, also at least one pre-pass must have occurred before this value will be of any use.
const FGeometry TickSpaceGeometry
bool IsEnabled
 Gets the current enabled status of the widget.
const ULocalPlayer OwningLocalPlayer
 Gets the local player associated with this UI.
const APlayerController OwningPlayer
 Gets the player controller associated with this UI.
float32 RenderTransformAngle
Public Attributes inherited from UObject
const UClass Class
const UObject Outer
const UPackage Outermost
const UPackage Package
const UWorld World
const FName Name
const bool IsRooted

Appearance

FLinearColor ColorAndOpacity
 The color and opacity of this widget. Tints all child widgets.
FSlateColor ForegroundColor
 The foreground color of the widget, this is inherited by sub widgets. Any color property that is marked as inherit will use this color.
FMargin Padding
 The padding area around the content.
void SetPadding (FMargin InPadding)
 Sets the padding for the user widget, putting a larger gap between the widget border and it's root widget.
void SetColorAndOpacity (FLinearColor InColorAndOpacity)
 Sets the tint of the widget, this affects all child widgets.
void SetForegroundColor (FSlateColor InForegroundColor)
 Sets the foreground color of the widget, this is inherited by sub widgets. Any color property that is marked as inherit will use this color.

Input

bool bStopAction
int Priority
void SetInputActionPriority (int NewPriority)
void SetInputActionBlocking (bool bShouldBlock)
void SetPriority (int NewPriority)
void StopListeningForInputAction (FName ActionName, EInputEvent EventType)
 Removes the binding for a particular action's callback.
void UnregisterInputComponent ()
 StopListeningForAllInputActions will automatically Register an Input Component with the player input system. If you however, want to Pause and Resume, listening for a set of actions, the best way is to use UnregisterInputComponent to pause, and RegisterInputComponent to resume listening.
bool IsListeningForInputAction (FName ActionName) const
 Checks if the action has a registered callback with the input component.
void RegisterInputComponent ()
 ListenForInputAction will automatically Register an Input Component with the player input system. If you however, want to Pause and Resume, listening for a set of actions, the best way is to use UnregisterInputComponent to pause, and RegisterInputComponent to resume listening.
FEventReply OnFocusReceived (FGeometry MyGeometry, FFocusEvent InFocusEvent)
 Called when keyboard focus is given to this widget. This event does not bubble.
void OnFocusLost (FFocusEvent InFocusEvent)
 Called when this widget loses focus. This event does not bubble.
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).
FEventReply OnKeyChar (FGeometry MyGeometry, FCharacterEvent InCharacterEvent)
 Called after a character is entered while this widget has focus.
void StopListeningForAllInputActions ()
 Stops listening to all input actions, and unregisters the input component with the player controller.
void SetbStopAction (bool bShouldBlock)
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.
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.
FEventReply OnKeyUp (FGeometry MyGeometry, FKeyEvent InKeyEvent)
 Called after a key (keyboard, controller, ...) is released when this widget has focus.
FEventReply OnAnalogValueChanged (FGeometry MyGeometry, FAnalogInputEvent InAnalogInputEvent)
 Called when an analog value changes on a button that supports analog.
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.
void ListenForInputAction (FName ActionName, EInputEvent EventType, bool bConsume, FOnInputAction Callback=FOnInputAction())
 Listens for a particular Player Input Action by name. This requires that those actions are being executed, and that we're not currently in UI-Only Input Mode.

Player

const APawn OwningPlayerPawn
 Gets the player pawn associated with this UI.
const APlayerCameraManager OwningPlayerCameraManager
 Gets the player camera manager associated with this UI.
void SetOwningPlayer (APlayerController LocalPlayerController)
 Sets the local player associated with this UI via PlayerController reference.
APlayerCameraManager GetOwningPlayerCameraManager () const
 Gets the player camera manager associated with this UI.
APawn GetOwningPlayerPawn () const
 Gets the player pawn associated with this UI.

User Interface|Viewport

FVector2D AlignmentInViewport
FAnchors AnchorsInViewport
FAnchors GetAnchorsInViewport () const
void RemoveFromViewport ()
void SetAlignmentInViewport (FVector2D Alignment)
void SetAnchorsInViewport (FAnchors Anchors)
FVector2D GetAlignmentInViewport () const
bool AddToPlayerScreen (int ZOrder=0)
 Adds the widget to the game's viewport in a section dedicated to the player. This is valuable in a split screen game where you need to only show a widget over a player's portion of the viewport.
void SetDesiredSizeInViewport (FVector2D Size)
void SetPositionInViewport (FVector2D Position, bool bRemoveDPIScale=true)
 Sets the widgets position in the viewport.
void AddToViewport (int ZOrder=0)
 Adds it to the game's viewport and fills the entire screen, unless SetDesiredSizeInViewport is called to explicitly set the size.

Detailed Description

A widget that enables UI extensibility through WidgetBlueprint.

Member Function Documentation

◆ AddExtension()

UUserWidgetExtension AddExtension ( TSubclassOf< UUserWidgetExtension > InExtensionType)

Add the extension of the requested type.

◆ AddToPlayerScreen()

bool AddToPlayerScreen ( int ZOrder = 0)

Adds the widget to the game's viewport in a section dedicated to the player. This is valuable in a split screen game where you need to only show a widget over a player's portion of the viewport.

Parameters
ZOrderThe higher the number, the more on top this widget will be.

◆ AddToViewport()

void AddToViewport ( int ZOrder = 0)

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

Parameters
ZOrderThe higher the number, the more on top this widget will be.

◆ BindToAnimationEvent()

void BindToAnimationEvent ( UWidgetAnimation Animation,
FWidgetAnimationDynamicEvent Delegate,
EWidgetAnimationEvent AnimationEvent,
FName UserTag = NAME_None )

Allows binding to a specific animation's event.

Parameters
Animationthe animation to listen for starting or finishing.
Delegatethe delegate to call when the animation's state changes
AnimationEventthe event to watch for.
UserTagScopes the delegate to only be called when the animation completes with a specific tag set on it when it was played.

◆ BindToAnimationFinished()

void BindToAnimationFinished ( UWidgetAnimation Animation,
FWidgetAnimationDynamicEvent Delegate = FWidgetAnimationDynamicEvent ( ) )

Bind an animation finished delegate.

Parameters
Animationthe animation to listen for starting or finishing.
Delegatethe delegate to call when the animation's state changes

◆ BindToAnimationStarted()

void BindToAnimationStarted ( UWidgetAnimation Animation,
FWidgetAnimationDynamicEvent Delegate = FWidgetAnimationDynamicEvent ( ) )

Bind an animation started delegate.

Parameters
Animationthe animation to listen for starting or finishing.
Delegatethe delegate to call when the animation's state changes

◆ CancelLatentActions()

void CancelLatentActions ( )

Cancels any pending Delays or timer callbacks for this widget.

◆ Construct()

void Construct ( )

Called after the underlying slate widget is constructed. Depending on how the slate object is used this event may be called multiple times due to adding and removing from the hierarchy. If you need a true called-once-when-created event, use OnInitialized.

◆ ConstructWidget()

UWidget ConstructWidget ( UClass WidgetClass,
FName WidgetName = NAME_None )

◆ Destruct()

void Destruct ( )

Called when a widget is no longer referenced causing the slate resource to destroyed. Just like Construct this event can be called multiple times.

◆ FlushAnimations()

void FlushAnimations ( )

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

◆ GetAlignmentInViewport()

FVector2D GetAlignmentInViewport ( ) const

◆ GetAllWidgets()

void GetAllWidgets ( TArray< UWidget > & Widgets) const

◆ GetAllWidgetsAndDescendants()

void GetAllWidgetsAndDescendants ( TArray< UWidget > & OutWidgets) const

◆ GetAllWidgetsOfClass()

void GetAllWidgetsOfClass ( TSubclassOf< UWidget > WidgetClass,
TArray< UWidget > & OutWidgets,
bool bIncludeDescendants = false ) const

◆ GetAnchorsInViewport()

FAnchors GetAnchorsInViewport ( ) const

◆ GetAnimationCurrentTime()

float32 GetAnimationCurrentTime ( const UWidgetAnimation InAnimation) const

Gets the current time of the animation in this widget.

Returns
the current time of the animation.

◆ GetbIsFocusable()

bool GetbIsFocusable ( ) const

Setting this flag to true, allows this widget to accept focus when clicked, or when navigated to.

◆ GetbStopAction()

bool GetbStopAction ( ) const

◆ GetColorAndOpacity()

const FLinearColor & GetColorAndOpacity ( ) const

The color and opacity of this widget. Tints all child widgets.

◆ GetContentForSlot()

UWidget GetContentForSlot ( FName SlotName) const

◆ GetDesiredFocusWidget()

UWidget GetDesiredFocusWidget ( ) const

◆ GetDesiredFocusWidgetName()

FName GetDesiredFocusWidgetName ( ) const

◆ GetExtension()

UUserWidgetExtension GetExtension ( TSubclassOf< UUserWidgetExtension > ExtensionType) const

Find the first extension of the requested type.

◆ GetExtensions()

TArray< UUserWidgetExtension > GetExtensions ( TSubclassOf< UUserWidgetExtension > ExtensionType) const

Find the extensions of the requested type.

◆ GetForegroundColor()

const FSlateColor & GetForegroundColor ( ) const

The foreground color of the widget, this is inherited by sub widgets. Any color property that is marked as inherit will use this color.

◆ GetOwningPlayerCameraManager()

APlayerCameraManager GetOwningPlayerCameraManager ( ) const

Gets the player camera manager associated with this UI.

Returns
Gets the owning player camera manager that's owned by the player controller assigned to this widget.

◆ GetOwningPlayerPawn()

APawn GetOwningPlayerPawn ( ) const

Gets the player pawn associated with this UI.

Returns
Gets the owning player pawn that's owned by the player controller assigned to this widget.

◆ GetPadding()

const FMargin & GetPadding ( ) const

The padding area around the content.

◆ GetPaletteCategory()

FText GetPaletteCategory ( ) const

◆ GetPriority()

const int & GetPriority ( ) const

◆ GetRootWidget()

UWidget GetRootWidget ( ) const

◆ GetSlotNames()

void GetSlotNames ( TArray< FName > & OutSlotNames) const

◆ GetWidgetFromName() [1/2]

UWidget GetWidgetFromName ( FName Name) const

◆ GetWidgetFromName() [2/2]

UWidget GetWidgetFromName ( FName Name,
TSubclassOf< UWidget > WidgetClass ) const

◆ GetWidgetFromNameRecursive()

UWidget GetWidgetFromNameRecursive ( FName Name) const

◆ IsAnimationPlaying()

bool IsAnimationPlaying ( const UWidgetAnimation InAnimation) const

Gets whether an animation is currently playing on this widget.

Parameters
InAnimationThe animation to check the playback status of
Returns
True if the animation is currently playing

◆ IsAnimationPlayingForward()

bool IsAnimationPlayingForward ( const UWidgetAnimation InAnimation)

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

Parameters
InAnimationThe playing animation that we want to know about

◆ IsAnyAnimationPlaying()

bool IsAnyAnimationPlaying ( ) const
Returns
True if any animation is currently playing

◆ IsInteractable()

bool IsInteractable ( ) const

Gets a value indicating if the widget is interactive.

◆ IsListeningForInputAction()

bool IsListeningForInputAction ( FName ActionName) const

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

◆ IsPlayingAnimation()

bool IsPlayingAnimation ( ) const

Are we currently playing any animations?

◆ ListenForInputAction()

void ListenForInputAction ( FName ActionName,
EInputEvent EventType,
bool bConsume,
FOnInputAction Callback = FOnInputAction ( ) )

Listens for a particular Player Input Action by name. This requires that those actions are being executed, and that we're not currently in UI-Only Input Mode.

◆ OnAddedToFocusPath()

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.

Parameters
InFocusEventFocusEvent

◆ OnAnalogValueChanged()

FEventReply OnAnalogValueChanged ( FGeometry MyGeometry,
FAnalogInputEvent InAnalogInputEvent )

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

Parameters
MyGeometryThe Geometry of the widget receiving the event
InAnalogInputEventAnalog Event
Returns
Returns whether the event was handled, along with other possible actions

◆ OnAnimationFinished()

void OnAnimationFinished ( const UWidgetAnimation Animation)

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

Parameters
AnimationThe animation that has finished playing

◆ OnAnimationStarted()

void OnAnimationStarted ( const UWidgetAnimation Animation)

Called when an animation is started.

Parameters
Animationthe animation that started

◆ OnDragCancelled()

void OnDragCancelled ( 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.

Parameters
PointerEventLast mouse event from when the drag was canceled.
OperationThe drag operation that was canceled.

◆ OnDragDetected()

void OnDragDetected ( FGeometry MyGeometry,
FPointerEvent PointerEvent,
UDragDropOperation & Operation )

Called when Slate detects that a widget started to be dragged.

Parameters
PointerEventMouseMove that triggered the drag
OperationThe drag operation that was detected.

◆ OnDragEnter()

void OnDragEnter ( FGeometry MyGeometry,
FPointerEvent PointerEvent,
UDragDropOperation Operation )

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

Parameters
MyGeometryThe geometry of the widget receiving the event.
PointerEventThe mouse event from when the drag entered the widget.
OperationThe drag operation that entered the widget.

◆ OnDragLeave()

void OnDragLeave ( FPointerEvent PointerEvent,
UDragDropOperation Operation )

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

Parameters
PointerEventThe mouse event from when the drag left the widget.
OperationThe drag operation that entered the widget.

◆ OnDragOver()

bool OnDragOver ( FGeometry MyGeometry,
FPointerEvent PointerEvent,
UDragDropOperation Operation )

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

Parameters
MyGeometryThe geometry of the widget receiving the event.
PointerEventThe mouse event from when the drag occurred over the widget.
OperationThe drag operation over the widget.
Returns
'true' to indicate that you handled the drag over operation. Returning 'false' will cause the operation to continue to bubble up.

◆ OnDrop()

bool OnDrop ( FGeometry MyGeometry,
FPointerEvent PointerEvent,
UDragDropOperation Operation )

Called when the user is dropping something onto a widget. Ends the drag and drop operation, even if no widget handles this.

Parameters
MyGeometryThe geometry of the widget receiving the event.
PointerEventThe mouse event from when the drag occurred over the widget.
OperationThe drag operation over the widget.
Returns
'true' to indicate you handled the drop operation.

◆ OnFocusLost()

void OnFocusLost ( FFocusEvent InFocusEvent)

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

Parameters
InFocusEventFocusEvent

◆ OnFocusReceived()

FEventReply OnFocusReceived ( FGeometry MyGeometry,
FFocusEvent InFocusEvent )

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

Parameters
MyGeometryThe Geometry of the widget receiving the event
InFocusEventFocusEvent
Returns
Returns whether the event was handled, along with other possible actions

◆ OnInitialized()

void OnInitialized ( )

Called once only at game time on non-template instances. While Construct/Destruct pertain to the underlying Slate, this is called only once for the UUserWidget. If you have one-time things to establish up-front (like binding callbacks to events on BindWidget properties), do so here.

◆ OnKeyChar()

FEventReply OnKeyChar ( FGeometry MyGeometry,
FCharacterEvent InCharacterEvent )

Called after a character is entered while this widget has focus.

Parameters
MyGeometryThe Geometry of the widget receiving the event
InCharacterEventCharacter event
Returns
Returns whether the event was handled, along with other possible actions

◆ OnKeyDown()

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).

Parameters
MyGeometryThe Geometry of the widget receiving the event
InKeyEventKey event
Returns
Returns whether the event was handled, along with other possible actions

◆ OnKeyUp()

FEventReply OnKeyUp ( FGeometry MyGeometry,
FKeyEvent InKeyEvent )

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

Parameters
MyGeometryThe Geometry of the widget receiving the event
InKeyEventKey event
Returns
Returns whether the event was handled, along with other possible actions

◆ OnMotionDetected()

FEventReply OnMotionDetected ( FGeometry MyGeometry,
FMotionEvent InMotionEvent )

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

Parameters
MyGeometryThe geometry of the widget receiving the event.

◆ OnMouseButtonDoubleClick()

FEventReply OnMouseButtonDoubleClick ( FGeometry InMyGeometry,
FPointerEvent InMouseEvent )

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

Parameters
InMyGeometryWidget geometry
InMouseEventMouse button event
Returns
Returns whether the event was handled, along with other possible actions

◆ OnMouseButtonDown()

FEventReply OnMouseButtonDown ( FGeometry MyGeometry,
FPointerEvent MouseEvent )

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

Parameters
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
Returns
Whether the event was handled along with possible requests for the system to take action.

◆ OnMouseButtonUp()

FEventReply OnMouseButtonUp ( FGeometry MyGeometry,
FPointerEvent MouseEvent )

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

Parameters
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
Returns
Whether the event was handled along with possible requests for the system to take action.

◆ OnMouseCaptureLost()

void OnMouseCaptureLost ( )

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

◆ OnMouseEnter()

void OnMouseEnter ( FGeometry MyGeometry,
FPointerEvent MouseEvent )

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

Parameters
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event

◆ OnMouseLeave()

void OnMouseLeave ( FPointerEvent MouseEvent)

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

Parameters
MouseEventInformation about the input event

◆ OnMouseMove()

FEventReply OnMouseMove ( FGeometry MyGeometry,
FPointerEvent MouseEvent )

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

Parameters
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
Returns
Whether the event was handled along with possible requests for the system to take action.

◆ OnMouseWheel()

FEventReply OnMouseWheel ( FGeometry MyGeometry,
FPointerEvent MouseEvent )

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

Parameters
MouseEventMouse event
Returns
Returns whether the event was handled, along with other possible actions

◆ OnPaint()

void OnPaint ( FPaintContext & Context) const

◆ OnPreviewKeyDown()

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.

This event is primarily to allow parent widgets to consume an event before a child widget processes it and it should be used only when there is no better design alternative.

Parameters
MyGeometryThe Geometry of the widget receiving the event
InKeyEventKey event
Returns
Returns whether the event was handled, along with other possible actions

◆ OnPreviewMouseButtonDown()

FEventReply OnPreviewMouseButtonDown ( FGeometry MyGeometry,
FPointerEvent MouseEvent )

Just like OnMouseButtonDown, but tunnels instead of bubbling. If this event is handled, OnMouseButtonDown will not be sent.

Use this event sparingly as preview events generally make UIs more difficult to reason about.

Parameters
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
Returns
Whether the event was handled along with possible requests for the system to take action.

◆ OnRemovedFromFocusPath()

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.

Parameters
InFocusEventFocusEvent

◆ OnTouchEnded()

FEventReply OnTouchEnded ( FGeometry MyGeometry,
FPointerEvent InTouchEvent )

Called when a touchpad touch is ended (finger lifted).

Parameters
MyGeometryThe geometry of the widget receiving the event.
InTouchEventThe touch event generated

◆ OnTouchForceChanged()

FEventReply OnTouchForceChanged ( FGeometry MyGeometry,
FPointerEvent InTouchEvent )

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

Parameters
MyGeometryThe geometry of the widget receiving the event.
InTouchEventThe touch event generated

◆ OnTouchGesture()

FEventReply OnTouchGesture ( FGeometry MyGeometry,
FPointerEvent GestureEvent )

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

Parameters
MyGeometryThe geometry of the widget receiving the event.
GestureEventgesture event
Returns
Returns whether the event was handled, along with other possible actions

◆ OnTouchMoved()

FEventReply OnTouchMoved ( FGeometry MyGeometry,
FPointerEvent InTouchEvent )

Called when a touchpad touch is moved (finger moved).

Parameters
MyGeometryThe geometry of the widget receiving the event.
InTouchEventThe touch event generated

◆ OnTouchStarted()

FEventReply OnTouchStarted ( FGeometry MyGeometry,
FPointerEvent InTouchEvent )

Called when a touchpad touch is started (finger down).

Parameters
MyGeometryThe geometry of the widget receiving the event.
InTouchEventThe touch event generated

◆ PauseAnimation()

float32 PauseAnimation ( const UWidgetAnimation InAnimation)

Pauses an already running animation in this widget.

Returns
the time point the animation was at when it was paused, relative to its start position. Use this as the StartAtTime when you trigger PlayAnimation.

◆ PlayAnimation()

UUMGSequencePlayer PlayAnimation ( UWidgetAnimation InAnimation,
float32 StartAtTime = 0.000000,
int NumLoopsToPlay = 1,
EUMGSequencePlayMode PlayMode = EUMGSequencePlayMode :: Forward,
float32 PlaybackSpeed = 1.000000,
bool bRestoreState = false )

Plays an animation in this widget a specified number of times.

Parameters
InAnimationThe animation to play
StartAtTimeThe time in the animation from which to start playing, relative to the start position. For looped animations, this will only affect the first playback of the animation.
NumLoopsToPlayThe number of times to loop this animation (0 to loop indefinitely)
PlayModeSpecifies the playback mode
PlaybackSpeedThe speed at which the animation should play
bRestoreStateRestores widgets to their pre-animated state when the animation stops

◆ PlayAnimationForward()

UUMGSequencePlayer PlayAnimationForward ( UWidgetAnimation InAnimation,
float32 PlaybackSpeed = 1.000000,
bool bRestoreState = false )

Plays an animation on this widget relative to it's current state forward. You should use this version in situations where say a user can click a button and that causes a panel to slide out, and you want to reverse that same animation to begin sliding in the opposite direction.

Parameters
InAnimationThe animation to play
PlaybackSpeedThe speed at which the animation should play
bRestoreStateRestores widgets to their pre-animated state when the animation stops

◆ PlayAnimationReverse()

UUMGSequencePlayer PlayAnimationReverse ( UWidgetAnimation InAnimation,
float32 PlaybackSpeed = 1.000000,
bool bRestoreState = false )

Plays an animation on this widget relative to it's current state in reverse. You should use this version in situations where say a user can click a button and that causes a panel to slide out, and you want to reverse that same animation to begin sliding in the opposite direction.

Parameters
InAnimationThe animation to play
PlaybackSpeedThe speed at which the animation should play
bRestoreStateRestores widgets to their pre-animated state when the animation stops

◆ PlayAnimationTimeRange()

UUMGSequencePlayer PlayAnimationTimeRange ( UWidgetAnimation InAnimation,
float32 StartAtTime = 0.000000,
float32 EndAtTime = 0.000000,
int NumLoopsToPlay = 1,
EUMGSequencePlayMode PlayMode = EUMGSequencePlayMode :: Forward,
float32 PlaybackSpeed = 1.000000,
bool bRestoreState = false )

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

Parameters
InAnimationThe animation to play
StartAtTimeThe time in the animation from which to start playing, relative to the start position. For looped animations, this will only affect the first playback of the animation.
EndAtTimeThe absolute time in the animation where to stop, this is only considered in the last loop.
NumLoopsToPlayThe number of times to loop this animation (0 to loop indefinitely)
PlayModeSpecifies the playback mode
PlaybackSpeedThe speed at which the animation should play
bRestoreStateRestores widgets to their pre-animated state when the animation stops

◆ PlaySound()

void PlaySound ( USoundBase SoundToPlay)

Plays a sound through the UI.

◆ PreConstruct()

void PreConstruct ( bool IsDesignTime)

Called by both the game and the editor. Allows users to run initial setup for their widgets to better preview the setup in the designer and since generally that same setup code is required at runtime, it's called there as well.

WARNING** This is intended purely for cosmetic updates using locally owned data, you can not safely access any game related state, if you call something that doesn't expect to be run at editor time, you may crash the editor.

In the event you save the asset with blueprint code that causes a crash on evaluation. You can turn off PreConstruct evaluation in the Widget Designer settings in the Editor Preferences.

◆ QueuePauseAnimation()

float32 QueuePauseAnimation ( const UWidgetAnimation InAnimation)

Pauses an already running animation in this widget.

Returns
the time point the animation was at when it was paused, relative to its start position. Use this as the StartAtTime when you trigger PlayAnimation.

◆ QueuePlayAnimation()

void QueuePlayAnimation ( UWidgetAnimation InAnimation,
float32 StartAtTime = 0.000000,
int NumLoopsToPlay = 1,
EUMGSequencePlayMode PlayMode = EUMGSequencePlayMode :: Forward,
float32 PlaybackSpeed = 1.000000,
bool bRestoreState = false )

Plays an animation in this widget a specified number of times.

Parameters
InAnimationThe animation to play
StartAtTimeThe time in the animation from which to start playing, relative to the start position. For looped animations, this will only affect the first playback of the animation.
NumLoopsToPlayThe number of times to loop this animation (0 to loop indefinitely)
PlayModeSpecifies the playback mode
PlaybackSpeedThe speed at which the animation should play
bRestoreStateRestores widgets to their pre-animated state when the animation stops

◆ QueuePlayAnimationForward()

void QueuePlayAnimationForward ( UWidgetAnimation InAnimation,
float32 PlaybackSpeed = 1.000000,
bool bRestoreState = false )

Plays an animation on this widget relative to it's current state forward. You should use this version in situations where say a user can click a button and that causes a panel to slide out, and you want to reverse that same animation to begin sliding in the opposite direction.

Parameters
InAnimationThe animation to play
PlaybackSpeedThe speed at which the animation should play
bRestoreStateRestores widgets to their pre-animated state when the animation stops

◆ QueuePlayAnimationReverse()

void QueuePlayAnimationReverse ( UWidgetAnimation InAnimation,
float32 PlaybackSpeed = 1.000000,
bool bRestoreState = false )

Plays an animation on this widget relative to it's current state in reverse. You should use this version in situations where say a user can click a button and that causes a panel to slide out, and you want to reverse that same animation to begin sliding in the opposite direction.

Parameters
InAnimationThe animation to play
PlaybackSpeedThe speed at which the animation should play
bRestoreStateRestores widgets to their pre-animated state when the animation stops

◆ QueuePlayAnimationTimeRange()

void QueuePlayAnimationTimeRange ( UWidgetAnimation InAnimation,
float32 StartAtTime = 0.000000,
float32 EndAtTime = 0.000000,
int NumLoopsToPlay = 1,
EUMGSequencePlayMode PlayMode = EUMGSequencePlayMode :: Forward,
float32 PlaybackSpeed = 1.000000,
bool bRestoreState = false )

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

Parameters
InAnimationThe animation to play
StartAtTimeThe time in the animation from which to start playing, relative to the start position. For looped animations, this will only affect the first playback of the animation.
EndAtTimeThe absolute time in the animation where to stop, this is only considered in the last loop.
NumLoopsToPlayThe number of times to loop this animation (0 to loop indefinitely)
PlayModeSpecifies the playback mode
PlaybackSpeedThe speed at which the animation should play
bRestoreStateRestores widgets to their pre-animated state when the animation stops

◆ QueueStopAllAnimations()

void QueueStopAllAnimations ( )

Stop All actively running animations.

◆ QueueStopAnimation()

void QueueStopAnimation ( const UWidgetAnimation InAnimation)

Stops an already running animation in this widget.

◆ RegisterInputComponent()

void RegisterInputComponent ( )

ListenForInputAction will automatically Register an Input Component with the player input system. If you however, want to Pause and Resume, listening for a set of actions, the best way is to use UnregisterInputComponent to pause, and RegisterInputComponent to resume listening.

◆ RemoveExtension()

void RemoveExtension ( UUserWidgetExtension InExtension)

Remove the extension.

◆ RemoveExtensions()

void RemoveExtensions ( TSubclassOf< UUserWidgetExtension > InExtensionType)

Remove all extensions of the requested type.

◆ RemoveFromViewport()

void RemoveFromViewport ( )

◆ RemoveWidget()

bool RemoveWidget ( UWidget WidgetToRemove)

◆ ReverseAnimation()

void ReverseAnimation ( const UWidgetAnimation InAnimation)

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

Parameters
InAnimationThe playing animation that we want to reverse

◆ SetAlignmentInViewport()

void SetAlignmentInViewport ( FVector2D Alignment)

◆ SetAnchorsInViewport()

void SetAnchorsInViewport ( FAnchors Anchors)

◆ SetAnimationCurrentTime()

void SetAnimationCurrentTime ( const UWidgetAnimation InAnimation,
float32 InTime )

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

◆ SetbIsFocusable()

void SetbIsFocusable ( bool Value)

Setting this flag to true, allows this widget to accept focus when clicked, or when navigated to.

◆ SetbStopAction()

void SetbStopAction ( bool bShouldBlock)

◆ SetColorAndOpacity()

void SetColorAndOpacity ( FLinearColor InColorAndOpacity)

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

Parameters
InColorAndOpacityThe tint to apply to all child widgets.

◆ SetContentForSlot()

void SetContentForSlot ( FName SlotName,
UWidget Content )

◆ SetDesiredFocusWidget() [1/2]

bool SetDesiredFocusWidget ( FName WidgetName)

◆ SetDesiredFocusWidget() [2/2]

bool SetDesiredFocusWidget ( UWidget Widget)

◆ SetDesiredSizeInViewport()

void SetDesiredSizeInViewport ( FVector2D Size)

◆ SetForegroundColor()

void SetForegroundColor ( FSlateColor InForegroundColor)

Sets the foreground color of the widget, this is inherited by sub widgets. Any color property that is marked as inherit will use this color.

Parameters
InForegroundColorThe foreground color.

◆ SetInputActionBlocking()

void SetInputActionBlocking ( bool bShouldBlock)

◆ SetInputActionPriority()

void SetInputActionPriority ( int NewPriority)

◆ SetNumLoopsToPlay()

void SetNumLoopsToPlay ( const UWidgetAnimation InAnimation,
int NumLoopsToPlay )

Changes the number of loops to play given a playing animation.

Parameters
InAnimationThe animation that is already playing
NumLoopsToPlayThe number of loops to play. (0 to loop indefinitely)

◆ SetOwningPlayer()

void SetOwningPlayer ( APlayerController LocalPlayerController)

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

Parameters
LocalPlayerControllerThe PlayerController of the local player you want to be the conceptual owner of this UI.

◆ SetPadding()

void SetPadding ( FMargin InPadding)

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

◆ SetPaletteCategory()

void SetPaletteCategory ( FText InPaletteCategory)

◆ SetPlaybackSpeed()

void SetPlaybackSpeed ( const UWidgetAnimation InAnimation,
float32 PlaybackSpeed = 1.000000 )

Changes the playback rate of a playing animation.

Parameters
InAnimationThe animation that is already playing

◆ SetPositionInViewport()

void SetPositionInViewport ( FVector2D Position,
bool bRemoveDPIScale = true )

Sets the widgets position in the viewport.

Parameters
PositionThe 2D position to set the widget to in the viewport.
bRemoveDPIScaleIf you've already calculated inverse DPI, set this to false. Otherwise inverse DPI is applied to the position so that when the location is scaled by DPI, it ends up in the expected position.

◆ SetPriority()

void SetPriority ( int NewPriority)

◆ SetRootWidget()

void SetRootWidget ( UWidget NewRootWidget)

◆ StaticClass()

UClass StaticClass ( )
static

◆ StopAllAnimations()

void StopAllAnimations ( )

Stop All actively running animations.

◆ StopAnimation()

void StopAnimation ( const UWidgetAnimation InAnimation)

Stops an already running animation in this widget.

◆ StopAnimationsAndLatentActions()

void StopAnimationsAndLatentActions ( )

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

◆ StopListeningForAllInputActions()

void StopListeningForAllInputActions ( )

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

◆ StopListeningForInputAction()

void StopListeningForInputAction ( FName ActionName,
EInputEvent EventType )

Removes the binding for a particular action's callback.

◆ Tick()

void Tick ( FGeometry MyGeometry,
float32 InDeltaTime )

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

Parameters
MyGeometryThe space allotted for this widget
InDeltaTimeReal time passed since last tick

◆ UnbindAllFromAnimationFinished()

void UnbindAllFromAnimationFinished ( UWidgetAnimation Animation)

◆ UnbindAllFromAnimationStarted()

void UnbindAllFromAnimationStarted ( UWidgetAnimation Animation)

◆ UnbindFromAnimationFinished()

void UnbindFromAnimationFinished ( UWidgetAnimation Animation,
FWidgetAnimationDynamicEvent Delegate = FWidgetAnimationDynamicEvent ( ) )

Unbind an animation finished delegate.

Parameters
Animationthe animation to listen for starting or finishing.
Delegatethe delegate to call when the animation's state changes

◆ UnbindFromAnimationStarted()

void UnbindFromAnimationStarted ( UWidgetAnimation Animation,
FWidgetAnimationDynamicEvent Delegate = FWidgetAnimationDynamicEvent ( ) )

Unbind an animation started delegate.

Parameters
Animationthe animation to listen for starting or finishing.
Delegatethe delegate to call when the animation's state changes

◆ UnregisterInputComponent()

void UnregisterInputComponent ( )

StopListeningForAllInputActions will automatically Register an Input Component with the player input system. If you however, want to Pause and Resume, listening for a set of actions, the best way is to use UnregisterInputComponent to pause, and RegisterInputComponent to resume listening.

Member Data Documentation

◆ AlignmentInViewport

FVector2D AlignmentInViewport

◆ AnchorsInViewport

FAnchors AnchorsInViewport

◆ bIsFocusable

bool bIsFocusable

Setting this flag to true, allows this widget to accept focus when clicked, or when navigated to.

◆ bStopAction

bool bStopAction

◆ ColorAndOpacity

FLinearColor ColorAndOpacity

The color and opacity of this widget. Tints all child widgets.

◆ DesiredFocusWidget

UWidget DesiredFocusWidget

◆ DesiredFocusWidgetName

const FName DesiredFocusWidgetName

◆ ForegroundColor

FSlateColor ForegroundColor

The foreground color of the widget, this is inherited by sub widgets. Any color property that is marked as inherit will use this color.

◆ OnVisibilityChanged

FOnVisibilityChangedEvent OnVisibilityChanged

Called when the visibility has changed.

◆ OwningPlayerCameraManager

const APlayerCameraManager OwningPlayerCameraManager

Gets the player camera manager associated with this UI.

◆ OwningPlayerPawn

const APawn OwningPlayerPawn

Gets the player pawn associated with this UI.

◆ Padding

FMargin Padding

The padding area around the content.

◆ PaletteCategory

FText PaletteCategory

The category this widget appears in the palette.

◆ PreviewBackground

UTexture2D PreviewBackground

A preview background that you can use when designing the UI to get a sense of scale on the screen. Use a texture with a screenshot of your game in it, for example if you were designing a HUD.

◆ Priority

int Priority

◆ RootWidget

UWidget RootWidget

◆ TickFrequency

EWidgetTickFrequency TickFrequency

This widget is allowed to tick. If this is unchecked tick will never be called, animations will not play correctly, and latent actions will not execute. Uncheck this for performance reasons only.