Hotkeys working now
This commit is contained in:
@@ -134,6 +134,15 @@ FFormatArgumentData UlxFormatDataLibrary::FormatArgumentDataName(FName Value, co
|
||||
return Result;
|
||||
}
|
||||
|
||||
FFormatArgumentData UlxFormatDataLibrary::FormatArgumentDataKey(FKey Value, const FString &Name)
|
||||
{
|
||||
FFormatArgumentData Result;
|
||||
Result.ArgumentValueType = EFormatArgumentType::Text;
|
||||
Result.ArgumentName = Name;
|
||||
Result.ArgumentValue = UKismetTextLibrary::Conv_NameToText(Value.GetFName());
|
||||
return Result;
|
||||
}
|
||||
|
||||
FFormatArgumentData UlxFormatDataLibrary::FormatArgumentDataGender(ETextGender Value, const FString &Name)
|
||||
{
|
||||
FFormatArgumentData Result;
|
||||
|
||||
@@ -125,6 +125,9 @@ public:
|
||||
UFUNCTION(BlueprintPure, meta = (BlueprintInternalUseOnly = "true"), Category = "Luprex|Utility")
|
||||
static FFormatArgumentData FormatArgumentDataName(FName Value, const FString &Name);
|
||||
|
||||
UFUNCTION(BlueprintPure, meta = (BlueprintInternalUseOnly = "true"), Category = "Luprex|Utility")
|
||||
static FFormatArgumentData FormatArgumentDataKey(FKey Value, const FString &Name);
|
||||
|
||||
UFUNCTION(BlueprintPure, meta = (BlueprintInternalUseOnly = "true"), Category = "Luprex|Utility")
|
||||
static FFormatArgumentData FormatArgumentDataGender(ETextGender Value, const FString &Name);
|
||||
|
||||
|
||||
@@ -37,6 +37,12 @@ enum class ElxSuccessOrError : uint8 {
|
||||
Error,
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ElxValidOrNotValid : uint8 {
|
||||
Valid,
|
||||
NotValid,
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ElxFoundOrNotFound : uint8 {
|
||||
Found,
|
||||
|
||||
@@ -227,3 +227,14 @@ ElxUsedOrNotUsed UlxUtilityLibrary::IsKeyUsedByMappingContext(const FKey &Key, c
|
||||
return ElxUsedOrNotUsed::NotUsed;
|
||||
}
|
||||
|
||||
FKey UlxUtilityLibrary::GetKeyByName(const FName &Name)
|
||||
{
|
||||
FKey Key = FKey(Name);
|
||||
return Key.IsValid() ? Key : FKey();
|
||||
}
|
||||
|
||||
FKey UlxUtilityLibrary::GetKeyByNameString(const FString &Name)
|
||||
{
|
||||
FKey Key = FKey(FName(*Name));
|
||||
return Key.IsValid() ? Key : FKey();
|
||||
}
|
||||
|
||||
@@ -140,4 +140,18 @@ public:
|
||||
//
|
||||
UFUNCTION(BlueprintCallable, Category = "Input", meta = (ExpandEnumAsExecs="ReturnValue"))
|
||||
static ElxUsedOrNotUsed IsKeyUsedByMappingContext(const FKey &Key, const UInputMappingContext *MappingContext);
|
||||
|
||||
// Get a key by name.
|
||||
//
|
||||
// Returns the null key if there is no such key.
|
||||
//
|
||||
UFUNCTION(BlueprintPure, Category = "Input|Key")
|
||||
static FKey GetKeyByName(const FName &Name);
|
||||
|
||||
// Get a key by name string.
|
||||
//
|
||||
// Returns the null key if there is no such key.
|
||||
//
|
||||
UFUNCTION(BlueprintPure, Category = "Input|Key")
|
||||
static FKey GetKeyByNameString(const FString &Name);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user