engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 属性 | 所有成员列表
FInputBehaviorModifierStates类 参考

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. 更多...

#include <InputBehaviorModifierStates.h>

Public 成员函数

bool HasModifiers () const
 
void RegisterModifier (int ModifierID, const FModifierTestFunction &ModifierTest)
 Register a modifier ID and an associated test function 更多...
 
void UpdateModifiers (const FInputDeviceState &Input, IModifierToggleBehaviorTarget *ModifiersTarget) const
 Look up the current state of each registered modifier and pass to the target 更多...
 

Protected 属性

TArray< int > ModifierIDs
 List of modifier IDs that have been registered
 
TMap< int, FModifierTestFunction > ModifierTests
 The modifier test function for each ID
 

详细描述

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.

成员函数说明

◆ HasModifiers()

bool FInputBehaviorModifierStates::HasModifiers ( ) const
inline
返回
true if any modifiers have been registered

◆ RegisterModifier()

void FInputBehaviorModifierStates::RegisterModifier ( int  ModifierID,
const FModifierTestFunction &  ModifierTest 
)
inline

Register a modifier ID and an associated test function

参数
ModifierIDthe modifier ID
ModifierTestthe test function

◆ UpdateModifiers()

void FInputBehaviorModifierStates::UpdateModifiers ( const FInputDeviceState &  Input,
IModifierToggleBehaviorTarget *  ModifiersTarget 
) const
inline

Look up the current state of each registered modifier and pass to the target

参数
Inputthe current input device state
ModifiersTargetthe target that is interested in the modifier values

该类的文档由以下文件生成: