Files
integration/Source/Integration/engineutil.hpp

49 lines
1.0 KiB
C++
Raw Normal View History

2023-06-08 17:10:14 -04:00
#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();
2023-06-08 17:10:14 -04:00
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; }
};
2023-08-29 20:05:10 -04:00
2023-06-08 17:10:14 -04:00
} // namespace engineutil