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, you can either hard-code the USE_THEME_MODULE
option in your CMakeLists.txt
file by finding the following line:
option(USE_THEME_MODULE "Compile in the UDE theme integration system for supporting theming in your application" OFF)
and modifying the line to look like this:
option(USE_THEME_MODULE "Compile in the UDE theme integration system for supporting theming in your application" ON)
Alternatively, you can also enable it through the CMake CLI:
cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DUSE_THEME_MODULE=ON
Finally, 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
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.
- Home
- Beginner content
- Install guide
- Creating and using the UI components
- The Instance
- The Init Info struct
- Additional features
- Custom type definitions
- C API development
- Config files and Folders
- Interfaces
- Internal Event safety
- Modules system
- I18N
- Plotting
- Knobs
- Spinners
- Toggles
- Text Utils
- Undo/Redo
- CLI Parser
- Theming
- OS
- Opening URLs and using file pickers
- Exec integration
- Fonts
- Unix
- DBus utilities
- XDG integration
- Collaborating with others
- Advanced content
- Loading dynamic libraries at runtime
- Understanding the library layout
- Compilation mode modifiers
- Adding plugin support to your application
- Production export and deployment
- Developer and contributor resources
- Misc