Skip to content

Hedgehogsoft/microui-rx-dev

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

microui-rx

A fork of microui, a tiny, portable, immediate-mode UI library written in ANSI C

Features

  • Tiny codebase
  • Works within a fixed-sized memory region: no additional memory is allocated
  • Built-in controls: window, scrollable panel, button, slider, textbox, label, checkbox, wordwrapped text
  • Works with any rendering system that can draw rectangles and text
  • Designed to allow the user to easily add custom controls
  • Simple layout system

Example

example

if (mu_begin_window(ctx, &mu_stringViewLiteral("My Window"), mu_rect(10, 10, 140, 86))) {
  mu_layout_row(ctx, 2, (int[]) { 60, -1 }, 0);

  mu_label(ctx, &mu_stringViewLiteral("First:"));
  if (mu_button(ctx, &mu_stringViewLiteral("Button1"))) {
    printf("Button1 pressed\n");
  }

  mu_label(ctx, &mu_stringViewLiteral("Second:"));
  if (mu_button(ctx, &mu_stringViewLiteral("Button2"))) {
    mu_open_popup(ctx, &mu_stringViewLiteral("My Popup"));
  }

  if (mu_begin_popup(ctx, &mu_stringViewLiteral("My Popup"))) {
    mu_label(ctx, &mu_stringViewLiteral("Hello world!"));
    mu_end_popup(ctx);
  }

  mu_end_window(ctx);
}

Screenshot

screenshot

Usage

  • See doc/usage.md for usage instructions
  • See the demo directory for a usage example

Notes

The library expects the user to provide input and handle the resultant drawing commands, it does not do any drawing itself.

License

This library is free software; you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE for details.

About

A tiny immediate-mode UI library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 100.0%