| UObjectBase
|
Module |
|
Header |
/Engine/Source/Runtime/UMG/Public/Components/WidgetInteractionComponent.h |
Include |
#include "Components/WidgetInteractionComponent.h" |
class UWidgetInteractionComponent : public USceneComponent
This is a component to allow interaction with the Widget Component. This class allows you to simulate a sort of laser pointer device, when it hovers over widgets it will send the basic signals to show as if the mouse were moving on top of it. You'll then tell the component to simulate key presses, like Left Mouse, down and up, to simulate a mouse click.
Name | Description | ||
---|---|---|---|
|
bEnableHitTesting |
Should the interaction component perform hit testing (Automatic or Custom) and attempt to simulate hover - if you were going to emulate a keyboard you would want to turn this option off if the virtual keyboard was separate from the virtual pointer device and used a second interaction component. |
|
|
bIsHoveredWidgetFocusable |
Are we hovering over any focusable widget? |
|
|
bIsHoveredWidgetHitTestVisible |
Are we hovered over a widget that is hit test visible? |
|
|
bIsHoveredWidgetInteractable |
Are we hovering over any interactive widgets. |
|
|
bShowDebug |
Shows some debugging lines and a hit sphere to help you debug interactions. |
|
|
CustomHitResult |
Stores the custom hit result set by the player. |
|
|
DebugColor |
Determines the color of the debug lines. |
|
|
float |
DebugLineThickness |
Determines the thickness of the debug lines. |
|
float |
DebugSphereLineThickness |
Determines the line thickness of the debug sphere. |
|
HoveredWidgetComponent |
The widget component we're currently hovering over. |
|
|
float |
InteractionDistance |
The distance in game units the component should be able to interact with a widget component. |
|
InteractionSource |
Should we project from the world location of the component? If you set this to false, you'll need to call SetCustomHitResult(), and provide the result of a custom hit test form whatever location you wish. |
|
|
LastHitResult |
The last hit result we used. |
|
|
LastLocalHitLocation |
The last 2D location on the widget component that was hit. |
|
|
LastWidgetPath |
The last widget path under the hit result. |
|
|
LocalHitLocation |
The 2D location on the widget component that was hit. |
|
|
ModifierKeys |
The modifier keys to simulate during key presses. |
|
|
OnHoveredWidgetChanged |
Called when the hovered Widget Component changes. |
|
|
PointerIndex |
Each user virtual controller or virtual finger tips being simulated should use a different pointer index. |
|
|
PressedKeys |
The current set of pressed keys we maintain the state of. |
|
|
TEnumAsByte< EC... |
TraceChannel |
The trace channel to use when tracing for widget components in the world. |
|
TSharedPtr< FSl... |
VirtualUser |
Represents the virtual user in slate. |
|
VirtualUserIndex |
Represents the Virtual User Index. |
Name | Description | |
---|---|---|
|
UWidgetInteractionComponent ( |
Name | Description | ||
---|---|---|---|
|
CanInteractWithComponent ( |
Returns true if the inteaction component can interact with the supplied widget component |
|
|
CanSendInput() |
Is it safe for this interaction component to run? Might not be in a server situation with no slate application. |
|
|
FindHoveredWidgetPath ( |
Gets the WidgetPath for the widget being hovered over based on the hit result. |
|
|
Get2DHitLocation() |
Gets the last hit location on the widget in 2D, local pixel units of the render target. |
|
|
UWidgetCompo... |
GetHoveredWidgetComponent() |
Get the currently hovered widget component. |
|
const FWeakW... |
GetHoveredWidgetPath() |
Gets the widget path for the slate widgets under the last hit result. |
|
GetKeyAndCharCodes |
Gets the key and char codes for sending keys for the platform. |
|
|
const FHitRe... |
GetLastHitResult() |
Gets the last hit result generated by the component. Returns the custom hit result if that was set. |
|
GetRelatedComponentsToIgnoreInAutomaticHitTesting ( |
Gets the list of components to ignore during hit testing. |
|
|
IsOverFocusableWidget() |
Returns true if a widget under the hit result is focusable. |
|
|
IsOverHitTestVisibleWidget() |
Returns true if a widget under the hit result is has a visibility that makes it hit test visible. |
|
|
IsOverInteractableWidget() |
Returns true if a widget under the hit result is interactive. |
|
|
FWidgetTrace... |
PerformTrace() |
Performs the trace and gets the hit result under the specified InteractionSource |
|
PressAndReleaseKey ( |
Does both the press and release of a simulated keyboard key. |
|
|
PressKey |
Press a key as if it had come from the keyboard. |
|
|
PressPointerKey ( |
Presses a key as if the mouse/pointer were the source of it. |
|
|
ReleaseKey ( |
Releases a key as if it had been released by the keyboard. |
|
|
ReleasePointerKey ( |
Releases a key as if the mouse/pointer were the source of it. |
|
|
ScrollWheel ( |
Sends a scroll wheel event to the widget under the last hit result. |
|
|
SendKeyChar |
Transmits a list of characters to a widget by simulating a OnKeyChar event for each key listed in the string. |
|
|
SetCustomHitResult ( |
Set custom hit result. |
|
|
SetFocus ( |
Set the focus target of the virtual user managed by this component |
|
|
SimulatePointerMovement() |
Performs the simulation of pointer movement. Does not run if bEnableHitTesting is set to false. |
Name | Description | ||
---|---|---|---|
|
Activate ( |
Activates the SceneComponent, should be overridden by native child classes. |
|
|
Deactivate() |
Deactivates the SceneComponent. |
|
|
OnComponentCreated() |
Called when a component is created (not loaded). This can happen in the editor or during gameplay |
|
|
TickComponent ( |
Function called every frame on this ActorComponent. |
Name |
Description |
|
---|---|---|
|
FWidgetTraceResult |