UClickDragInputBehavior

[UClickDragInputBehavior](API\Runtime\InteractiveToolsFramework\BaseBehaviors\UClickDragInputBehavior) implements a standard "button-click-drag"-style input behavior.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

InteractiveToolsFramework

Header

/Engine/Source/Runtime/Experimental/InteractiveToolsFramework/Public/BaseBehaviors/ClickDragBehavior.h

Include

#include "BaseBehaviors/ClickDragBehavior.h"

Syntax

class UClickDragInputBehavior : public UAnyButtonInputBehavior

Remarks

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

Variables

Name Description

Protected variable

bool

 

bInClickDrag

Set to true if we are in a capture

Public variable

bool

 

bUpdateModifiersDuringDrag

If true, then we will update Modifier states in UpdateCapture().

Public variable

TFunction< bool...

 

ModifierCheckFunc

WantsCapture() will only return capture request if this function returns true (or is null)

Public variable

FInputBehaviorM...

 

Modifiers

The modifier set for this behavior

Protected variable

IClickDragBehav...

 

Target

Click Target object

Constructors

Name Description

Public function

UClickDragInputBehavior()

Functions

Name Description

Public function Virtual

void

 

Initialize

(
    IClickDragBehaviorTarget* Targ...
)

Initialize this behavior with the given Target

Protected function Virtual

void

 

OnClickDragInternal

(
    const FInputDeviceState& Input,
    const FInputCaptureData& Data
)

Internal function that forwards click evens to Target::OnClickDrag, you can customize behavior here

Protected function Virtual

void

 

OnClickPressInternal

(
    const FInputDeviceState& Input,
    EInputCaptureSide Side
)

Internal function that forwards click evens to Target::OnClickPress, you can customize behavior here

Protected function Virtual

void

 

OnClickReleaseInternal

(
    const FInputDeviceState& Input,
    const FInputCaptureData& Data
)

Internal function that forwards click evens to Target::OnClickRelease, you can customize behavior here

Overridden from UInputBehavior

Name Description

Public function Virtual

FInputCaptur...

 

BeginCapture

(
    const FInputDeviceState& InputStat...,
    EInputCaptureSide eSide
)

Called after WantsCapture() returns a capture request that was accepted

Public function Virtual

void

 

ForceEndCapture

(
    const FInputCaptureData& CaptureDa...
)

If this is called, the Behavior has forcibly lost capture (eg due to app losing focus for example) and needs to clean up accordingly

Public function Virtual

FInputCaptur...

 

UpdateCapture

(
    const FInputDeviceState& InputStat...,
    const FInputCaptureData& CaptureDa...
)

Called for each new input event during a capture sequence.

Public function Virtual

FInputCaptur...

 

WantsCapture

(
    const FInputDeviceState& InputStat...
)

Given the input state, does this Behavior want to begin capturing some input devices?

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss