Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions Source/Flow/Private/Nodes/Graph/FlowNode_FormatText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ FFlowDataPinResult UFlowNode_FormatText::TrySupplyDataPin(FName PinName) const
if (PinName == OUTPIN_TextOutput)
{
FText FormattedText;
const EFlowDataPinResolveResult FormatResult = TryResolveFormatText(PinName, FormattedText);
const EFlowDataPinResolveResult FormatResult = TryResolveFormattedText(PinName, FormattedText);

if (FlowPinType::IsSuccess(FormatResult))
{
Expand All @@ -39,15 +39,18 @@ FFlowDataPinResult UFlowNode_FormatText::TrySupplyDataPin(FName PinName) const
return Super::TrySupplyDataPin(PinName);
}

EFlowDataPinResolveResult UFlowNode_FormatText::TryResolveFormatText(const FName& PinName, FText& OutFormattedText) const
EFlowDataPinResolveResult UFlowNode_FormatText::TryResolveFormattedText(const FName& PinName, FText& OutFormattedText) const
{
if (TryFormatTextWithNamedPropertiesAsParameters(FormatText, OutFormattedText))
FText ResolvedFormatText = FormatText;
const EFlowDataPinResolveResult ResolveResult = TryResolveDataPinValue<FFlowPinType_Text>(GET_MEMBER_NAME_CHECKED(ThisClass, FormatText), ResolvedFormatText);

if (TryFormatTextWithNamedPropertiesAsParameters(ResolvedFormatText, OutFormattedText))
{
return EFlowDataPinResolveResult::Success;
}
else
{
LogError(FString::Printf(TEXT("Could not format text '%s' with properties as parameters"), *FormatText.ToString()), EFlowOnScreenMessageType::Temporary);
LogError(FString::Printf(TEXT("Could not format text '%s' with properties as parameters"), *ResolvedFormatText.ToString()), EFlowOnScreenMessageType::Temporary);

return EFlowDataPinResolveResult::FailedWithError;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Flow/Public/Nodes/Graph/FlowNode_FormatText.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class FLOW_API UFlowNode_FormatText : public UFlowNode_DefineProperties
#endif

protected:
EFlowDataPinResolveResult TryResolveFormatText(const FName& PinName, FText& OutFormattedText) const;
EFlowDataPinResolveResult TryResolveFormattedText(const FName& PinName, FText& OutFormattedText) const;

public:
// IFlowDataPinValueSupplierInterface
Expand Down