Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework
UClickDragInputBehavior implements a standard "button-click-drag"-style input behavior. An IClickDragBehaviorTarget instance must be provided which is manipulated by this behavior.
The state machine works as follows: 1) on input-device-button-press, call Target::CanBeginClickDragSequence to determine if capture should begin 2) on input-device-move, call Target::OnClickDrag 3) on input-device-button-release, call Target::OnClickRelease
If a ForceEndCapture occurs we call Target::OnTerminateDragSequence
| Name | UClickDragInputBehavior |
| Type | class |
| Header File | /Engine/Source/Runtime/InteractiveToolsFramework/Public/BaseBehaviors/ClickDragBehavior.h |
| Include Path | #include "BaseBehaviors/ClickDragBehavior.h" |
Syntax
UCLASS (MinimalAPI)
class UClickDragInputBehavior : public UAnyButtonInputBehavior
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UInputBehavior → UAnyButtonInputBehavior → UClickDragInputBehavior
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UClickDragInputBehavior() |
BaseBehaviors/ClickDragBehavior.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bUpdateModifiersDuringDrag | bool | If true, then we will update Modifier states in UpdateCapture(). | BaseBehaviors/ClickDragBehavior.h | |
| ModifierCheckFunc | TFunction< bool(const FInputDeviceState &)> | WantsCapture() will only return capture request if this function returns true (or is null) | BaseBehaviors/ClickDragBehavior.h | |
| Modifiers | FInputBehaviorModifierStates | The modifier set for this behavior | BaseBehaviors/ClickDragBehavior.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Initialize
(
IClickDragBehaviorTarget* Target |
Initialize this behavior with the given Target | BaseBehaviors/ClickDragBehavior.h |
Overridden from UInputBehavior
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FInputCaptureUpdate BeginCapture
(
const FInputDeviceState& InputState, |
Called after WantsCapture() returns a capture request that was accepted | BaseBehaviors/ClickDragBehavior.h | |
virtual void ForceEndCapture
(
const FInputCaptureData& CaptureData |
If this is called, the Behavior has forcibly lost capture (eg due to app losing focus for example) and needs to clean up accordingly | BaseBehaviors/ClickDragBehavior.h | |
virtual FInputCaptureUpdate UpdateCapture
(
const FInputDeviceState& InputState, |
Called for each new input event during a capture sequence. | BaseBehaviors/ClickDragBehavior.h | |
virtual FInputCaptureRequest WantsCapture
(
const FInputDeviceState& InputState |
Given the input state, does this Behavior want to begin capturing some input devices? | BaseBehaviors/ClickDragBehavior.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnClickDragInternal
(
const FInputDeviceState& Input, |
Internal function that forwards click evens to Target::OnClickDrag, you can customize behavior here | BaseBehaviors/ClickDragBehavior.h | |
virtual void OnClickPressInternal
(
const FInputDeviceState& Input, |
Internal function that forwards click evens to Target::OnClickPress, you can customize behavior here | BaseBehaviors/ClickDragBehavior.h | |
virtual void OnClickReleaseInternal
(
const FInputDeviceState& Input, |
Internal function that forwards click evens to Target::OnClickRelease, you can customize behavior here | BaseBehaviors/ClickDragBehavior.h |