Files
integration/Source/Integration/engineutil.hpp
2023-06-09 16:47:46 -04:00

54 lines
1.2 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 using GEngine->Add...
void RawPrint(const char* text);
// 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.
const TArray<FString>& DPrintGetStored();
// Clear the stored dprints.
void DPrintClearStored();
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