You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
The "Name" here is the FName that will be used as a key to save each key mapping during serialization, so they should be unique for each key mapping that you want the player to be able to set. #jira UE-177248 #preflight 63f4ef2290198dffba48f6ee #rb benjamin.fox #rb nate.strohmyer #rnx [CL 24344605 by ben hoffman in ue5-main branch]
20 lines
659 B
C++
20 lines
659 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "EnhancedInputPlayerMappableNameValidator.h"
|
|
#include "InputEditorModule.h"
|
|
|
|
FEnhancedInputPlayerMappableNameValidator::FEnhancedInputPlayerMappableNameValidator(FName InExistingName)
|
|
: FStringSetNameValidator(InExistingName.ToString())
|
|
{ }
|
|
|
|
EValidatorResult FEnhancedInputPlayerMappableNameValidator::IsValid(const FString& Name, bool bOriginal)
|
|
{
|
|
EValidatorResult Result = FStringSetNameValidator::IsValid(Name, bOriginal);
|
|
|
|
if (Result != EValidatorResult::ExistingName && FInputEditorModule::IsMappingNameInUse(FName(Name)))
|
|
{
|
|
Result = EValidatorResult::AlreadyInUse;
|
|
}
|
|
|
|
return Result;
|
|
} |