Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 790 Bytes

README.md

File metadata and controls

38 lines (28 loc) · 790 Bytes

Description

Create imgui-based apps using C++20 and vcpkg dependencies with ease.

Example

#include "imgui.h"

#include <ui/GlfwImguiWindow.hpp>

struct MainWindow : ui::GlfwImguiWindow {
    using GlfwImguiWindow::GlfwImguiWindow;

    bool show_demo_window = true;

    void onInit() override {
        auto & io = ImGui::GetIO();

        io.FontAllowUserScaling = true;
    }

    void onUpdate() override {
        if(show_demo_window)
            ImGui::ShowDemoWindow(&show_demo_window);
    }
};

int main(int, char **) {
    MainWindow window{"Main window"};
    window.run_until_exit();
    return 0;
}