Start the process of standardizing the formatting of documentation inside our header files.
This commit is contained in:
@@ -1,25 +1,16 @@
|
||||
//////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// ConsoleOutput
|
||||
// ConsoleOutput.h
|
||||
//
|
||||
// This class can optionally be used by the GameMode
|
||||
// blueprint to help implement the console window. There is
|
||||
// no requirement that the blueprint use this class, it can
|
||||
// implement the console window any way it wants, this is
|
||||
// just here in case it is desired.
|
||||
// Optional helper for the console window. The
|
||||
// GameMode blueprint can use this class to store
|
||||
// console text as one big string with newlines.
|
||||
//
|
||||
// This class stores the text that's in the unreal console.
|
||||
// It stores it as one great big string, which contains
|
||||
// newlines to denote line breaks.
|
||||
// A dirty bit is set whenever text is appended,
|
||||
// so the blueprint only needs to update the widget
|
||||
// when the text has actually changed.
|
||||
//
|
||||
// This class also contains a 'dirty' bit. Each time
|
||||
// somebody appends a line of text to the console, the dirty
|
||||
// bit is automatically set. The bit can be checked using
|
||||
// 'IsDirty' and cleared using 'ClearDirty'. This makes it
|
||||
// so that you don't have to update the unreal widget unless
|
||||
// the text has actually changed.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -27,6 +18,11 @@
|
||||
|
||||
#include "ConsoleOutput.generated.h"
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// UlxConsoleOutput
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
UCLASS(BlueprintType)
|
||||
class UlxConsoleOutput : public UObject
|
||||
@@ -38,36 +34,46 @@ private:
|
||||
bool Dirty;
|
||||
|
||||
private:
|
||||
// Truncate the console to a reasonable number of
|
||||
// lines. The length is hardwired.
|
||||
// Truncate the console to a reasonable number of lines.
|
||||
// The length is hardwired.
|
||||
//
|
||||
void Truncate();
|
||||
|
||||
// Add a newline if there isn't one. Returns true if it changed anything.
|
||||
// Add a newline if there isn't one.
|
||||
//
|
||||
// Returns true if it changed anything.
|
||||
//
|
||||
bool MaybeAppendNewline();
|
||||
|
||||
// Append text. Returns true if it changed anything.
|
||||
// Append text.
|
||||
//
|
||||
// Returns true if it changed anything.
|
||||
//
|
||||
bool MaybeAppendText(const FString& text);
|
||||
|
||||
public:
|
||||
// Append a line of text to the console.
|
||||
// Append text to the console.
|
||||
//
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void Append(const FString& text);
|
||||
|
||||
// Append a line of text to the console on a line by itself.
|
||||
// Append text 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; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user