engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
FInputBindingManager类 参考

Manager responsible for creating and processing input bindings. 更多...

#include <InputBindingManager.h>

Public 成员函数

void AddCommandFilter (const FName InOwnerName, const FName InBindingContext, const FName InCommandName, const ECommandFilterType FilterType)
 Filters a command by name 更多...
 
bool CommandPassesFilter (const FName InBindingContext, const FName InCommandName) const
 Command passes blacklist and whitelist filters 更多...
 
void CreateInputCommand (const TSharedRef< FBindingContext > &InBindingContext, TSharedRef< FUICommandInfo > InUICommandInfo)
 Creates an input command from the specified user interface action 更多...
 
const TSharedPtr< FUICommandInfo > FindCommandInContext (const FName InBindingContext, const FInputChord &InChord, bool bCheckDefault) const
 Finds the command in the provided context which uses the provided input chord 更多...
 
const TSharedPtr< FUICommandInfo > FindCommandInContext (const FName InBindingContext, const FName CommandName) const
 Finds the command in the provided context which has the provided name 更多...
 
const TSharedPtr< FUICommandInfo > GetCommandInfoFromInputChord (const FName InBindingContext, const FInputChord &InChord, bool bCheckDefault) const
 Returns a command info that is has the same active chord as the provided chord and is in the same binding context or parent context 更多...
 
void GetCommandInfosFromContext (const FName InBindingContext, TArray< TSharedPtr< FUICommandInfo > > &OutCommandInfos) const
 Returns all known command infos for a given binding context 更多...
 
TSharedPtr< FBindingContext > GetContextByName (const FName &InContextName)
 Look up a binding context by name.
 
void GetKnownInputContexts (TArray< TSharedPtr< FBindingContext > > &OutInputContexts) const
 Returns a list of all known input contexts 更多...
 
bool GetUserDefinedChord (const FName InBindingContext, const FName InCommandName, const EMultipleKeyBindingIndex InChordIndex, FInputChord &OutUserDefinedChord)
 Gets the user defined chord (if any) from the provided command name 更多...
 
virtual void NotifyActiveChordChanged (const FUICommandInfo &CommandInfo, const EMultipleKeyBindingIndex InChordIndex)
 Called when the active chord is changed on a command 更多...
 
FDelegateHandle RegisterUserDefinedChordChanged (const FOnUserDefinedChordChanged::FDelegate &Delegate)
 Registers a delegate to be called when a user-defined chord is edited
 
void RemoveContextByName (const FName &InContextName)
 Remove the context with this name
 
void RemoveInputCommand (const TSharedRef< FBindingContext > &InBindingContext, TSharedRef< FUICommandInfo > InUICommandInfo)
 Removes an input command, allowing a new one to take its place 更多...
 
void RemoveUserDefinedChords ()
 Removes any user defined chords
 
void SaveInputBindings ()
 Saves the user defined chords to a json file
 
void UnregisterCommandFilterOwner (const FName InOwnerName)
 Removes all filters associated with an owner
 
void UnregisterUserDefinedChordChanged (FDelegateHandle DelegateHandle)
 Unregisters a delegate to be called when a user-defined chord is edited
 
virtual ~FInputBindingManager ()
 Virtual destructor
 

静态 Public 成员函数

static FInputBindingManager & Get ()
 

详细描述

Manager responsible for creating and processing input bindings.


成员函数说明

◆ AddCommandFilter()

void FInputBindingManager::AddCommandFilter ( const FName  InOwnerName,
const FName  InBindingContext,
const FName  InCommandName,
const ECommandFilterType  FilterType 
)

Filters a command by name

参数
InOwnerNameThe name of the owner adding filter so it can be unregistered later
InBindingContextThe context in which the command is active
InCommandNameThe name of the command
FilterTypeType of filter to apply

◆ CommandPassesFilter()

bool FInputBindingManager::CommandPassesFilter ( const FName  InBindingContext,
const FName  InCommandName 
) const

Command passes blacklist and whitelist filters

参数
InBindingContextThe context in which the command is active
InCommandNameThe name of the command

◆ CreateInputCommand()

void FInputBindingManager::CreateInputCommand ( const TSharedRef< FBindingContext > &  InBindingContext,
TSharedRef< FUICommandInfo >  InUICommandInfo 
)

Creates an input command from the specified user interface action

参数
InBindingContextThe context where the command is valid
InUICommandInfoThe user interface action to create the input command from Will automatically bind the user interface action to the command specified by the action so when the command's chord is pressed, the action is executed

◆ FindCommandInContext() [1/2]

const TSharedPtr< FUICommandInfo > FInputBindingManager::FindCommandInContext ( const FName  InBindingContext,
const FInputChord &  InChord,
bool  bCheckDefault 
) const

Finds the command in the provided context which uses the provided input chord

参数
InBindingContextThe binding context name
InChordThe chord to check against when looking for commands
bCheckDefaultWhether or not to check the default chord of commands instead of active chords
OutActiveChordIndexThe index into the commands active chord array where the passed in chord was matched. INDEX_NONE if bCheckDefault is true or nothing was found.

◆ FindCommandInContext() [2/2]

const TSharedPtr< FUICommandInfo > FInputBindingManager::FindCommandInContext ( const FName  InBindingContext,
const FName  CommandName 
) const

Finds the command in the provided context which has the provided name

参数
InBindingContextThe binding context name
CommandNameThe name of the command to find

◆ Get()

static FInputBindingManager & FInputBindingManager::Get ( )
static
返回
The instance of this manager

◆ GetCommandInfoFromInputChord()

const TSharedPtr< FUICommandInfo > FInputBindingManager::GetCommandInfoFromInputChord ( const FName  InBindingContext,
const FInputChord &  InChord,
bool  bCheckDefault 
) const

Returns a command info that is has the same active chord as the provided chord and is in the same binding context or parent context

参数
InBindingContextThe context in which the command is valid
InChordThe chord to match against commands
bCheckDefaultWhether or not to check the default chord. Will check the active chord if false
返回
A pointer to the command info which has the InChord as its active chord or null if one cannot be found

◆ GetCommandInfosFromContext()

void FInputBindingManager::GetCommandInfosFromContext ( const FName  InBindingContext,
TArray< TSharedPtr< FUICommandInfo > > &  OutCommandInfos 
) const

Returns all known command infos for a given binding context

参数
InBindingContextThe binding context to get command infos from
OutCommandInfosThe list of command infos for the binding context

◆ GetKnownInputContexts()

void FInputBindingManager::GetKnownInputContexts ( TArray< TSharedPtr< FBindingContext > > &  OutInputContexts) const

Returns a list of all known input contexts

参数
OutInputContextsThe generated list of contexts
返回
A list of all known input contexts

◆ GetUserDefinedChord()

bool FInputBindingManager::GetUserDefinedChord ( const FName  InBindingContext,
const FName  InCommandName,
const EMultipleKeyBindingIndex  InChordIndex,
FInputChord &  OutUserDefinedChord 
)

Gets the user defined chord (if any) from the provided command name

参数
InBindingContextThe context in which the command is active
InCommandNameThe name of the command to get the chord from
ChordIndexThe index of the key binding (in the multiple key bindings array)

◆ NotifyActiveChordChanged()

virtual void FInputBindingManager::NotifyActiveChordChanged ( const FUICommandInfo &  CommandInfo,
const EMultipleKeyBindingIndex  InChordIndex 
)
virtual

Called when the active chord is changed on a command

参数
CommandInfoThe command that had the active chord changed.

◆ RemoveInputCommand()

void FInputBindingManager::RemoveInputCommand ( const TSharedRef< FBindingContext > &  InBindingContext,
TSharedRef< FUICommandInfo >  InUICommandInfo 
)

Removes an input command, allowing a new one to take its place

参数
InBindingContextThe context where the command is valid
InUICommandInfoThe user interface action to remove

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