Class UserWidget
The user widget is extensible by users through the WidgetBlueprint.
Inheritance
Inherited Members
Namespace: UE4.UMG
Assembly: UE4DotNet.dll
Syntax
public class UserWidget : Widget
Properties
| Improve this Doc View SourceActiveSequencePlayers
All the sequence players currently playing
Declaration
public ObjectArrayField<UMGSequencePlayer> ActiveSequencePlayers { get; }
Property Value
Type | Description |
---|---|
ObjectArrayField<UMGSequencePlayer> |
bCookedWidgetTree
Declaration
public bool bCookedWidgetTree { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bHasScriptImplementedPaint
Declaration
public bool bHasScriptImplementedPaint { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bHasScriptImplementedTick
Declaration
public bool bHasScriptImplementedTick { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bIsFocusable
Declaration
public bool bIsFocusable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bStopAction
Declaration
public bool bStopAction { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ColorAndOpacity
The color and opacity of this widget. Tints all child widgets.
Declaration
public LinearColor ColorAndOpacity { get; }
Property Value
Type | Description |
---|---|
LinearColor |
DefaultObject
Get UE4 Default Object for this Class
Declaration
public static UserWidget DefaultObject { get; }
Property Value
Type | Description |
---|---|
UserWidget |
DesignTimeSize
Stores the design time desired size of the user widget
Declaration
public Vector2D DesignTimeSize { get; set; }
Property Value
Type | Description |
---|---|
Vector2D |
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.
InputComponent
Input Component
Declaration
public InputComponent InputComponent { get; set; }
Property Value
Type | Description |
---|---|
InputComponent |
Padding
The padding area around the content.
Declaration
public Margin Padding { get; }
Property Value
Type | Description |
---|---|
Margin |
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.
Priority
Priority
Declaration
public int Priority { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
StaticClass
Get UE4 Class
Declaration
public static Class StaticClass { get; }
Property Value
Type | Description |
---|---|
Class |
StoppedSequencePlayers
List of sequence players to cache and clean up when safe
Declaration
public ObjectArrayField<UMGSequencePlayer> StoppedSequencePlayers { get; }
Property Value
Type | Description |
---|---|
ObjectArrayField<UMGSequencePlayer> |
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 SourceAddToPlayerScreen(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.
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.
CancelLatentActions()
Cancels any pending Delays or timer callbacks for this widget.
Declaration
public void CancelLatentActions()
GetAlignmentInViewport()
Get Alignment in Viewport
Declaration
public Vector2D GetAlignmentInViewport()
Returns
Type | Description |
---|---|
Vector2D |
GetAnchorsInViewport()
Get Anchors in Viewport
Declaration
public Anchors GetAnchorsInViewport()
Returns
Type | Description |
---|---|
Anchors |
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.
GetIsVisible()
Get Is Visible
Declaration
public bool GetIsVisible()
Returns
Type | Description |
---|---|
System.Boolean |
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.
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
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
IsAnyAnimationPlaying()
@return True if any animation is currently playing
Declaration
public bool IsAnyAnimationPlaying()
Returns
Type | Description |
---|---|
System.Boolean |
IsInViewport()
@return true if the widget was added to the viewport using AddToViewport.
Declaration
public bool IsInViewport()
Returns
Type | Description |
---|---|
System.Boolean |
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 |
IsPlayingAnimation()
Are we currently playing any animations?
Declaration
public bool IsPlayingAnimation()
Returns
Type | Description |
---|---|
System.Boolean |
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.
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 |
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.
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
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
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
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.
RemoveFromViewport()
Removes the widget from the viewport.
Declaration
public void RemoveFromViewport()
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
SetAlignmentInViewport(Vector2D)
Set Alignment in Viewport
Declaration
public void SetAlignmentInViewport(Vector2D Alignment)
Parameters
Type | Name | Description |
---|---|---|
Vector2D | Alignment |
SetAnchorsInViewport(Anchors)
Set Anchors in Viewport
Declaration
public void SetAnchorsInViewport(Anchors Anchors)
Parameters
Type | Name | Description |
---|---|---|
Anchors | Anchors |
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.
SetDesiredSizeInViewport(Vector2D)
Set Desired Size in Viewport
Declaration
public void SetDesiredSizeInViewport(Vector2D Size)
Parameters
Type | Name | Description |
---|---|---|
Vector2D | Size |
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.
SetInputActionBlocking(Boolean)
Set Input Action Blocking
Declaration
public void SetInputActionBlocking(bool bShouldBlock)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | bShouldBlock |
SetInputActionPriority(Int32)
Set Input Action Priority
Declaration
public void SetInputActionPriority(int NewPriority)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | NewPriority |
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)
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.
SetPadding(Margin)
Set Padding
Declaration
public void SetPadding(Margin InPadding)
Parameters
Type | Name | Description |
---|---|---|
Margin | InPadding |
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)
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.
StopAllAnimations()
Stop All actively running animations.
Declaration
public void StopAllAnimations()
Remarks
@param The name of the animation to stop
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
StopAnimationsAndLatentActions()
Cancels any pending Delays or timer callbacks for this widget, and stops all active animations on the widget.
Declaration
public void StopAnimationsAndLatentActions()
StopListeningForAllInputActions()
Stops listening to all input actions, and unregisters the input component with the player controller.
Declaration
public void StopListeningForAllInputActions()
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 |
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 SourceConstruct
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.
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.
IsInteractable
Gets a value indicating if the widget is interactive.
Declaration
public event UserWidget.IsInteractable_delegate IsInteractable
Event Type
Type | Description |
---|---|
UserWidget.IsInteractable_delegate |
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
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
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
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
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.
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.
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.
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.
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.
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.
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
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
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.
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
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
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
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
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
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.
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.
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 |
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
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
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.
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
OnPaint
On Paint
Declaration
public event UserWidget.OnPaint_delegate OnPaint
Event Type
Type | Description |
---|---|
UserWidget.OnPaint_delegate |
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
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.
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
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
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
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
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
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
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.
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 SourceImplicit(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 |