Skip to content

CodyNinja1/Veridian

Repository files navigation

Veridian

A setting manager using INI files and dear ImGui.

Usage

#include "Veridian.h"
#include "imgui.h"

void MyRenderLoop()
{
    static float MyFloat = 0.f;
    static ImVec4 MyColor = ImVec4;

    static bool Registered = false;
    if (!Registered)
    {
        Veridian::InitContext("MySettings.ini");

        //               Section   Internal setting name  User-facing name              Type                 Value
        Veridian::Export("Floats",     "MyFloat",         "Example float", Veridian::VSettingType::VFloat, &MyFloat);
        Veridian::Export("Colors",     "MyColor",         "Example color", Veridian::VSettingType::VVec4,  &MyColor);
    }

    ImGui::Begin("Veridian settings");

    Veridian::RenderAll();

    ImGui::End();
}
image

Invalid setting handling

If (for whatever reason), the setting is invalid (nullptr was registered as setting, or invalid setting type), then Veridian will handle both cases properly:

image

About

A setting manager using INI files and dear ImGui

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages