Navigation
API > API/Plugins > API/Plugins/ScriptableToolsFramework > API/Plugins/ScriptableToolsFramework/BaseTools
Inheritance Hierarchy
- UObject
- IInputBehaviorSource
- UInteractiveTool
- UScriptableInteractiveTool
- UScriptableSingleClickTool
- UEditorScriptableSingleClickTool
References
| Module | ScriptableToolsFramework |
| Header | /Engine/Plugins/Runtime/ScriptableToolsFramework/Source/ScriptableToolsFramework/Public/BaseTools/ScriptableSingleClickTool.h |
| Include | #include "BaseTools/ScriptableSingleClickTool.h" |
Syntax
UCLASS (Hidden)
class UScriptableSingleClickTool :
public UScriptableInteractiveTool ,
public IClickBehaviorTarget ,
public IHoverBehaviorTarget
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bAltModifier | ||
| bool | bCtrlModifier | ||
| bool | bInHover | ||
| bool | bShiftModifier | ||
| bool | bWantMouseHover | Enable Hover support API functions OnHoverHitTest / OnHoverBegin / OnHoverUpdate / OnHoverEnd for Mouse devices. | |
| const FScriptableToolModifierStates & | Modifiers | ||
| TObjectPtr< UMouseHoverBehavior > | MouseHoverBehavior | ||
| TObjectPtr< USingleClickInputBehavior > | SingleClickBehavior |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FScriptableToolModifierStates | |||
| 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. | |
| void | OnHitByClick_Implementation
(
FInputDeviceRay ClickPos, |
||
| void | OnHoverBegin
(
FInputDeviceRay HoverPos, |
Begin a sequence of Hover input events | |
| void | OnHoverBegin_Implementation
(
FInputDeviceRay HoverPos, |
||
| void | OnHoverEnd
(
const FScriptableToolModifierStates& Modifiers |
Indicate that an active captured Hover sequence has ended. | |
| void | OnHoverEnd_Implementation
(
const FScriptableToolModifierStates& Modifiers |
||
| 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. | |
| FInputRayHit | OnHoverHitTest_Implementation
(
FInputDeviceRay HoverPos, |
||
| bool | OnHoverUpdate_Implementation
(
FInputDeviceRay HoverPos, |
||
| 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. | |
| FInputRayHit | TestIfHitByClick_Implementation
(
FInputDeviceRay ClickPos, |
||
UPARAM
(
DisplayName |
Update an active Hover sequence. | ||
UPARAM
(
DisplayName |
|||
UPARAM
(
DisplayName |
Modifer Buttons Support API | ||
UPARAM
(
DisplayName |
|||
UPARAM
(
DisplayName |
Overridden from UInteractiveTool
| Type | Name | Description | |
|---|---|---|---|
| void | Setup () |
Called by ToolManager to initialize the Tool after ToolBuilder::BuildTool() has been called |
Overridden from IClickBehaviorTarget
| Type | Name | Description | |
|---|---|---|---|
| FInputRayHit | IsHitByClick
(
const FInputDeviceRay& ClickPos |
IClickBehaviorTarget API. | |
| void | OnClicked
(
const FInputDeviceRay& ClickPos |
Notify Target that click ocurred |
Overridden from IModifierToggleBehaviorTarget
| Type | Name | Description | |
|---|---|---|---|
| void | OnUpdateModifierState
(
int ModifierID, |
Notify target of current modifier state |
Overridden from IHoverBehaviorTarget
| Type | Name | Description | |
|---|---|---|---|
| FInputRayHit | BeginHoverSequenceHitTest
(
const FInputDeviceRay& PressPos |
IHoverBehaviorTarget API. | |
| void | OnBeginHover
(
const FInputDeviceRay& DevicePos |
Initialize hover sequence at given position | |
| void | OnEndHover () |
Terminate active hover sequence | |
| bool | OnUpdateHover
(
const FInputDeviceRay& DevicePos |
Update active hover sequence with new input position |