Does anyone know of something similarly lightweight but retained mode?
You can check out LVGL: https://github.com/lvgl/lvgl/ It's geared more for embedded, but you can use an sdl back end for desktop (which might kill your light weight requirement depending on your strictness level). I wrote my own tty/framebuffer driver for it and use it directly on the frame buffer (not Linux) but it's pretty nice to work with. But if you need metal/openGL/Vulcan/directX and hardware acceleration, it'…
Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
61–70 of 103 posts
Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#62Just why. C17 exist.
Why is is that some developers stick with C89, whilst in the C++ community, unless you work for some really backwards company, you adopt the latest standard before it's even officially nailed down?
C89 needs to die. Stop supporting it.
Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#63Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#64I tend to use ImGui for testbed projects. It's flexible and quick to get up and running. I only have two minor complaints about it. 1. It would be nice to have some built in image handling functions, i.e. to be able to allocate and draw images on the screen. 2. Skinning is currently rather limited. (I know this has been a long requested feature). Other than those minor gripes, I like it a lot.
> 1. It would be nice to have some built in image handling functions, i.e. to be able to allocate and draw images on the screen. I think this would actually be fairly tricky to handle inside Dear ImGui, because the image object must be in a format that's understood by the rendering backend. The way ImGui handles image rendering via an opaque ImTextureID handle which is passed through to the renderer backend is actual…
Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#65Here's a simple WASM version of the Nuklear standard demo: 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 de…
Unofficial C API - https://github.com/cimgui/cimgui Official binding gen - https://github.com/dearimgui/dear_bindings
Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#66I tend to use ImGui for testbed projects. It's flexible and quick to get up and running. I only have two minor complaints about it. 1. It would be nice to have some built in image handling functions, i.e. to be able to allocate and draw images on the screen. 2. Skinning is currently rather limited. (I know this has been a long requested feature). Other than those minor gripes, I like it a lot.
I suspect (1) is just because Dear ImGui is BYO graphics backend, so it doing lots of clever texture management stuff for lots of images would increase the surface area of that integration which would make it harder to use for most folks.
Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#67Earlier quoted context omitted.
The default fonts are just plain awful. It's trivial to drop in a better font and make it indistinguishable from native. Possibly a licensing issue as to why they don't include better ones by default as you have to bake it in? or they want to make the binary as tiny as possible by not using a bigger font file?
Font is one thing. The hard part is text layout which is a very very complicated affair, especially if you want to support different languages and/or writing systems.
Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#68> * Written in C89 (ANSI C) Just why. C17 exist. Why is is that some developers stick with C89, whilst in the C++ community, unless you work for some really backwards company, you adopt the latest standard before it's even officially nailed down? C89 needs to die. Stop supporting it.