Lua Console Overhaul in progress

This commit is contained in:
2025-12-09 02:42:13 -05:00
parent a242244f9c
commit 2d1def8dc6
10 changed files with 105 additions and 63 deletions

View File

@@ -2,6 +2,9 @@
#include "Containers/UnrealString.h"
#include "ConsoleOutput.generated.h"
//////////////////////////////////////////////////////////////
//
// ConsoleOutput
@@ -19,11 +22,16 @@
//
//////////////////////////////////////////////////////////////
class FlxConsoleOutput {
UCLASS(BlueprintType)
class UlxConsoleOutput : public UObject
{
GENERATED_BODY()
private:
FString Content;
bool Dirty;
private:
// Truncate the console to a reasonable number of
// lines. The length is hardwired.
void Truncate();
@@ -36,18 +44,23 @@ private:
public:
// Append a line of text to the console.
UFUNCTION(BlueprintCallable)
void Append(const FString& text);
// Append a line of text to the console on a line by itself.
UFUNCTION(BlueprintCallable)
void AppendLine(const FString& text);
// Get the console text as a string.
UFUNCTION(BlueprintCallable)
const FString& Get() const { return Content; }
// Return if the dirty flag is set.
UFUNCTION(BlueprintCallable)
bool IsDirty() const { return Dirty; }
// Clear the dirty flag.
UFUNCTION(BlueprintCallable)
void ClearDirty() { Dirty = false; }
};