21 TEXT(
"FAILED to construct text argument because the PARTICIPANT is INVALID (Supplied Participant = %s). \nContext:\n\t%s, DisplayString = %s, ParticipantName = %s, ArgumentType = %s"),
24 return FFormatArgumentValue(FText::FromString(TEXT(
"[CustomTextArgument is INVALID. Missing Participant. Check log]")));
33 return FFormatArgumentValue(FNYReflectionHelper::GetVariable<FNYIntProperty, int32>(
Participant,
VariableName));
39 return FFormatArgumentValue(FNYReflectionHelper::GetVariable<FNYFloatProperty, float>(
Participant,
VariableName));
42 return FFormatArgumentValue(FNYReflectionHelper::GetVariable<FNYTextProperty, FText>(
Participant,
VariableName));
45 return FFormatArgumentValue(IDlgDialogueParticipant::Execute_GetParticipantDisplayName(
Participant, NodeOwner));
48 return FFormatArgumentValue(IDlgDialogueParticipant::Execute_GetParticipantGender(
Participant));
54 TEXT(
"Custom Text Argument is INVALID. Returning Error Text. Context:\n\t%s, Participant = %s"),
57 return FFormatArgumentValue(FText::FromString(TEXT(
"[CustomTextArgument is INVALID. Missing Custom Text Argument. Check log]")));
64 return FFormatArgumentValue(0);
70 TArray<FString> NewArgumentParams;
71 FText::GetFormatPatternParameters(Text, NewArgumentParams);
73 TArray<FDlgTextArgument> OldArguments = InOutArgumentArray;
74 InOutArgumentArray.Empty();
76 for (
const FString&
String : NewArgumentParams)
84 if (
String == OldArgument.DisplayString)
86 Argument = OldArgument;
91 InOutArgumentArray.Add(Argument);
const UObject * GetParticipant(FName ParticipantName) const
FString GetContextString() const
UFUNCTION(BlueprintPure, Category = "Dialogue|Context")
FText GetText(const UDlgContext *Context, const UObject *Participant, const FString &DisplayStringParam)
UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category = "Dialogue")
UDlgTextArgumentCustom * CustomTextArgument
UPROPERTY(Instanced, EditAnywhere, BlueprintReadWrite, Category = "Dialogue|TextArgument")
FString DisplayString
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Dialogue|TextArgument")
FName ParticipantName
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Dialogue|TextArgument")
FName VariableName
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Dialogue|TextArgument")
FFormatArgumentValue ConstructFormatArgumentValue(const UDlgContext &Context, FName NodeOwner) const
static FString ArgumentTypeToString(EDlgTextArgumentType Type)
static void UpdateTextArgumentArray(const FText &Text, TArray< FDlgTextArgument > &InOutArgumentArray)