Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework
FInputBehaviorModifierStates is an object that can be placed in an InputBehavior to allow users of the behavior to request that they be notified about modifier keys/buttons/etc state.
We don't know ahead of time what might be used to determine modifier state, which input devices might be used, etc. So the user has to register (ModifierID,ModifierTestFunction) pairs. The behavior then calls UpdateModifiers() which will query each of the test functions and notify the target object about the state of the modifier.
| Name | FInputBehaviorModifierStates |
| Type | class |
| Header File | /Engine/Source/Runtime/InteractiveToolsFramework/Public/BaseBehaviors/InputBehaviorModifierStates.h |
| Include Path | #include "BaseBehaviors/InputBehaviorModifierStates.h" |
Syntax
class FInputBehaviorModifierStates
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FModifierTestFunction | TFunction< bool(const FInputDeviceState &)> | BaseBehaviors/InputBehaviorModifierStates.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool HasModifiers() |
BaseBehaviors/InputBehaviorModifierStates.h | ||
void RegisterModifier
(
int ModifierID, |
Register a modifier ID and an associated test function | BaseBehaviors/InputBehaviorModifierStates.h | |
void UpdateModifiers
(
const FInputDeviceState& Input, |
Look up the current state of each registered modifier and pass to the target | BaseBehaviors/InputBehaviorModifierStates.h |