Navigation
BlueprintAPI > BlueprintAPI/ScriptableTool > BlueprintAPI/ScriptableTool/Input
SingleClickOrDragBehavior is a combination of a SingleClickBehavior and ClickDragBehavior, and allows for the common UI interaction where a click-and-release does one action, but if the mouse is moved, then a drag interaction is started. For example click-to-select is often combined with a drag-marquee-rectangle in this way. This can be directly implemented with a ClickDragBehavior but requires the client to (eg) detect movement thresholds, etc. This class encapsulates all that state/logic.
The ClickDistanceThreshold parameter determines how far the mouse must move (in whatever device units are in use) to switch from a click to drag interaction
The bBeginDragIfClickTargetNotHit parameter determines if the drag interaction will be immediately initiated if the initial 'click' mouse-down does not hit a valid clickable target. Defaults to true.
Target is Scriptable Modular Behavior Tool
Inputs
| Type | Name | Description |
|---|---|---|
| exec | In | |
| object | Target | |
| delegate | If Hit by Click | Test if hit by a click |
| delegate | On Hit by Click | Notify that click occurred |
| delegate | Can Begin Click Drag Sequence | Test if target can begin click-drag interaction at this point |
| delegate | On Click Press | Notify Target that click press occurred |
| delegate | On Click Drag | Notify Target that input position has changed |
| delegate | On Click Release | Notify Target that click release occurred |
| delegate | On Terminate Drag Sequence | Notify Target that click-drag sequence has been explicitly terminated (eg by escape key) |
| delegate | Capture Check | Only enable capture if returns true |
| integer | Capture Priority | The priority is used to resolve situations where multiple behaviors want the same capture |
| enum | Mouse Button | Determines which mouse button the behavior captures on |
| boolean | Begin Drag if Click Target Not Hit | |
| real | Click Distance Threshold |
Outputs
| Type | Name | Description |
|---|---|---|
| exec | Out |