Files
integration/Source/Integration/engineutil.hpp

48 lines
1.0 KiB
C++

#pragma once
#include "enginewrapper.hpp"
namespace engineutil {
// Load the DLL and initialize the wrapper, if possible.
void init_wrapper(EngineWrapper* w);
// Print text on the console.
void DPrint(const FString& fs);
// Print text on the console.
void DPrint(const char* msg);
// Print text on the console.
void DPrintHook(const char* msg, size_t len);
// Get all the stored dprints.
TArray<FString> DPrintGetStored();
class ConsoleOutput {
private:
FString Content;
bool Dirty;
// Truncate the console to a reasonable number of
// lines. The length is hardwired.
void Truncate();
public:
// Append a line of text to the console.
void Append(const FString& text);
// Append a line of text to the console on a line by itself.
void AppendLine(const FString& text);
// Get the console text as a string.
const FString& Get() const { return Content; }
// Return if the dirty flag is set.
bool IsDirty() const { return Dirty; }
// Clear the dirty flag.
void ClearDirty() { Dirty = false; }
};
} // namespace engineutil