Module |
|
Header |
/Engine/Source/Runtime/UMG/Public/Components/WidgetComponent.h |
Include |
#include "Components/WidgetComponent.h" |
class UWidgetComponent : public UMeshComponent
The widget component provides a surface in the 3D environment on which to render widgets normally rendered to the screen. Widgets are first rendered to a render target, then that render target is displayed in the world.
Material Properties set by this component on whatever material overrides the default. SlateUI [Texture] BackColor [Vector] TintColorAndOpacity [Vector] OpacityFromTexture [Scalar]
Name | Description | ||
---|---|---|---|
|
BackgroundColor |
The background color of the component |
|
|
bAddedToScreen |
||
|
bApplyGammaCorrection |
Widget components that appear in the world will be gamma corrected by the 3D renderer. |
|
|
bDrawAtDesiredSize |
Causes the render target to automatically match the desired size. |
|
|
bEditTimeUsable |
Allows the widget component to be used at editor time. For use in the VR-Editor. |
|
|
bIsTwoSided |
Is the component visible from behind? |
|
|
BlendMode |
The blend mode for the widget. |
|
|
bManuallyRedraw |
Should we wait to be told to redraw to actually draw? |
|
|
UBodySetup *... |
BodySetup |
The body setup of the displayed quad |
|
bReceiveHardwareInput |
Register with the viewport for hardware input from the true mouse and keyboard. |
|
|
bRedrawRequested |
Has anyone requested we redraw? |
|
|
bWindowFocusable |
Is the virtual window created to host the widget focusable? |
|
|
CurrentDrawSize |
The actual draw size, this changes based on DrawSize - or the desired size of the widget if bDrawAtDesiredSize is true. |
|
|
CurrentSlateWidget |
The slate widget currently being drawn. |
|
|
float |
CylinderArcAngle |
Curvature of a cylindrical widget in degrees. |
|
DrawSize |
The size of the displayed quad. |
|
|
GeometryMode |
Controls the geometry of the widget component. See EWidgetGeometryMode. |
|
|
LastLocalHitLocation |
The relative location of the last hit on this component |
|
|
double |
LastWidgetRenderTime |
What was the last time we rendered the widget? |
|
LayerZOrder |
ZOrder the layer will be created on, note this only matters on the first time a new layer is created, subsequent additions to the same layer will use the initially defined ZOrder |
|
|
MaskedMaterial |
The material instance for masked widget components. |
|
|
MaskedMaterial_OneSided |
The material instance for masked, one-sided widget components. |
|
|
MaterialInstance |
The dynamic instance of the material that the render target is attached to |
|
|
float |
OpacityFromTexture |
Sets the amount of opacity from the widget's UI texture to use when rendering the translucent or masked UI to the viewport (0.0-1.0) |
|
OpaqueMaterial |
The material instance for opaque widget components |
|
|
OpaqueMaterial_OneSided |
The material instance for opaque, one-sided widget components |
|
|
ULocalPlayer &#... |
OwnerPlayer |
The owner player for a widget component, if this widget is drawn on the screen, this controls what player's screen it appears on for split screen, if not set, users player 0. |
|
Pivot |
The Alignment/Pivot point that the widget is placed at relative to the position. |
|
|
float |
RedrawTime |
The time in between draws, if 0 - we would redraw every frame. |
|
RenderTarget |
The target to which the user widget is rendered |
|
|
SharedLayerName |
Layer Name the widget will live on |
|
|
TSharedPtr< SWi... |
SlateWidget |
The Slate widget to be displayed by this component. |
|
TSharedPtr< cla... |
SlateWindow |
The slate window that contains the user widget content |
|
Space |
The coordinate space in which to render the widget |
|
|
TickWhenOffscreen |
Should the component tick the widget when it's off screen? |
|
|
TimingPolicy |
How this widget should deal with timing, pausing, etc. |
|
|
TintColorAndOpacity |
Tint color and opacity for this component |
|
|
TranslucentMaterial |
The material instance for translucent widget components |
|
|
TranslucentMaterial_OneSided |
The material instance for translucent, one-sided widget components |
|
|
UUserWidget ... |
Widget |
The User Widget object displayed and managed by this component |
|
TSubclassOf< UU... |
WidgetClass |
The class of User Widget to create and display an instance of |
|
WidgetRenderer |
Helper class for drawing widgets to a render target. |
|
|
WindowVisibility |
The visibility of the virtual window created to host the widget |
Name | Description | |
---|---|---|
|
UWidgetComponent ( |
Name | Description | ||
---|---|---|---|
|
ApplyComponentInstanceData ( |
||
|
CanReceiveHardwareInput() |
Just because the user attempts to receive hardware input does not mean it's possible. |
|
|
float |
ComputeComponentWidth() |
Returns the width of the widget component taking GeometryMode into account. |
|
DrawWidgetToRenderTarget ( |
Draws the current widget to the render target if possible. |
|
|
EWidgetBlend... |
GetBlendMode() |
Gets the blend mode for the widget. |
|
GetCurrentDrawSize() |
Returns the "actual" draw size of the quad in the world |
|
|
double |
GetCurrentTime() |
Returns current absolute time, respecting TimingPolicy. |
|
float |
GetCylinderArcAngle() |
Defines the curvature of the widget component when using EWidgetGeometryMode::Cylinder; ignored otherwise. |
|
GetCylinderHitLocation |
When using EWidgetGeometryMode::Cylinder, continues the trace from the front face of the widget component into the cylindrical geometry and returns adjusted hit results information. |
|
|
GetDrawAtDesiredSize() |
||
|
GetDrawSize() |
Returns the "specified" draw size of the quad in the world |
|
|
GetEditTimeUsable() |
||
|
EWidgetGeome... |
GetGeometryMode() |
|
|
GetHitWidgetPath |
Returns the list of widgets with their geometry and the cursor position transformed into this Widget component's space. |
|
|
GetHitWidgetPath |
Returns the list of widgets with their geometry and the cursor position transformed into this Widget space. |
|
|
GetLastLocalHitLocation() |
Gets the last local location that was hit |
|
|
GetLocalHitLocation |
Converts a world-space hit result to a hit location on the widget |
|
|
GetManuallyRedraw() |
||
|
UMaterialIns... |
GetMaterialInstance() |
Returns the dynamic material instance used to render the user widget |
|
ULocalPlayer... |
GetOwnerPlayer() |
Gets the local player that owns this widget component. |
|
GetPivot() |
Returns the pivot point where the UI is rendered about the origin. |
|
|
GetReceiveHardwareInput() |
||
|
float |
GetRedrawTime() |
|
|
UTextureRend... |
GetRenderTarget() |
Returns the render target to which the user widget is rendered |
|
const TShare... |
GetSlateWidget() |
Returns the Slate widget that was assigned to this component, if any |
|
TSharedPtr< ... |
GetSlateWindow() |
Returns the window containing the user widget content |
|
GetTickWhenOffscreen() |
Gets whether the widget ticks when offscreen or not |
|
|
GetTwoSided() |
Gets whether the widget is two-sided or not |
|
|
UUserWidget ... |
GetUserWidgetObject() |
Returns the user widget object displayed by this component |
|
TSharedPtr< ... |
GetVirtualWindow() |
Get the fake window we create for widgets displayed in the world. |
|
TSubclassOf<... |
GetWidgetClass() |
Returns the class of the user widget displayed by this component |
|
GetWidgetSpace() |
||
|
GetWindowFocusable() |
||
|
EWindowVisib... |
GetWindowVisiblility() |
Gets the visibility of the virtual window created to host the widget focusable. |
|
InitWidget() |
Ensures the user widget is initialized |
|
|
ModifyProjectedLocalPosition |
Hook to allow this component modify the local position of the widget after it has been projected from world space to screen space. |
|
|
OnLevelRemovedFromWorld |
||
|
RegisterHitTesterWithViewport ( |
||
|
RegisterWindow() |
||
|
ReleaseResources() |
Release resources associated with the widget. |
|
|
RemoveWidgetFromScreen() |
||
|
RequestRedraw() |
Requests that the widget be redrawn. |
|
|
SetBackgroundColor ( |
Sets the background color and opacityscale for this widget |
|
|
SetBlendMode ( |
Sets the blend mode to use for this widget |
|
|
SetCylinderArcAngle ( |
Defines the curvature of the widget component when using EWidgetGeometryMode::Cylinder; ignored otherwise. |
|
|
SetDrawAtDesiredSize ( |
||
|
SetDrawSize ( |
Sets the draw size of the quad in the world |
|
|
SetEditTimeUsable ( |
||
|
SetGeometryMode ( |
||
|
SetInitialLayerZOrder ( |
Sets layer z order used when this widget is initialized |
|
|
SetInitialSharedLayerName ( |
Sets shared layer name used when this widget is initialized |
|
|
SetManuallyRedraw ( |
||
|
SetOpacityFromTexture ( |
Sets how much opacity from the UI widget's texture alpha is used when rendering to the viewport (0.0-1.0) |
|
|
SetOwnerPlayer ( |
Sets the local player that owns this widget component. |
|
|
SetPivot ( |
||
|
SetRedrawTime ( |
||
|
SetSlateWidget ( |
Sets a Slate widget to be rendered. |
|
|
SetTickWhenOffscreen ( |
Sets whether the widget ticks when offscreen or not |
|
|
SetTintColorAndOpacity ( |
Sets the tint color and opacity scale for this widget |
|
|
SetTwoSided ( |
Sets whether the widget is two-sided or not |
|
|
SetWidget ( |
Sets the widget to use directly. |
|
|
SetWidgetClass ( |
Sets the widget class used to generate the widget for this component |
|
|
SetWidgetSpace ( |
||
|
SetWindowFocusable ( |
||
|
SetWindowVisibility ( |
Sets the visibility of the virtual window created to host the widget focusable. |
|
|
ShouldDrawWidget() |
Allows subclasses to control if the widget should be drawn. Called right before we draw the widget. |
|
|
UnregisterHitTesterWithViewport ( |
||
|
UnregisterWindow() |
||
|
UpdateBodySetup ( |
Ensures the body setup is initialized and updates it if needed. |
|
|
UpdateMaterialInstance() |
||
|
UpdateMaterialInstanceParameters() |
Updates the dynamic parameters on the material instance, without re-creating it |
|
|
UpdateRenderTarget ( |
Ensure the render target is initialized and updates it if needed. |
|
|
UpdateWidget() |
Ensures the 3d window is created its size and content. |
Name | Description | ||
---|---|---|---|
|
FPrimitiveSc... |
CreateSceneProxy() |
UPrimitiveComponent Interface |
|
UBodySetup &... |
GetBodySetup() |
Return the BodySetup to use for this PrimitiveComponent (single body case) |
|
FCollisionSh... |
GetCollisionShape ( |
Return a CollisionShape that most closely matches this primitive. |
|
UMaterialInt... |
GetMaterial ( |
Returns the material used by the element at the specified index |
|
GetNumMaterials() |
Return number of material elements in this primitive |
|
|
GetUsedMaterials ( |
Retrieves the materials used in this component |
|
|
SetMaterial ( |
Changes the material applied to an element of the mesh. |
Name | Description | ||
---|---|---|---|
|
FBoxSphereBo... |
CalcBounds ( |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. |
Name | Description | ||
---|---|---|---|
|
BeginPlay() |
UActorComponent Interface |
|
|
DestroyComponent ( |
Unregister the component, remove it from its outer Actor's Components array and mark for pending kill. |
|
|
EndPlay ( |
Ends gameplay for this component. |
|
|
TStructOnSco... |
GetComponentInstanceData() |
Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation |
|
OnRegister() |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. |
|
|
OnUnregister() |
Called when a component is unregistered. |
|
|
TickComponent ( |
Function called every frame on this ActorComponent. |
Name | Description | ||
---|---|---|---|
|
CanEditChange ( |
Called by the editor to query whether a property of this object is allowed to be modified. |
|
|
IsDestructionThreadSafe() |
Called during garbage collection to determine if an object can have its destructor called on a worker thread. |
|
|
PostEditChangeProperty ( |
Called when a property on this object has been modified externally |
|
|
Serialize ( |
Handles reading, writing, and reference collecting using FArchive. |
Name |
Description |
---|---|
WidgetHitTester |
The hit tester to use for this component |