Navigation
API > API/Plugins > API/Plugins/ScriptableToolsFramework > API/Plugins/ScriptableToolsFramework/BaseTools > API/Plugins/ScriptableToolsFramework/BaseTools/UScriptableModularBehaviorTool
References
| Module | ScriptableToolsFramework |
| Header | /Engine/Plugins/Runtime/ScriptableToolsFramework/Source/ScriptableToolsFramework/Public/BaseTools/ScriptableModularBehaviorTool.h |
| Include | #include "BaseTools/ScriptableModularBehaviorTool.h" |
| Source | /Engine/Plugins/Runtime/ScriptableToolsFramework/Source/ScriptableToolsFramework/Private/BaseTools/ScriptableModularBehaviorTool.cpp |
UFUNCTION (BlueprintCallable, Category="ScriptableTool|Input",
Meta=(AdvancedDisplay="CaptureCheck, CapturePriority, MouseButton, bHitTestOnRelease"))
void AddDoubleClickBehavior
(
const FTestIfHitByClickDelegate IfHitByClick,
const FOnHitByClickDelegate OnHitByClick,
const FMouseBehaviorModiferCheckDelegate CaptureCheck,
int CapturePriority,
EScriptableToolMouseButton MouseButton,
bool bHitTestOnRelease
)
Remarks
Implements a standard "button-click"-style input behavior The state machine works as follows: 1) on input-device-button-press, hit-test the target. If hit, begin capture 2) on input-device-button-release, hit-test the target. If hit, call OnClicked(). If not hit, ignore click.
The second hit-test is required to allow the click to be "cancelled" by moving away from the target. This is standard GUI behavior. You can disable this second hit test using the HitTestOnRelease property. This is strongly discouraged.
Parameters
| Name | Description |
|---|---|
| IfHitByClick | Test if hit by a click |
| OnHitByClick | Notify that double click occurred |
| CaptureCheck | Only enable capture if returns true |
| CapturePriority | The priority is used to resolve situations where multiple behaviors want the same capture |
| MouseButton | Determines which mouse button the behavior captures on |