Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework
A behavior that captures a keyboard hotkey to enter a sub-mode "bAdjustingBrush" while the key is pressed. The target tool must call OnDragStart() and OnDragUpdate() to feed the screen coordinates of the mouse for the duration of the behavior. And use "GetIsBrushBeingAdjusted" to pause/disable the brush motion while it is being adjusted.
OnDragStart() defines the starting location of an adjustment OnDragUpdate() adjusts the brush strength and radius based on the magnitude of the screen coordinate delta in the vertical and horizontal directions respectively.
| Name | UBrushAdjusterInputBehavior |
| Type | class |
| Header File | /Engine/Source/Runtime/InteractiveToolsFramework/Public/BaseTools/BaseBrushTool.h |
| Include Path | #include "BaseTools/BaseBrushTool.h" |
Syntax
UCLASS ()
class UBrushAdjusterInputBehavior : public UAnyButtonInputBehavior
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UInputBehavior → UAnyButtonInputBehavior → UBrushAdjusterInputBehavior
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AdjustmentOrigin | FVector2D | Screen coordinate when hotkey pressed (or when re-centered if changing direction) | BaseTools/BaseBrushTool.h | |
| bAdjustingBrush | bool | True for the duration of the behavior (while hotkey is down) | BaseTools/BaseBrushTool.h | |
| bAdjustingHorizontally | bool | Supports separate horizontal / vertical adjustments (switching dynamically based on magnitude) | BaseTools/BaseBrushTool.h | |
| BrushOrigin | FVector2D | Screen coordinate when hotkey pressed (or when re-centered if changing direction) | BaseTools/BaseBrushTool.h | |
| BrushTool | UBaseBrushTool * | The target brush tool to adjust | BaseTools/BaseBrushTool.h | |
| SizeAdjustSpeed | float | The speed (centimeters per unit of screen coordinate) to adjust brush size when dragging | BaseTools/BaseBrushTool.h | |
| StartBrushRadius | float | The radius of the brush when we started a drag | BaseTools/BaseBrushTool.h | |
| StartBrushStrength | float | The strength of the brush when we started a drag | BaseTools/BaseBrushTool.h | |
| StrengthAdjustSpeed | float | The speed (in strength per unit of screen coordinate) to adjust brush strength when dragging | BaseTools/BaseBrushTool.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DrawHUD
(
FCanvas* Canvas, |
BaseTools/BaseBrushTool.h | ||
void Initialize
(
UBaseBrushTool* InBrushTool |
BaseTools/BaseBrushTool.h | ||
bool IsBrushBeingAdjusted() |
BaseTools/BaseBrushTool.h | ||
void OnDragStart
(
FVector2D InScreenPosition |
BaseTools/BaseBrushTool.h | ||
void OnDragUpdate
(
FVector2D InScreenPosition |
BaseTools/BaseBrushTool.h | ||
void SetSizeAdjustSpeed
(
float InSizeSpeed |
BaseTools/BaseBrushTool.h | ||
void SetStrengthAdjustSpeed
(
float InStrengthSpeed |
BaseTools/BaseBrushTool.h |
Overridden from UAnyButtonInputBehavior
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsPressed
(
const FInputDeviceState& input |
BaseTools/BaseBrushTool.h | ||
virtual bool IsReleased
(
const FInputDeviceState& input |
BaseTools/BaseBrushTool.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 | BaseTools/BaseBrushTool.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 | BaseTools/BaseBrushTool.h | |
virtual EInputDevices GetSupportedDevices() |
UAnyButtonInputBehavior. | BaseTools/BaseBrushTool.h | |
virtual FInputCaptureUpdate UpdateCapture
(
const FInputDeviceState& InputState, |
Called for each new input event during a capture sequence. | BaseTools/BaseBrushTool.h | |
virtual FInputCaptureRequest WantsCapture
(
const FInputDeviceState& InputState |
Given the input state, does this Behavior want to begin capturing some input devices? | BaseTools/BaseBrushTool.h |