microui-d 0.0.1

A tiny immediate-mode UI library.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

🔩 microui-D

A tiny and portable immediate-mode UI library written in D. Microui-D is a complete rewrite of rxi's microui. It's 90% the same library, adapted with D-specific improvements where appropriate.

Major Features

  • Around 1500 sloc of D
  • Works within a fixed memory region
  • Works with any rendering system that can draw rectangles and text
  • Easily extensible with custom controls
  • Optional helper modules for other libraries (raylib, parin)
  • C interface for cross-language use

Hello World Example

import murl; // Equivalent to `import microui`, with additional helper functions for raylib.
import raylib;

void main() {
    // Create the window and the UI context.
    InitWindow(800, 600, "raylib + microui");
    auto font = GetFontDefault();
    auto ctx = new mu_Context();
    murl_init(ctx, &font);

    while (!WindowShouldClose) {
        // Update the UI.
        murl_handle_input(ctx);
        mu_begin(ctx);
        if (mu_begin_window(ctx, "The Window", mu_rect(40, 40, 300, 200))) {
            mu_button(ctx, "My Button");
            mu_end_window(ctx);
        }
        mu_end(ctx);
        // Draw the UI.
        BeginDrawing();
        ClearBackground(Color(100, 100, 100, 255));
        murl_draw(ctx);
        EndDrawing();
    }
}

Documentation

Start with the examples folder for a quick overview. For more details, check out the usage instructions by rxi.

Authors:
  • Alexandros F. G. Kapretsos
Dependencies:
none
Versions:
0.0.3 2025-Jul-01
0.0.2 2025-Jun-30
0.0.1 2025-Jun-28
~main 2025-Jul-01
Show all 4 versions
Download Stats:
  • 1 downloads today

  • 5 downloads this week

  • 5 downloads this month

  • 5 downloads total

Score:
0.4
Short URL:
microui-d.dub.pm