| 769 | } |
| 770 | |
| 771 | FText UFlowGraphSchema::GetPinDisplayName(const UEdGraphPin* Pin) const |
| 772 | { |
| 773 | FText ResultPinName; |
| 774 | check(Pin != nullptr); |
| 775 | if (Pin->PinFriendlyName.IsEmpty()) |
| 776 | { |
| 777 | // We don't want to display "None" for no name |
| 778 | if (Pin->PinName.IsNone()) |
| 779 | { |
| 780 | return FText::GetEmpty(); |
| 781 | } |
| 782 | |
| 783 | // this option is only difference between this override and UEdGraphSchema::GetPinDisplayName |
| 784 | if (GetDefault<UFlowGraphEditorSettings>()->bEnforceFriendlyPinNames) |
| 785 | { |
| 786 | ResultPinName = FText::FromString(FName::NameToDisplayString(Pin->PinName.ToString(), true)); |
| 787 | } |
| 788 | else |
| 789 | { |
| 790 | ResultPinName = FText::FromName(Pin->PinName); |
| 791 | } |
| 792 | } |
| 793 | else |
| 794 | { |
| 795 | ResultPinName = Pin->PinFriendlyName; |
| 796 | |
| 797 | bool bShouldUseLocalizedNodeAndPinNames = false; |
| 798 | GConfig->GetBool(TEXT("Internationalization"), TEXT("ShouldUseLocalizedNodeAndPinNames"), bShouldUseLocalizedNodeAndPinNames, GEditorSettingsIni); |
| 799 | |
| 800 | if (!bShouldUseLocalizedNodeAndPinNames) |
| 801 | { |
| 802 | ResultPinName = FText::FromString(ResultPinName.BuildSourceString()); |
| 803 | } |
| 804 | } |
| 805 | |
| 806 | return ResultPinName; |
| 807 | } |
| 808 | |
| 809 | void UFlowGraphSchema::ConstructBasicPinTooltip(const UEdGraphPin& Pin, const FText& PinDescription, FString& TooltipOut) const |
| 810 | { |