Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework > API/Runtime/InteractiveToolsFramework/BaseBehaviors
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UInputBehavior
- UAnyButtonInputBehavior
- UClickDragInputBehavior
- ULocalClickDragInputBehavior
References
| Module | InteractiveToolsFramework |
| Header | /Engine/Source/Runtime/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
| Type | Name | Description | |
|---|---|---|---|
| bool | bInClickDrag | Set to true if we are in a capture | |
| bool | bUpdateModifiersDuringDrag | If true, then we will update Modifier states in UpdateCapture(). | |
| TFunction< bool(const FInputDeviceState &)> | ModifierCheckFunc | WantsCapture() will only return capture request if this function returns true (or is null) | |
| FInputBehaviorModifierStates | Modifiers | The modifier set for this behavior | |
| IClickDragBehaviorTarget * | Target | Click Target object |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Initialize
(
IClickDragBehaviorTarget* Target |
Initialize this behavior with the given Target | |
| void | OnClickDragInternal
(
const FInputDeviceState& Input, |
Internal function that forwards click evens to Target::OnClickDrag, you can customize behavior here | |
| void | OnClickPressInternal
(
const FInputDeviceState& Input, |
Internal function that forwards click evens to Target::OnClickPress, you can customize behavior here | |
| void | OnClickReleaseInternal
(
const FInputDeviceState& Input, |
Internal function that forwards click evens to Target::OnClickRelease, you can customize behavior here |
Overridden from UInputBehavior
| Type | Name | Description | |
|---|---|---|---|
| FInputCaptureUpdate | BeginCapture
(
const FInputDeviceState& InputState, |
Called after WantsCapture() returns a capture request that was accepted | |
| 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 | |
| FInputCaptureUpdate | UpdateCapture
(
const FInputDeviceState& InputState, |
Called for each new input event during a capture sequence. | |
| FInputCaptureRequest | WantsCapture
(
const FInputDeviceState& InputState |
Given the input state, does this Behavior want to begin capturing some input devices? |