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
12 changes: 7 additions & 5 deletions Source/Flow/Private/Nodes/Route/FlowNode_ExecutionMultiGate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ UFlowNode_ExecutionMultiGate::UFlowNode_ExecutionMultiGate()
NodeDisplayStyle = FlowNodeStyle::Logic;
#endif

FString ResetPinTooltip = TEXT("Finish work of this node.");
ResetPinTooltip += LINE_TERMINATOR;
ResetPinTooltip += TEXT("Calling In input will start triggering output pins once again.");

InputPins.Add(FFlowPin(TEXT("Reset"), ResetPinTooltip));
FFlowPin ResetPin(TEXT("Reset"));
#if WITH_EDITORONLY_DATA
ResetPin.PinToolTip = TEXT("Finish work of this node.");
ResetPin.PinToolTip += LINE_TERMINATOR;
ResetPin.PinToolTip += TEXT("Calling In input will start triggering output pins once again.");
#endif
InputPins.Add(ResetPin);
SetNumberedOutputPins(0, 1);
AllowedSignalModes = {EFlowSignalMode::Enabled, EFlowSignalMode::Disabled};
}
Expand Down
30 changes: 22 additions & 8 deletions Source/Flow/Public/Nodes/FlowPin.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,20 @@ struct FLOW_API FFlowPin
UPROPERTY(EditDefaultsOnly, Category = FlowPin)
FName PinName;

/* An optional Display Name, you can use it to override PinName without the need to update graph connections. */
#if WITH_EDITORONLY_DATA
/*
* Editor Only
* An optional Display Name, you can use it to override PinName without the need to update graph connections.
*/
UPROPERTY(EditDefaultsOnly, Category = FlowPin)
FText PinFriendlyName;

/*
* Editor Only
*/
UPROPERTY(EditDefaultsOnly, Category = FlowPin)
FString PinToolTip;
#endif

/* Deprecated PinType, use PinTypeName instead (all standard names are defined in FFlowPinTypeNamesStandard). */
UPROPERTY(Meta = (DeprecatedProperty, DeprecationMessage = "Use PinTypeName instead"))
Expand Down Expand Up @@ -90,16 +98,19 @@ struct FLOW_API FFlowPin
: PinName(FName(*FString::FromInt(InPinName)))
{
}

explicit FFlowPin(const FStringView InPinName, const FText& InPinFriendlyName)
explicit FFlowPin(const FStringView InPinName, const FString& InPinTooltip)
: PinName(InPinName)
, PinFriendlyName(InPinFriendlyName)
#if WITH_EDITORONLY_DATA
, PinToolTip(InPinTooltip)
#endif
{
}

explicit FFlowPin(const FStringView InPinName, const FString& InPinTooltip)

#if WITH_EDITORONLY_DATA
explicit FFlowPin(const FStringView InPinName, const FText& InPinFriendlyName)
: PinName(InPinName)
, PinToolTip(InPinTooltip)
, PinFriendlyName(InPinFriendlyName)
{
}

Expand Down Expand Up @@ -130,6 +141,7 @@ struct FLOW_API FFlowPin
SetPinTypeName(InTypeName);
SetPinSubCategoryObject(OptionalSubCategoryObject);
}
#endif

explicit FFlowPin(const FName& InPinName, const FFlowPinTypeName& InTypeName, UObject* OptionalSubCategoryObject = nullptr)
: PinName(InPinName)
Expand Down Expand Up @@ -168,8 +180,10 @@ struct FLOW_API FFlowPin
// Do a deep pin match (not a simple name-only match), to check if the pins are exactly equal
return
PinName == Other.PinName &&
PinFriendlyName.EqualTo(Other.PinFriendlyName) &&
#if WITH_EDITORONLY_DATA
PinFriendlyName.EqualTo(Other.PinFriendlyName) &&
PinToolTip == Other.PinToolTip &&
#endif
ContainerType == Other.ContainerType &&
PinTypeName == Other.PinTypeName &&
PinSubCategoryObject == Other.PinSubCategoryObject;
Expand Down
6 changes: 6 additions & 0 deletions Source/Flow/Public/Types/FlowDataPinBlueprintLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,21 @@ class UFlowDataPinBlueprintLibrary : public UBlueprintFunctionLibrary
UFUNCTION(BlueprintPure, Category = FlowPin, Meta = (BlueprintThreadSafe, DisplayName = "Make Flow Pin"))
static UPARAM(DisplayName = "Flow Pin") FFlowPin MakeStruct(FName PinName, FText PinFriendlyName, FString PinToolTip)
{
#if WITH_EDITOR
return FFlowPin(PinName, PinFriendlyName, PinToolTip);
#else
return FFlowPin(PinName);
#endif
}

UFUNCTION(BlueprintPure, Category = FlowPin, Meta = (BlueprintThreadSafe, DisplayName = "Break Flow Pin"))
static void BreakStruct(UPARAM(DisplayName = "Flow Pin") FFlowPin Ref, FName& OutPinName, FText& OutPinFriendlyName, FString& OutPinToolTip)
{
OutPinName = Ref.PinName;
#if WITH_EDITOR
OutPinFriendlyName = Ref.PinFriendlyName;
OutPinToolTip = Ref.PinToolTip;
#endif
}

/**
Expand Down