The text utils module provides a number of rich text rendering widgets to imgui. We use our UntitledImGuiTextUtils library to handle this functionality.

Enabling the module

To enable the text utils module, you can either hard-code the USE_TEXT_UTILS_MODULE option in your CMakeLists.txt file by finding the following line:

option(USE_TEXT_UTILS_MODULE "Use the text utils module" OFF)

and modifying the line to look like this:

option(USE_TEXT_UTILS_MODULE "Use the text utils module" ON)

Alternatively, you can also generate your project files using CMake options by running the following CMake command:

cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DUSE_TEXT_UTILS_MODULE=ON

Finally, update your uvproj.yaml so that the text-utils key under enabled-modules is set to true like this:

name: "MyProject"
version: "1.0.0.0"
engine-version: "1.0.0.0"
enabled-modules:
  text-utils: true

Next, in your source file, include the Modules.hpp header in your components like this:

#include <Modules/Modules.hpp>

Event safety

The entire module is flagged as event safe at All ready

Learning the module

To learn more about using the text utils module, check out the UntitledImGuiTextUtils GitHub wiki.

Checking for the module

To check for the module at compile time, use the UIMGUI_TEXT_UTILS_MODULE_ENABLED macro.

Runtime checking can be done using the text_utils member of the ModuleSettings struct. More info can be found here.