The imspinner library, provides spinners widgets for dear imgui, like these:

spinners

Enabling the module

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

option(USE_SPINNER_MODULE "Use the spinner module" OFF)

and modifying the line to look like this:

option(USE_SPINNER_MODULE "Use the spinner module" ON)

Alternatively, you can also enable it through the CMake CLI:

cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DUSE_SPINNER_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:
  spinners: 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

In one of your widgets, add the following code to your tick function:

ImSpinner::demoSpinners()

This will display all the available spinners, like the image at the start of the page.

Learning the module

To learn more about this third party library, check out the imspinner GitHub repository.

Checking for the module

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

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