MicroUI – A tiny, portable, immediate-mode UI library written in ANSI C
Posted by peter_d_sherman 3 hours ago
Comments
Comment by flohofwoe 12 minutes ago
WASM demo: https://floooh.github.io/sokol-html5/sgl-microui-sapp.html
Source code: https://github.com/floooh/sokol-samples/blob/master/sapp/sgl...
The renderer backend is just a bunch of C functions you need to provide:
https://github.com/floooh/sokol-samples/blob/3f4185a8578cd2b...
It's also interesting to compare the binary sizes:
microui sample (https://floooh.github.io/sokol-html5/sgl-microui-sapp.html): 79.6 KBytes compressed download
Nuklear sample (https://floooh.github.io/sokol-html5/nuklear-sapp.html): 155 kb compressed download
Dear ImGui sample (https://floooh.github.io/sokol-html5/imgui-sapp.html): 491 KB compressed download
Comment by kartoffelsaft 1 hour ago
I will mention, however, it's kinda abandonware at this point. There is some bug with the draw call iterator which does a misaligned pointer access, which, if your environment is set up to catch that, can get annoying (Zig for example panics on it). There's a github issue that some have used as reason to fork it but all the forks I tried were subtly wrong, for what that's worth.
Comment by packetlost 39 minutes ago
That's sad. I'm a fan of rxi's work, including this one.
Comment by haeseong 1 hour ago
Comment by kettlez 1 hour ago
Comment by abtinf 2 hours ago
Comment by RodgerTheGreat 2 hours ago
Comment by Dwedit 1 hour ago
In the MicroUI example here, there are buttons and text labels and other kinds of controls, but no ability for an outside process to enumerate or interact with the controls. Any program will just set a single giant window with no text and no controls inside. Accessibility software can still hook text output APIs, but not if it also uses custom font rendering.
Anyway, the Windows accessibility API is just implementing a few COM objects, and COM (other than the specific ABI used for storing the vtable and function call convention) is not necessarily specific to Win32.
Comment by jazzypants 2 hours ago
Comment by xyzzy_plugh 2 hours ago
Dear ImGui [0] is without a doubt the most prevalent immediate mode UI library. It does not have native accessibility features, but that hasn't stopped companies such as Intel, Meta, IKEA and Google from shipping products built upon it. It's also used in a ton of games.
Calling Dear ImGui a toy project at this point would be like calling Unreal Engine a toy project.
It's a shame accessibility support is not more widespread, and furthermore it's a shame that it is so laborious to add it.
Comment by qsera 1 hour ago
It is sad that the world is so hung up on unicode and things like accessibility that we all have to submit to the tyranny of browser layers!
Comment by whizzter 2 hours ago
Comment by monocasa 2 hours ago
Like a debug UI in a game engine, or in an embedded device that doesn't even have input for a13y.
Comment by fwip 1 hour ago
For example - in your debug UI, colorblind-friendly colors don't matter, until you hire your twelfth member of the team, who struggles to tell red and green apart.
Comment by monocasa 42 minutes ago
Comment by spwa4 2 hours ago
Comment by jdmoreira 1 hour ago
Really insane comment TBH
Comment by dwb 33 minutes ago
Comment by OvervCW 1 hour ago
Comment by ranger_danger 1 hour ago
Comment by afavour 1 hour ago
Comment by synergy20 2 hours ago
Comment by peter_d_sherman 3 hours ago
o Tiny: around 1100 sloc of ANSI C
o Works within a fixed-sized memory region: no additional memory is allocated
o Built-in controls: window, scrollable panel, button, slider, textbox, label, checkbox, wordwrapped text
o Works with any rendering system that can draw rectangles and text
o Designed to allow the user to easily add custom controls
o Simple layout system"
Comment by ur-whale 2 hours ago
Comment by exDM69 2 hours ago
You plug it into your project and it can be rendered on anything that can push pixels and/or triangles to the screen. Events from windowing system go in, list of triangles comes out.
This is intended to be used with OpenGL, Vulkan, D3D and other graphics environment and used in cases where integrating a "real" GUI toolkit would be more trouble than it's worth.
Other popular libs like Dear Imgui or Egui work the same way.
Comment by foul 2 hours ago
Comment by Littice 3 hours ago
Comment by dvhh 49 minutes ago