Format Error Message is in good condition.

This commit is contained in:
2024-11-19 21:41:09 -05:00
parent 26fca0fca8
commit c332fea06b
2 changed files with 142 additions and 38 deletions

View File

@@ -21,44 +21,106 @@ class UEdGraph;
class UObject;
//
// Export log verbosity to blueprints.
//
UENUM(BlueprintType)
enum class ElxLogVerbosity : uint8 {
Fatal,
Error,
Warning,
Display,
Log,
Verbose,
VeryVerbose,
};
//
// Display Duration - how long to show a message on-screen.
// The following UENUM contains all the ELogVerbosity levels, in a form
// that the blueprint editor can manipulate.
//
// We deliberately moved Fatal to the end of the list, because the editor
// will display these values in the order shown here, and we want Error to
// be the value that is 'promoted', and we want Fatal to be buried as a
// rarely-used option.
//
/** Log Verbosity: The importance of the message, which affects where the message goes and how it is filtered. */
UENUM(BlueprintType)
enum class ElxLogVerbosity : uint8 {
/* Prints an error to the console and log file. The editor collects and reports errors. */
Error,
/* Prints a warning to the console and log file. The editor collects and report warnings. */
Warning,
/* Prints a message to the console and log file. */
Display,
/* Prints a message to the log file, however, it does not print to the console. */
Log,
/* Prints a message to a log file only if Verbose logging is enabled for the given category. This is usually used for detailed logging. */
Verbose,
/* Prints a message to a log file. If VeryVerbose logging is enabled, then this is used for detailed logging that would otherwise spam output. */
VeryVerbose,
/* Danger! Prints a fatal error to the console and log file, then crashes (this crashes the editor too). */
Fatal,
};
/** Display Duration: How long to display a message in the game's viewport */
UENUM(BlueprintType)
enum class ElxDisplayDuration : uint8 {
No_Display = 0,
/* Do not display the message in the viewport */
No_Display_in_Viewport = 0,
/* Display the message in the viewport for 1 second */
Display_1_Seconds = 1,
/* Display the message in the viewport for 2 second */
Display_2_Seconds = 2,
/* Display the message in the viewport for 3 second */
Display_3_Seconds = 3,
/* Display the message in the viewport for 4 second */
Display_4_Seconds = 4,
/* Display the message in the viewport for 5 second */
Display_5_Seconds = 5,
/* Display the message in the viewport for 10 second */
Display_10_Seconds = 10,
/* Display the message in the viewport for 20 second */
Display_20_Seconds = 20,
/* Display the message in the viewport for 30 second */
Display_30_Seconds = 30,
/* Display the message in the viewport for 1 second */
Display_40_Seconds = 40,
/* Display the message in the viewport for 1 second */
Display_50_Seconds = 50,
/* Display the message in the viewport for 1 second */
Display_60_Seconds = 60,
/* Display the message in the viewport for 1 second */
Display_70_Seconds = 70,
/* Display the message in the viewport for 1 second */
Display_80_Seconds = 80,
/* Display the message in the viewport for 1 second */
Display_90_Seconds = 90,
/* Display the message in the viewport for 1 second */
Display_1_Minute = 101,
/* Display the message in the viewport for 1 second */
Display_2_Minutes = 102,
/* Display the message in the viewport for 1 second */
Display_3_Minutes = 103,
/* Display the message in the viewport for 1 second */
Display_4_Minutes = 104,
/* Display the message in the viewport for 1 second */
Display_5_Minutes = 105,
};
@@ -71,13 +133,13 @@ class UlxFormatErrorLibrary : public UBlueprintFunctionLibrary
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "true"))
static void FormatErrorInternal(ElxLogVerbosity Verbosity, ElxDisplayDuration DisplayDuration, FText InPattern, TArray<FFormatArgumentData> InArgs);
UFUNCTION(BlueprintCallable, meta=(WorldContext = "Context", BlueprintInternalUseOnly = "true"))
static void FormatErrorInternal(UObject *Context, ElxLogVerbosity Verbosity, ElxDisplayDuration DisplayDuration, FText InPattern, TArray<FFormatArgumentData> InArgs);
};
//
// Library functions used by Format Error Message, and also
// by scripters writing their own Error Message Handler classes.
// The Format Error Message K2Node.
//
UCLASS(MinimalAPI)
class UK2Node_FormatError : public UK2Node