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.
| void FInputBindingManager::AddCommandFilter | ( | const FName | InOwnerName, |
| const FName | InBindingContext, | ||
| const FName | InCommandName, | ||
| const ECommandFilterType | FilterType | ||
| ) |
Filters a command by name
| InOwnerName | The name of the owner adding filter so it can be unregistered later |
| InBindingContext | The context in which the command is active |
| InCommandName | The name of the command |
| FilterType | Type of filter to apply |
| bool FInputBindingManager::CommandPassesFilter | ( | const FName | InBindingContext, |
| const FName | InCommandName | ||
| ) | const |
Command passes blacklist and whitelist filters
| InBindingContext | The context in which the command is active |
| InCommandName | The name of the command |
| void FInputBindingManager::CreateInputCommand | ( | const TSharedRef< FBindingContext > & | InBindingContext, |
| TSharedRef< FUICommandInfo > | InUICommandInfo | ||
| ) |
Creates an input command from the specified user interface action
| InBindingContext | The context where the command is valid |
| InUICommandInfo | The 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 |
| 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
| InBindingContext | The binding context name |
| InChord | The chord to check against when looking for commands |
| bCheckDefault | Whether or not to check the default chord of commands instead of active chords |
| OutActiveChordIndex | The index into the commands active chord array where the passed in chord was matched. INDEX_NONE if bCheckDefault is true or nothing was found. |
| const TSharedPtr< FUICommandInfo > FInputBindingManager::FindCommandInContext | ( | const FName | InBindingContext, |
| const FName | CommandName | ||
| ) | const |
Finds the command in the provided context which has the provided name
| InBindingContext | The binding context name |
| CommandName | The name of the command to find |
|
static |
| 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
| InBindingContext | The context in which the command is valid |
| InChord | The chord to match against commands |
| bCheckDefault | Whether or not to check the default chord. Will check the active chord if false |
| void FInputBindingManager::GetCommandInfosFromContext | ( | const FName | InBindingContext, |
| TArray< TSharedPtr< FUICommandInfo > > & | OutCommandInfos | ||
| ) | const |
Returns all known command infos for a given binding context
| InBindingContext | The binding context to get command infos from |
| OutCommandInfos | The list of command infos for the binding context |
| void FInputBindingManager::GetKnownInputContexts | ( | TArray< TSharedPtr< FBindingContext > > & | OutInputContexts | ) | const |
Returns a list of all known input contexts
| OutInputContexts | The generated list of contexts |
| 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
| InBindingContext | The context in which the command is active |
| InCommandName | The name of the command to get the chord from |
| ChordIndex | The index of the key binding (in the multiple key bindings array) |
|
virtual |
Called when the active chord is changed on a command
| CommandInfo | The command that had the active chord changed. |
| void FInputBindingManager::RemoveInputCommand | ( | const TSharedRef< FBindingContext > & | InBindingContext, |
| TSharedRef< FUICommandInfo > | InUICommandInfo | ||
| ) |
Removes an input command, allowing a new one to take its place
| InBindingContext | The context where the command is valid |
| InUICommandInfo | The user interface action to remove |