by flohofwoe · 3y ago · 0 comments
https://floooh.github.io/sokol-html5/nuklear-sapp.html
The big difference to Dear ImGui is that Nuklear has a C API and is also implemented in C - and apparently it has more skinning/themeing options, which I haven't tinkered with yet.
TBH, for tools I prefer cimgui (a C wrapper around Dear ImGui), my impression is that Nuklear has a 'purer' immediate-mode design at the cost of some convenience, while Dear ImGui has a more pragmatic design approach, but also has less friction for writing UI code. I haven't needed skinning options so far though, that might be the actual USP of Nuklear.
It all might also just be personal bias, because I used Dear ImGui before Nuklear :)
For shits'n'giggles, here's both UI systems in the same application:
https://floooh.github.io/sokol-html5/nuklear-sapp-ui.html
(the menu bar and all windows that open from it is Dear ImGui, the rest is Nuklear).
The check-box being an empty square when it's checked, and a filled square when it's unchecked is an unpopular design decision.
Then copy and paste took over.
The best example and how I learnt about this is the mute toggle on iPhones and the lock toggle on the old iPods.
When you turned the switch ‘on’ it turned the sound/buttons ‘off’. The signify this special kind of ‘inverted’ switch, they put the orange colour on there. [1]
This is a rare use case but it does exist. And definitely shouldn’t be the default in the UI library
[1] https://d3nevzfk7ii3be.cloudfront.net/igi/mmIJOyYlvjSvCBrH.m...
Not sure about that, maybe javascript with svg would be easier to write such an app in.
Unofficial C API - https://github.com/cimgui/cimgui Official binding gen - https://github.com/dearimgui/dear_bindings
> Dear ImGui is designed to enable fast iterations and to empower programmers to create content creation tools and visualization / debug tools (as opposed to UI for the average end-user).