super duper simple gui for C, wrapping imgui and stb

super duper simle gui for C, wrapping imgui and stb

You can use it as a static library with cmake. See the example directory for a complete example.

Example:

isAnimating) { igText("Render: %.2f ms, Frame: %.1f ms (%.0f FPS)", g->avgRenderTime * 1000.0, 1000.0f / io->Framerate, io->Framerate); } else { igText("Render: %.2f ms", g->avgRenderTime * 1000.0); } } igEnd(); igShowDemoWindow(NULL); } void gui_start(gui_t* g) { g->onRenderFrame = render_frame; gui_win_set_title(g->mainWindow, "Example"); } ">
#include <stdio.h>
#include <assert.h>
#include <gui.h>

static void render_frame(gui_t* g) {
  ImGuiIO* io = igGetIO();
  igBegin("window", NULL, ImGuiWindowFlags_NoTitleBar); {
    static float f = 0.0f;
    igText("Hello World!");
    igSliderFloat("float", &f, 0.0f, 1.0f, "%.3f", 0);
    if (g->isAnimating) {
      igText("Render: %.2f ms, Frame: %.1f ms (%.0f FPS)",
        g->avgRenderTime * 1000.0,
        1000.0f / io->Framerate,
        io->Framerate);
    } else {
      igText("Render: %.2f ms", g->avgRenderTime * 1000.0);
    }
  } igEnd();
  igShowDemoWindow(NULL);
}

void gui_start(gui_t* g) {
  g->onRenderFrame = render_frame;
  gui_win_set_title(g->mainWindow, "Example");
}

Try it: cd example && ../ext/ckit/bin/ckit watch -run example

Owner
Rasmus
Personal Software, languages, compilers, Humans & Computers, and other fun things. Past professional life at Figma, Facebook, Spotify, Dropbox, etc.
Rasmus
Similar Resources

It's a simple Canvas GUI for Unreal Engine 4 with mouse operation

It's a simple Canvas GUI for Unreal Engine 4 with mouse operation

ue4-canvas-gui It's a simple Canvas GUI for Unreal Engine 4 with mouse operation. Included elements: Rendering Text (left/center); Rendering Rects; Re

Dec 26, 2022

rCalc is a Simple GUI Calculator

rCalc is a Simple GUI Calculator

rCalc is a simple calculator created as a hobby project to improve my C programming language knowledge and GUI creation skills. GTK3 toolkit is used to create the GUI.

Aug 1, 2022

ImGuiBase - A very good & simple external ImGui base

ImGuiBase Join CProject to learn about ImGui! https://discord.gg/dnkdDuUtQu Check out our website: https://cproject.xyz Check out the youtube tutorial

Dec 23, 2022

A simple C++ ImGui loader base you can use for all your projects that need a login / register page.

A simple C++ ImGui loader base you can use for all your projects that need a login / register page.

C++ Loader Base 🖥️ What is this? ⚡ This is a very simple base I made for projects that require a login / register page that use ImGui. 🖥️ Screenshot

Dec 18, 2022

AxeraVision / Simple yet customizable UI using ImGui Framework

AxeraVision / Simple yet customizable UI using ImGui Framework

[ AxeraVision UI ] This repository features a base UI using the ImGui Framework. Features Simple UI Design Easy Code to Customize Good Starting Base U

Jun 28, 2022

Free open-source modern C++17 / C++20 framework to create console, forms (GUI like WinForms) and unit test applications on Microsoft Windows, Apple macOS and Linux.

Free open-source modern C++17 / C++20 framework to create console, forms (GUI like WinForms) and unit test applications on Microsoft Windows, Apple macOS and Linux.

xtd Modern C++17/20 framework to create console (CLI), forms (GUI like WinForms) and tunit (unit tests like Microsoft Unit Testing Framework) applicat

Jan 4, 2023

Purely native C++ cross-platform GUI framework for Android and iOS development. https://www.boden.io

Purely native C++ cross-platform GUI framework for Android and iOS development. https://www.boden.io

BODEN CROSS-PLATFORM FRAMEWORK Build purely native cross-platform experiences with Boden Website ⬡ Getting Started ⬡ API Reference ⬡ Guides ⬡ Twitter

Dec 27, 2022

Minimalistic C++/Python GUI library for OpenGL, GLES2/3, Metal, and WebAssembly/WebGL

Minimalistic C++/Python GUI library for OpenGL, GLES2/3, Metal, and WebAssembly/WebGL

NanoGUI NanoGUI is a minimalistic cross-platform widget library for OpenGL 3+, GLES 2/3, and Metal. It supports automatic layout generation, stateful

Dec 28, 2022

A barebones single-header GUI library for Win32 and X11.

A barebones single-header GUI library for Win32 and X11.

luigi A barebones single-header GUI library for Win32 and X11. Building example Windows Update luigi_example.c to #define UI_WINDOWS at the top of the

Dec 30, 2022
Related tags
Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.
Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.

libui: a portable GUI library for C This README is being written. Status It has come to my attention that I have not been particularly clear about how

Jan 2, 2023
Simple ImGui external base. Uses ImGui DX9.
Simple ImGui external base. Uses ImGui DX9.

ImGui External Base ??️ What is this? ⚡ Hello all! I used to use noteffex's loader base for all my external ImGui projects. I got bored of using this

Jun 29, 2022
Window and GUI system based on Dear ImGui from OCornut
Window and GUI system based on Dear ImGui from OCornut

ImWindow Window and GUI system based on ImGui from OCornut. Include docking/floating window, multi window and multi render support. Platform Actually

Dec 20, 2022
Real-time GUI layout creator/editor for Dear ImGui
Real-time GUI layout creator/editor for Dear ImGui

ImStudio Real-time GUI layout creator/editor for Dear ImGui Inspired by Code-Building/ImGuiBuilder Features Drag edit Property edit Covers most of the

Jan 9, 2023
imgui-filebrowser is a header-only file browser implementation for dear-imgui. C++ 17 is required.
imgui-filebrowser is a header-only file browser implementation for dear-imgui. C++ 17 is required.

imgui-filebrowser imgui-filebrowser is a header-only file browser implementation for dear-imgui. C++ 17 is required. Getting Started imfilebrowser.h s

Jan 1, 2023
Addon widgets for GUI library Dear ImGui.
Addon widgets for GUI library Dear ImGui.

ImGui-Addons Addon widgets for GUI library Dear ImGui. File Dialog A simple cross-platform file dialog that uses dirent interface for reading director

Jan 7, 2023
An addon of imgui for supporting docks in the imgui's window
An addon of imgui for supporting docks in the imgui's window

An addon of imgui for support dock in the window

Nov 29, 2022
This is a thin c-api wrapper programmatically generated for the excellent C++ immediate mode gui Dear ImGui.

cimgui This is a thin c-api wrapper programmatically generated for the excellent C++ immediate mode gui Dear ImGui. All imgui.h functions are programm

Jul 5, 2021
raygui is a simple and easy-to-use immediate-mode-gui library.
raygui is a simple and easy-to-use immediate-mode-gui library.

raygui is a simple and easy-to-use immediate-mode-gui library.

Dec 30, 2022
Fast, flexible and simple GUI.
Fast, flexible and simple GUI.

MyGUI is a cross-platform library for creating graphical user interfaces (GUIs) for games and 3D applications. Website: http://mygui.info/ There you c

Dec 29, 2022