Skip to content

Theme module

Stanislav Vasilev edited this page Sep 17, 2024 · 6 revisions

The UntitledImGuiTheme library, provides functions to load and save dear imgui themes to a YAML format, as well as a widget to edit the current theme.

Enabling the module

To enable the themes module, update your uvproj.yaml so that the spinners 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:
  theming: true

Then, regenerate the modules cache by running the following command:

user $ ./UVKBuildTool --generate <project directory>

After that, refresh your CMake project with cmake ..!


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

#include <Modules/Modules.hpp>

Event safety

The entire module is flagged as event safe at All ready.

Testing out the module

When the theming module is enabled, the framework will automatically load the theme under Config/Theme/default.theme.yaml. This theme contains all fields that can be changed. The values are the default dear imgui dark theme values.

The theme format is detailed here.

The library API is specified here.

C API

More info on the UntitledImGuiTheme library's C API can be found here.

Clone this wiki locally