You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
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;
|
||
|
|
}
|