Show / Hide Table of Contents

Class UserWidget

The user widget is extensible by users through the WidgetBlueprint.

Inheritance
System.Object
UObject
Visual
Widget
UserWidget
LevelSequenceBurnIn
VREditorBaseUserWidget
Inherited Members
Widget.ForceLayoutPrepass()
Widget.ForceVolatile(Boolean)
Widget.GetCachedGeometry(Geometry)
Widget.GetClipping()
Widget.GetDesiredSize()
Widget.GetIsEnabled()
Widget.GetOwningLocalPlayer()
Widget.GetOwningPlayer()
Widget.GetParent()
Widget.GetRenderOpacity()
Widget.GetVisibility()
Widget.HasAnyUserFocus()
Widget.HasFocusedDescendants()
Widget.HasKeyboardFocus()
Widget.HasMouseCapture()
Widget.HasMouseCaptureByUser(Int32, Int32)
Widget.HasUserFocus(PlayerController)
Widget.HasUserFocusedDescendants(PlayerController)
Widget.InvalidateLayoutAndVolatility()
Widget.IsHovered()
Widget.IsVisible()
Widget.RemoveFromParent()
Widget.ResetCursor()
Widget.SetAllNavigationRules(EUINavigationRule, Name)
Widget.SetClipping(EWidgetClipping)
Widget.SetCursor(Byte)
Widget.SetIsEnabled(Boolean)
Widget.SetKeyboardFocus()
Widget.SetNavigationRule(EUINavigation, EUINavigationRule, Name)
Widget.SetRenderAngle(Single)
Widget.SetRenderOpacity(Single)
Widget.SetRenderScale(Vector2D)
Widget.SetRenderShear(Vector2D)
Widget.SetRenderTransform(WidgetTransform)
Widget.SetRenderTransformPivot(Vector2D)
Widget.SetRenderTranslation(Vector2D)
Widget.SetToolTip(Widget)
Widget.SetToolTipText(Byte)
Widget.SetUserFocus(PlayerController)
Widget.SetVisibility(ESlateVisibility)
Widget.Slot
Widget.ToolTipWidget
Widget.RenderTransform
Widget.RenderTransformPivot
Widget.bIsVariable
Widget.bCreatedByConstructionScript
Widget.bIsEnabled
Widget.bOverride_Cursor
Widget.bIsVolatile
Widget.bHiddenInDesigner
Widget.bExpandedInDesigner
Widget.bLockedInDesigner
Widget.Cursor
Widget.RenderOpacity
Widget.Navigation
Widget.NativeBindings
Widget.DesignerFlags
UObject.TransientPackage
UObject.CastTo<T>(UObject)
UObject.CastTo(UObject, Type)
UObject.RemoveObject(UObject)
UObject.MakeObjectArrayField<T>(NativeArray*)
UObject.NotImplemented<T>()
UObject.GetHashCode()
UObject.GetName()
UObject.ToString()
UObject.Name
UObject._None
UObject.None
UObject.ObjPointer
UObject.LoadObjectFromClass(Class, UObject, String, String, LoadFlags, PackageMap, Boolean)
UObject.LoadClass(Class, UObject, String, String, LoadFlags, PackageMap)
UObject.GetPropertyFor<T>(Name)
UObject.ExecuteUbergraph
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: UE4.UMG
Assembly: UE4DotNet.dll
Syntax
public class UserWidget : Widget

Properties

| Improve this Doc View Source

ActiveSequencePlayers

All the sequence players currently playing

Declaration
public ObjectArrayField<UMGSequencePlayer> ActiveSequencePlayers { get; }
Property Value
Type Description
ObjectArrayField<UMGSequencePlayer>
| Improve this Doc View Source

bCookedWidgetTree

Declaration
public bool bCookedWidgetTree { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bHasScriptImplementedPaint

Declaration
public bool bHasScriptImplementedPaint { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bHasScriptImplementedTick

Declaration
public bool bHasScriptImplementedTick { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bIsFocusable

Declaration
public bool bIsFocusable { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bStopAction

Declaration
public bool bStopAction { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

ColorAndOpacity

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

Declaration
public LinearColor ColorAndOpacity { get; }
Property Value
Type Description
LinearColor
| Improve this Doc View Source

DefaultObject

Get UE4 Default Object for this Class

Declaration
public static UserWidget DefaultObject { get; }
Property Value
Type Description
UserWidget
| Improve this Doc View Source

DesignTimeSize

Stores the design time desired size of the user widget

Declaration
public Vector2D DesignTimeSize { get; set; }
Property Value
Type Description
Vector2D
| Improve this Doc View Source

ForegroundColor

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

Declaration
public SlateColor ForegroundColor { get; }
Property Value
Type Description
SlateColor
Remarks

Any color property that is marked as inherit will use this color.

| Improve this Doc View Source

InputComponent

Input Component

Declaration
public InputComponent InputComponent { get; set; }
Property Value
Type Description
InputComponent
| Improve this Doc View Source

Padding

The padding area around the content.

Declaration
public Margin Padding { get; }
Property Value
Type Description
Margin
| Improve this Doc View Source

PreviewBackground

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

Declaration
public Texture2D PreviewBackground { get; set; }
Property Value
Type Description
Texture2D
Remarks

Use a texture with a screenshot of your game in it, for example if you were designing a HUD.

| Improve this Doc View Source

Priority

Priority

Declaration
public int Priority { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

StaticClass

Get UE4 Class

Declaration
public static Class StaticClass { get; }
Property Value
Type Description
Class
| Improve this Doc View Source

StoppedSequencePlayers

List of sequence players to cache and clean up when safe

Declaration
public ObjectArrayField<UMGSequencePlayer> StoppedSequencePlayers { get; }
Property Value
Type Description
ObjectArrayField<UMGSequencePlayer>
| Improve this Doc View Source

WidgetTree

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

Declaration
public WidgetTree WidgetTree { get; set; }
Property Value
Type Description
WidgetTree

Methods

| Improve this Doc View Source

AddToPlayerScreen(Int32)

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

Declaration
public bool AddToPlayerScreen(int ZOrder)
Parameters
Type Name Description
System.Int32 ZOrder
Returns
Type Description
System.Boolean
Remarks

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

@param ZOrder The higher the number, the more on top this widget will be.

| Improve this Doc View Source

AddToViewport(Int32)

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

Declaration
public void AddToViewport(int ZOrder)
Parameters
Type Name Description
System.Int32 ZOrder
Remarks

@param ZOrder The higher the number, the more on top this widget will be.

| Improve this Doc View Source

CancelLatentActions()

Cancels any pending Delays or timer callbacks for this widget.

Declaration
public void CancelLatentActions()
| Improve this Doc View Source

GetAlignmentInViewport()

Get Alignment in Viewport

Declaration
public Vector2D GetAlignmentInViewport()
Returns
Type Description
Vector2D
| Improve this Doc View Source

GetAnchorsInViewport()

Get Anchors in Viewport

Declaration
public Anchors GetAnchorsInViewport()
Returns
Type Description
Anchors
| Improve this Doc View Source

GetAnimationCurrentTime(WidgetAnimation)

Gets the current time of the animation in this widget @

Declaration
public float GetAnimationCurrentTime(WidgetAnimation InAnimation)
Parameters
Type Name Description
WidgetAnimation InAnimation
Returns
Type Description
System.Single
Remarks

param The name of the animation to get the current time for @return the current time of the animation.

| Improve this Doc View Source

GetIsVisible()

Get Is Visible

Declaration
public bool GetIsVisible()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

GetOwningPlayerPawn()

Gets the player pawn associated with this UI.

Declaration
public Pawn GetOwningPlayerPawn()
Returns
Type Description
Pawn
Remarks

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

| Improve this Doc View Source

IsAnimationPlaying(WidgetAnimation)

Gets whether an animation is currently playing on this widget.

Declaration
public bool IsAnimationPlaying(WidgetAnimation InAnimation)
Parameters
Type Name Description
WidgetAnimation InAnimation
Returns
Type Description
System.Boolean
Remarks

@param InAnimation The animation to check the playback status of @return True if the animation is currently playing

| Improve this Doc View Source

IsAnimationPlayingForward(WidgetAnimation)

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

Declaration
public bool IsAnimationPlayingForward(WidgetAnimation InAnimation)
Parameters
Type Name Description
WidgetAnimation InAnimation
Returns
Type Description
System.Boolean
Remarks

@param InAnimation The playing animation that we want to know about

| Improve this Doc View Source

IsAnyAnimationPlaying()

@return True if any animation is currently playing

Declaration
public bool IsAnyAnimationPlaying()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsInViewport()

@return true if the widget was added to the viewport using AddToViewport.

Declaration
public bool IsInViewport()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsListeningForInputAction(Name)

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

Declaration
public bool IsListeningForInputAction(Name ActionName)
Parameters
Type Name Description
Name ActionName
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsPlayingAnimation()

Are we currently playing any animations?

Declaration
public bool IsPlayingAnimation()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ListenForInputAction(Name, Byte, Boolean, Byte)

Listens for a particular Player Input Action by name.

Declaration
public void ListenForInputAction(Name ActionName, byte EventType, bool bConsume, byte Callback)
Parameters
Type Name Description
Name ActionName
System.Byte EventType
System.Boolean bConsume
System.Byte Callback
Remarks

This requires that those actions are being executed, and that we're not currently in UI-Only Input Mode.

| Improve this Doc View Source

New(UObject, Name)

Spawn an object of this class

Declaration
public static UserWidget New(UObject obj = null, Name name = default(Name))
Parameters
Type Name Description
UObject obj
Name name
Returns
Type Description
UserWidget
| Improve this Doc View Source

PauseAnimation(WidgetAnimation)

Pauses an already running animation in this widget @

Declaration
public float PauseAnimation(WidgetAnimation InAnimation)
Parameters
Type Name Description
WidgetAnimation InAnimation
Returns
Type Description
System.Single
Remarks

param The name of the animation to pause @return 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.

| Improve this Doc View Source

PlayAnimation(WidgetAnimation, Single, Int32, Byte, Single)

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

Declaration
public void PlayAnimation(WidgetAnimation InAnimation, float StartAtTime, int NumLoopsToPlay, byte PlayMode, float PlaybackSpeed)
Parameters
Type Name Description
WidgetAnimation InAnimation
System.Single StartAtTime
System.Int32 NumLoopsToPlay
System.Byte PlayMode
System.Single PlaybackSpeed
Remarks

param InAnimation The animation to play @param StartAtTime The 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. @param NumLoopsToPlay The number of times to loop this animation (0 to loop indefinitely) @param PlaybackSpeed The speed at which the animation should play @param PlayMode Specifies the playback mode

| Improve this Doc View Source

PlayAnimationTo(WidgetAnimation, Single, Single, Int32, Byte, Single)

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

Declaration
public void PlayAnimationTo(WidgetAnimation InAnimation, float StartAtTime, float EndAtTime, int NumLoopsToPlay, byte PlayMode, float PlaybackSpeed)
Parameters
Type Name Description
WidgetAnimation InAnimation
System.Single StartAtTime
System.Single EndAtTime
System.Int32 NumLoopsToPlay
System.Byte PlayMode
System.Single PlaybackSpeed
Remarks

param InAnimation The animation to play @param StartAtTime The 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. @param EndAtTime The absolute time in the animation where to stop, this is only considered in the last loop. @param NumLoopsToPlay The number of times to loop this animation (0 to loop indefinitely) @param PlaybackSpeed The speed at which the animation should play @param PlayMode Specifies the playback mode

| Improve this Doc View Source

PlaySound(SoundBase)

Plays a sound through the UI @

Declaration
public void PlaySound(SoundBase SoundToPlay)
Parameters
Type Name Description
SoundBase SoundToPlay
Remarks

param The sound to play

| Improve this Doc View Source

RegisterInputComponent()

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

Declaration
public void RegisterInputComponent()
Remarks

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.

| Improve this Doc View Source

RemoveFromViewport()

Removes the widget from the viewport.

Declaration
public void RemoveFromViewport()
| Improve this Doc View Source

ReverseAnimation(WidgetAnimation)

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

Declaration
public void ReverseAnimation(WidgetAnimation InAnimation)
Parameters
Type Name Description
WidgetAnimation InAnimation
Remarks

@param InAnimation The playing animation that we want to reverse

| Improve this Doc View Source

SetAlignmentInViewport(Vector2D)

Set Alignment in Viewport

Declaration
public void SetAlignmentInViewport(Vector2D Alignment)
Parameters
Type Name Description
Vector2D Alignment
| Improve this Doc View Source

SetAnchorsInViewport(Anchors)

Set Anchors in Viewport

Declaration
public void SetAnchorsInViewport(Anchors Anchors)
Parameters
Type Name Description
Anchors Anchors
| Improve this Doc View Source

SetColorAndOpacity(LinearColor)

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

Declaration
public void SetColorAndOpacity(LinearColor InColorAndOpacity)
Parameters
Type Name Description
LinearColor InColorAndOpacity
Remarks

@param InColorAndOpacity The tint to apply to all child widgets.

| Improve this Doc View Source

SetDesiredSizeInViewport(Vector2D)

Set Desired Size in Viewport

Declaration
public void SetDesiredSizeInViewport(Vector2D Size)
Parameters
Type Name Description
Vector2D Size
| Improve this Doc View Source

SetForegroundColor(SlateColor)

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

Declaration
public void SetForegroundColor(SlateColor InForegroundColor)
Parameters
Type Name Description
SlateColor InForegroundColor
Remarks

Any color property that is marked as inherit will use this color.

@param InForegroundColor The foreground color.

| Improve this Doc View Source

SetInputActionBlocking(Boolean)

Set Input Action Blocking

Declaration
public void SetInputActionBlocking(bool bShouldBlock)
Parameters
Type Name Description
System.Boolean bShouldBlock
| Improve this Doc View Source

SetInputActionPriority(Int32)

Set Input Action Priority

Declaration
public void SetInputActionPriority(int NewPriority)
Parameters
Type Name Description
System.Int32 NewPriority
| Improve this Doc View Source

SetNumLoopsToPlay(WidgetAnimation, Int32)

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

Declaration
public void SetNumLoopsToPlay(WidgetAnimation InAnimation, int NumLoopsToPlay)
Parameters
Type Name Description
WidgetAnimation InAnimation
System.Int32 NumLoopsToPlay
Remarks

param InAnimation The animation that is already playing @param NumLoopsToPlay The number of loops to play. (0 to loop indefinitely)

| Improve this Doc View Source

SetOwningPlayer(PlayerController)

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

Declaration
public void SetOwningPlayer(PlayerController LocalPlayerController)
Parameters
Type Name Description
PlayerController LocalPlayerController
Remarks

@param LocalPlayerController The PlayerController of the local player you want to be the conceptual owner of this UI.

| Improve this Doc View Source

SetPadding(Margin)

Set Padding

Declaration
public void SetPadding(Margin InPadding)
Parameters
Type Name Description
Margin InPadding
| Improve this Doc View Source

SetPlaybackSpeed(WidgetAnimation, Single)

Changes the playback rate of a playing animation @

Declaration
public void SetPlaybackSpeed(WidgetAnimation InAnimation, float PlaybackSpeed)
Parameters
Type Name Description
WidgetAnimation InAnimation
System.Single PlaybackSpeed
Remarks

param InAnimation The animation that is already playing @param PlaybackRate Playback rate multiplier (1 is default)

| Improve this Doc View Source

SetPositionInViewport(Vector2D, Boolean)

Sets the widgets position in the viewport.

Declaration
public void SetPositionInViewport(Vector2D Position, bool bRemoveDPIScale)
Parameters
Type Name Description
Vector2D Position
System.Boolean bRemoveDPIScale
Remarks

@param Position The 2D position to set the widget to in the viewport. @param bRemoveDPIScale If 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.

| Improve this Doc View Source

StopAllAnimations()

Stop All actively running animations.

Declaration
public void StopAllAnimations()
Remarks

@param The name of the animation to stop

| Improve this Doc View Source

StopAnimation(WidgetAnimation)

Stops an already running animation in this widget @

Declaration
public void StopAnimation(WidgetAnimation InAnimation)
Parameters
Type Name Description
WidgetAnimation InAnimation
Remarks

param The name of the animation to stop

| Improve this Doc View Source

StopAnimationsAndLatentActions()

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

Declaration
public void StopAnimationsAndLatentActions()
| Improve this Doc View Source

StopListeningForAllInputActions()

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

Declaration
public void StopListeningForAllInputActions()
| Improve this Doc View Source

StopListeningForInputAction(Name, Byte)

Removes the binding for a particular action's callback.

Declaration
public void StopListeningForInputAction(Name ActionName, byte EventType)
Parameters
Type Name Description
Name ActionName
System.Byte EventType
| Improve this Doc View Source

UnregisterInputComponent()

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

Declaration
public void UnregisterInputComponent()
Remarks

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.

Events

| Improve this Doc View Source

Construct

Called after the underlying slate widget is constructed.

Declaration
public event UserWidget.Construct_delegate Construct
Event Type
Type Description
UserWidget.Construct_delegate
Remarks

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.

| Improve this Doc View Source

Destruct

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

Declaration
public event UserWidget.Destruct_delegate Destruct
Event Type
Type Description
UserWidget.Destruct_delegate
Remarks

Just like Construct this event can be called multiple times.

| Improve this Doc View Source

IsInteractable

Gets a value indicating if the widget is interactive.

Declaration
public event UserWidget.IsInteractable_delegate IsInteractable
Event Type
Type Description
UserWidget.IsInteractable_delegate
| Improve this Doc View Source

OnAddedToFocusPath

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.

Declaration
public event UserWidget.OnAddedToFocusPath_delegate OnAddedToFocusPath
Event Type
Type Description
UserWidget.OnAddedToFocusPath_delegate
Remarks

@param InFocusEvent FocusEvent

| Improve this Doc View Source

OnAnalogValueChanged

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

Declaration
public event UserWidget.OnAnalogValueChanged_delegate OnAnalogValueChanged
Event Type
Type Description
UserWidget.OnAnalogValueChanged_delegate
Remarks

param MyGeometry The Geometry of the widget receiving the event @param InAnalogInputEvent Analog Event @return Returns whether the event was handled, along with other possible actions

| Improve this Doc View Source

OnAnimationFinished

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

Declaration
public event UserWidget.OnAnimationFinished_delegate OnAnimationFinished
Event Type
Type Description
UserWidget.OnAnimationFinished_delegate
Remarks

param Animation The animation that has finished playing

| Improve this Doc View Source

OnAnimationStarted

Called when an animation is started.

Declaration
public event UserWidget.OnAnimationStarted_delegate OnAnimationStarted
Event Type
Type Description
UserWidget.OnAnimationStarted_delegate
Remarks

@param Animation the animation that started

| Improve this Doc View Source

OnDragCancelled

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.

Declaration
public event UserWidget.OnDragCancelled_delegate OnDragCancelled
Event Type
Type Description
UserWidget.OnDragCancelled_delegate
Remarks

@param PointerEvent Last mouse event from when the drag was canceled. @param Operation The drag operation that was canceled.

| Improve this Doc View Source

OnDragDetected

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

Declaration
public event UserWidget.OnDragDetected_delegate OnDragDetected
Event Type
Type Description
UserWidget.OnDragDetected_delegate
Remarks

@param InMyGeometry Widget geometry @param PointerEvent MouseMove that triggered the drag @param Operation The drag operation that was detected.

| Improve this Doc View Source

OnDragEnter

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

Declaration
public event UserWidget.OnDragEnter_delegate OnDragEnter
Event Type
Type Description
UserWidget.OnDragEnter_delegate
Remarks

@param MyGeometry The geometry of the widget receiving the event. @param PointerEvent The mouse event from when the drag entered the widget. @param Operation The drag operation that entered the widget.

| Improve this Doc View Source

OnDragLeave

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

Declaration
public event UserWidget.OnDragLeave_delegate OnDragLeave
Event Type
Type Description
UserWidget.OnDragLeave_delegate
Remarks

@param PointerEvent The mouse event from when the drag left the widget. @param Operation The drag operation that entered the widget.

| Improve this Doc View Source

OnDragOver

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

Declaration
public event UserWidget.OnDragOver_delegate OnDragOver
Event Type
Type Description
UserWidget.OnDragOver_delegate
Remarks

@param MyGeometry The geometry of the widget receiving the event. @param PointerEvent The mouse event from when the drag occurred over the widget. @param Operation The drag operation over the widget.

@return 'true' to indicate that you handled the drag over operation. Returning 'false' will cause the operation to continue to bubble up.

| Improve this Doc View Source

OnDrop

Called when the user is dropping something onto a widget.

Declaration
public event UserWidget.OnDrop_delegate OnDrop
Event Type
Type Description
UserWidget.OnDrop_delegate
Remarks

Ends the drag and drop operation, even if no widget handles this.

@param MyGeometry The geometry of the widget receiving the event. @param PointerEvent The mouse event from when the drag occurred over the widget. @param Operation The drag operation over the widget.

@return 'true' to indicate you handled the drop operation.

| Improve this Doc View Source

OnFocusLost

Called when this widget loses focus.

Declaration
public event UserWidget.OnFocusLost_delegate OnFocusLost
Event Type
Type Description
UserWidget.OnFocusLost_delegate
Remarks

This event does not bubble.

@param InFocusEvent FocusEvent

| Improve this Doc View Source

OnFocusReceived

Called when keyboard focus is given to this widget.

Declaration
public event UserWidget.OnFocusReceived_delegate OnFocusReceived
Event Type
Type Description
UserWidget.OnFocusReceived_delegate
Remarks

This event does not bubble.

@param MyGeometry The Geometry of the widget receiving the event @param InFocusEvent FocusEvent @return Returns whether the event was handled, along with other possible actions

| Improve this Doc View Source

OnInitialized

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

Declaration
public event UserWidget.OnInitialized_delegate OnInitialized
Event Type
Type Description
UserWidget.OnInitialized_delegate
Remarks

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.

| Improve this Doc View Source

OnKeyChar

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

Declaration
public event UserWidget.OnKeyChar_delegate OnKeyChar
Event Type
Type Description
UserWidget.OnKeyChar_delegate
Remarks

param MyGeometry The Geometry of the widget receiving the event @param InCharacterEvent Character event @return Returns whether the event was handled, along with other possible actions

| Improve this Doc View Source

OnKeyDown

Called after a key (keyboard, controller, .

Declaration
public event UserWidget.OnKeyDown_delegate OnKeyDown
Event Type
Type Description
UserWidget.OnKeyDown_delegate
Remarks

..) is pressed when this widget has focus (this event bubbles if not handled)

@param MyGeometry The Geometry of the widget receiving the event @param InKeyEvent Key event @return Returns whether the event was handled, along with other possible actions

| Improve this Doc View Source

OnKeyUp

Called after a key (keyboard, controller, .

Declaration
public event UserWidget.OnKeyUp_delegate OnKeyUp
Event Type
Type Description
UserWidget.OnKeyUp_delegate
Remarks

..) is released when this widget has focus

@param MyGeometry The Geometry of the widget receiving the event @param InKeyEvent Key event @return Returns whether the event was handled, along with other possible actions

| Improve this Doc View Source

OnMotionDetected

Called when motion is detected (controller or device) e.

Declaration
public event UserWidget.OnMotionDetected_delegate OnMotionDetected
Event Type
Type Description
UserWidget.OnMotionDetected_delegate
Remarks

g. Someone tilts or shakes their controller.

@param MyGeometry The geometry of the widget receiving the event. @param MotionEvent The motion event generated

| Improve this Doc View Source

OnMouseButtonDoubleClick

Called when a mouse button is double clicked.

Declaration
public event UserWidget.OnMouseButtonDoubleClick_delegate OnMouseButtonDoubleClick
Event Type
Type Description
UserWidget.OnMouseButtonDoubleClick_delegate
Remarks

Override this in derived classes.

@param InMyGeometry Widget geometry @param InMouseEvent Mouse button event @return Returns whether the event was handled, along with other possible actions

| Improve this Doc View Source

OnMouseButtonDown

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

Declaration
public event UserWidget.OnMouseButtonDown_delegate OnMouseButtonDown
Event Type
Type Description
UserWidget.OnMouseButtonDown_delegate
Remarks

This event is bubbled.

@param MyGeometry The Geometry of the widget receiving the event @param MouseEvent Information about the input event @return Whether the event was handled along with possible requests for the system to take action.

| Improve this Doc View Source

OnMouseButtonUp

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

Declaration
public event UserWidget.OnMouseButtonUp_delegate OnMouseButtonUp
Event Type
Type Description
UserWidget.OnMouseButtonUp_delegate
Remarks

This event is bubbled.

@param MyGeometry The Geometry of the widget receiving the event @param MouseEvent Information about the input event @return Whether the event was handled along with possible requests for the system to take action.

| Improve this Doc View Source

OnMouseCaptureLost

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

Declaration
public event UserWidget.OnMouseCaptureLost_delegate OnMouseCaptureLost
Event Type
Type Description
UserWidget.OnMouseCaptureLost_delegate
| Improve this Doc View Source

OnMouseEnter

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

Declaration
public event UserWidget.OnMouseEnter_delegate OnMouseEnter
Event Type
Type Description
UserWidget.OnMouseEnter_delegate
Remarks

This event is NOT bubbled.

@param MyGeometry The Geometry of the widget receiving the event @param MouseEvent Information about the input event

| Improve this Doc View Source

OnMouseLeave

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

Declaration
public event UserWidget.OnMouseLeave_delegate OnMouseLeave
Event Type
Type Description
UserWidget.OnMouseLeave_delegate
Remarks

This event is NOT bubbled.

@param MouseEvent Information about the input event

| Improve this Doc View Source

OnMouseMove

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

Declaration
public event UserWidget.OnMouseMove_delegate OnMouseMove
Event Type
Type Description
UserWidget.OnMouseMove_delegate
Remarks

This event is bubbled.

@param MyGeometry The Geometry of the widget receiving the event @param MouseEvent Information about the input event @return Whether the event was handled along with possible requests for the system to take action.

| Improve this Doc View Source

OnMouseWheel

Called when the mouse wheel is spun.

Declaration
public event UserWidget.OnMouseWheel_delegate OnMouseWheel
Event Type
Type Description
UserWidget.OnMouseWheel_delegate
Remarks

This event is bubbled.

@param MouseEvent Mouse event @return Returns whether the event was handled, along with other possible actions

| Improve this Doc View Source

OnPaint

On Paint

Declaration
public event UserWidget.OnPaint_delegate OnPaint
Event Type
Type Description
UserWidget.OnPaint_delegate
| Improve this Doc View Source

OnPreviewKeyDown

Called after a key (keyboard, controller, .

Declaration
public event UserWidget.OnPreviewKeyDown_delegate OnPreviewKeyDown
Event Type
Type Description
UserWidget.OnPreviewKeyDown_delegate
Remarks

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

@param MyGeometry The Geometry of the widget receiving the event @param InKeyEvent Key event @return Returns whether the event was handled, along with other possible actions

| Improve this Doc View Source

OnPreviewMouseButtonDown

Just like OnMouseButtonDown, but tunnels instead of bubbling.

Declaration
public event UserWidget.OnPreviewMouseButtonDown_delegate OnPreviewMouseButtonDown
Event Type
Type Description
UserWidget.OnPreviewMouseButtonDown_delegate
Remarks

If this even is handled, OnMouseButtonDown will not be sent.

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

@param MyGeometry The Geometry of the widget receiving the event @param MouseEvent Information about the input event @return Whether the event was handled along with possible requests for the system to take action.

| Improve this Doc View Source

OnRemovedFromFocusPath

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

Declaration
public event UserWidget.OnRemovedFromFocusPath_delegate OnRemovedFromFocusPath
Event Type
Type Description
UserWidget.OnRemovedFromFocusPath_delegate
Remarks

@param InFocusEvent FocusEvent

| Improve this Doc View Source

OnTouchEnded

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

Declaration
public event UserWidget.OnTouchEnded_delegate OnTouchEnded
Event Type
Type Description
UserWidget.OnTouchEnded_delegate
Remarks

param MyGeometry The geometry of the widget receiving the event. @param InTouchEvent The touch event generated

| Improve this Doc View Source

OnTouchForceChanged

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

Declaration
public event UserWidget.OnTouchForceChanged_delegate OnTouchForceChanged
Event Type
Type Description
UserWidget.OnTouchForceChanged_delegate
Remarks

param MyGeometry The geometry of the widget receiving the event. @param InTouchEvent The touch event generated

| Improve this Doc View Source

OnTouchGesture

Called when the user performs a gesture on trackpad.

Declaration
public event UserWidget.OnTouchGesture_delegate OnTouchGesture
Event Type
Type Description
UserWidget.OnTouchGesture_delegate
Remarks

This event is bubbled.

@param MyGeometry The geometry of the widget receiving the event. @param GestureEvent gesture event @return Returns whether the event was handled, along with other possible actions

| Improve this Doc View Source

OnTouchMoved

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

Declaration
public event UserWidget.OnTouchMoved_delegate OnTouchMoved
Event Type
Type Description
UserWidget.OnTouchMoved_delegate
Remarks

param MyGeometry The geometry of the widget receiving the event. @param InTouchEvent The touch event generated

| Improve this Doc View Source

OnTouchStarted

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

Declaration
public event UserWidget.OnTouchStarted_delegate OnTouchStarted
Event Type
Type Description
UserWidget.OnTouchStarted_delegate
Remarks

param MyGeometry The geometry of the widget receiving the event. @param InTouchEvent The touch event generated

| Improve this Doc View Source

PreConstruct

Called by both the game and the editor.

Declaration
public event UserWidget.PreConstruct_delegate PreConstruct
Event Type
Type Description
UserWidget.PreConstruct_delegate
Remarks

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.

| Improve this Doc View Source

Tick

Ticks this widget.

Declaration
public event UserWidget.Tick_delegate Tick
Event Type
Type Description
UserWidget.Tick_delegate
Remarks

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

@param MyGeometry The space allotted for this widget @param InDeltaTime Real time passed since last tick

Operators

| Improve this Doc View Source

Implicit(IntPtr to UserWidget)

Convert from IntPtr to UObject

Declaration
public static implicit operator UserWidget(IntPtr p)
Parameters
Type Name Description
System.IntPtr p
Returns
Type Description
UserWidget
  • Improve this Doc
  • View Source
Back to top Generated by DocFX