Yet more tweaking of Format error Message
This commit is contained in:
Binary file not shown.
@@ -104,8 +104,8 @@ void UK2Node_FormatError::CreateCorrectPins()
|
||||
}
|
||||
|
||||
if (FindPin(FormatPinName, EGPD_Input) == nullptr) {
|
||||
UEdGraphPin *P = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Text, FormatPinName);
|
||||
P->DefaultTextValue = LOCTEXT("FormatErrorMessage_DefaultMessage", "Error Message");
|
||||
UEdGraphPin *P = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_String, FormatPinName);
|
||||
P->DefaultValue = TEXT("Error Message");
|
||||
}
|
||||
|
||||
if (FindPin(VerbosityPinName, EGPD_Input) == nullptr) {
|
||||
@@ -252,7 +252,7 @@ void UK2Node_FormatError::PinDefaultValueChanged(UEdGraphPin* Pin)
|
||||
if(IsFormatPin(Pin))
|
||||
{
|
||||
PinNames.Empty();
|
||||
FText::GetFormatPatternParameters(Pin->DefaultTextValue, PinNames);
|
||||
FText::GetFormatPatternParameters(FText::FromString(Pin->DefaultValue), PinNames);
|
||||
CreateCorrectPins();
|
||||
GetGraph()->NotifyNodeChanged(this);
|
||||
}
|
||||
@@ -608,11 +608,12 @@ FText UK2Node_FormatError::GetMenuCategory() const
|
||||
return FEditorCategoryUtils::GetCommonCategory(FCommonEditorCategory::Text);
|
||||
}
|
||||
|
||||
void UlxFormatErrorLibrary::FormatErrorInternal(UObject *Context, ElxLogVerbosity Verbosity, ElxDisplayDuration DisplayDuration, FText InPattern, TArray<FFormatArgumentData> InArgs)
|
||||
void UlxFormatErrorLibrary::FormatErrorInternal(UObject *Context, ElxLogVerbosity Verbosity, ElxDisplayDuration DisplayDuration, const FString &InPattern, TArray<FFormatArgumentData> InArgs)
|
||||
{
|
||||
// Generate the formatted string.
|
||||
//
|
||||
FText Message = FTextFormatter::Format(MoveTemp(InPattern), MoveTemp(InArgs), false, false);
|
||||
FText InPatternText(FText::FromString(InPattern));
|
||||
FText Message = FTextFormatter::Format(MoveTemp(InPatternText), MoveTemp(InArgs), false, false);
|
||||
FString MessageString = Message.ToString();
|
||||
|
||||
// Convert the DisplayDuration enum into a number of seconds.
|
||||
|
||||
@@ -134,7 +134,7 @@ class UlxFormatErrorLibrary : public UBlueprintFunctionLibrary
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintCallable, meta=(WorldContext = "Context", BlueprintInternalUseOnly = "true"))
|
||||
static void FormatErrorInternal(UObject *Context, ElxLogVerbosity Verbosity, ElxDisplayDuration DisplayDuration, FText InPattern, TArray<FFormatArgumentData> InArgs);
|
||||
static void FormatErrorInternal(UObject *Context, ElxLogVerbosity Verbosity, ElxDisplayDuration DisplayDuration, const FString &InPattern, TArray<FFormatArgumentData> InArgs);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user