Navigation
API > API/Plugins > API/Plugins/ScriptableToolsFramework
UScriptableSingleClickTool is an extension of UScriptableInteractiveTool that supports a "click" interaction, ie button press-down-and-release on an arbitrary Target (defined by the Tool). Note that like a standard GUI click interaction, if the device is moved off the "Target" before the button is released, the click is cancelled. Note that in this context, the Target is defined implicitly by the Tool returning a "hit" for a given input device location, rather than any specific geometry.
Hover is also supported.
Note: Currently these interactions are only supported for mouse devices, or devices remapped to be a mouse by the UInputRouter. Also currently only the left-mouse-button is supported.
| Name | UScriptableSingleClickTool |
| Type | class |
| Header File | /Engine/Plugins/Runtime/ScriptableToolsFramework/Source/ScriptableToolsFramework/Public/BaseTools/ScriptableSingleClickTool.h |
| Include Path | #include "BaseTools/ScriptableSingleClickTool.h" |
Syntax
UCLASS (MinimalAPI, Hidden)
class UScriptableSingleClickTool :
public UScriptableInteractiveTool ,
public IClickBehaviorTarget ,
public IHoverBehaviorTarget
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UInteractiveTool → UScriptableInteractiveTool → UScriptableSingleClickTool
Implements Interfaces
Derived Classes
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAltModifier | bool | BaseTools/ScriptableSingleClickTool.h | ||
| bCtrlModifier | bool | BaseTools/ScriptableSingleClickTool.h | ||
| bInHover | bool | BaseTools/ScriptableSingleClickTool.h | ||
| bShiftModifier | bool | BaseTools/ScriptableSingleClickTool.h | ||
| bWantMouseHover | bool | Enable Hover support API functions OnHoverHitTest / OnHoverBegin / OnHoverUpdate / OnHoverEnd for Mouse devices. | BaseTools/ScriptableSingleClickTool.h |
|
| MouseHoverBehavior | TObjectPtr< UMouseHoverBehavior > | BaseTools/ScriptableSingleClickTool.h |
|
|
| SingleClickBehavior | TObjectPtr< USingleClickInputBehavior > | BaseTools/ScriptableSingleClickTool.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FScriptableToolModifierStates GetActiveModifiers() |
BaseTools/ScriptableSingleClickTool.h |
|
|
bool InActiveHover() |
BaseTools/ScriptableSingleClickTool.h |
|
|
bool IsAltDown() |
BaseTools/ScriptableSingleClickTool.h |
|
|
bool IsCtrlDown() |
BaseTools/ScriptableSingleClickTool.h |
|
|
bool IsShiftDown() |
Modifer Buttons Support API | BaseTools/ScriptableSingleClickTool.h |
|
void OnHitByClick
(
FInputDeviceRay ClickPos, |
OnHitByClick is called when the Tool has indicated it would like to consume a click event (via TestIfHitByClick), and the click was not cancelled or consumed by a nearer object. | BaseTools/ScriptableSingleClickTool.h |
|
virtual void OnHitByClick_Implementation
(
FInputDeviceRay ClickPos, |
BaseTools/ScriptableSingleClickTool.h | ||
void OnHoverBegin
(
FInputDeviceRay HoverPos, |
Begin a sequence of Hover input events | BaseTools/ScriptableSingleClickTool.h |
|
virtual void OnHoverBegin_Implementation
(
FInputDeviceRay HoverPos, |
BaseTools/ScriptableSingleClickTool.h | ||
void OnHoverEnd
(
const FScriptableToolModifierStates& Modifiers |
Indicate that an active captured Hover sequence has ended. | BaseTools/ScriptableSingleClickTool.h |
|
virtual void OnHoverEnd_Implementation
(
const FScriptableToolModifierStates& Modifiers |
BaseTools/ScriptableSingleClickTool.h | ||
FInputRayHit OnHoverHitTest
(
FInputDeviceRay HoverPos, |
Hover Support API OnHoverHitTest is called to allow the Tool to indicate if it would like to start consuing "hover" input at HoverPos. | BaseTools/ScriptableSingleClickTool.h |
|
virtual FInputRayHit OnHoverHitTest_Implementation
(
FInputDeviceRay HoverPos, |
BaseTools/ScriptableSingleClickTool.h | ||
bool OnHoverUpdate
(
FInputDeviceRay HoverPos, |
Update an active Hover sequence. | BaseTools/ScriptableSingleClickTool.h |
|
virtual bool OnHoverUpdate_Implementation
(
FInputDeviceRay HoverPos, |
BaseTools/ScriptableSingleClickTool.h | ||
FInputRayHit TestIfHitByClick
(
FInputDeviceRay ClickPos, |
Click Support API TestIfHitByClick is called to allow the Tool to indicate if it would like to consume a potential click at ClickPos. | BaseTools/ScriptableSingleClickTool.h |
|
virtual FInputRayHit TestIfHitByClick_Implementation
(
FInputDeviceRay ClickPos, |
BaseTools/ScriptableSingleClickTool.h |
Overridden from UInteractiveTool
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Setup() |
BaseTools/ScriptableSingleClickTool.h |
Overridden from IClickBehaviorTarget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FInputRayHit IsHitByClick
(
const FInputDeviceRay& ClickPos |
IClickBehaviorTarget API. | BaseTools/ScriptableSingleClickTool.h | |
virtual void OnClicked
(
const FInputDeviceRay& ClickPos |
BaseTools/ScriptableSingleClickTool.h |
Overridden from IModifierToggleBehaviorTarget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnUpdateModifierState
(
int ModifierID, |
BaseTools/ScriptableSingleClickTool.h |
Overridden from IHoverBehaviorTarget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FInputRayHit BeginHoverSequenceHitTest
(
const FInputDeviceRay& PressPos |
IHoverBehaviorTarget API. | BaseTools/ScriptableSingleClickTool.h | |
virtual void OnBeginHover
(
const FInputDeviceRay& DevicePos |
BaseTools/ScriptableSingleClickTool.h | ||
virtual void OnEndHover() |
BaseTools/ScriptableSingleClickTool.h | ||
virtual bool OnUpdateHover
(
const FInputDeviceRay& DevicePos |
BaseTools/ScriptableSingleClickTool.h |