Live data from Hacker News

Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

github.com

21–30 of 103 posts

Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

#22
post #4

Earlier quoted context omitted.

> https://floooh.github.io/sokol-html5/nuklear-sapp-ui.html The check-box being an empty square when it's checked, and a filled square when it's unchecked is an unpopular design decision.

Not just unpopular, it seems totally misleading and plain wrong to me. I've also seen elsewhere something similar, like checkboxes used instead of checkmarks as output widgets on web pages; cannot recall where though.

I think some of this stems from their use in dark patterns, such as opt-opt checkboxes that end up opting you in.

Then copy and paste took over.

Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

#23
post #21

For people that have used both Nuklear and ImGui, how do they compare? Which would you choose for your next project and why?

I've tried Nuklear and it was very difficult to get things to lay out correctly or at all. Even after reading the source, I didn't get how it was supposed to work. IMGUI works really well and is direct and simple, it's an easy choice in my opinion.

Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

#24
post #4

Here'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…

> https://floooh.github.io/sokol-html5/nuklear-sapp-ui.html The check-box being an empty square when it's checked, and a filled square when it's unchecked is an unpopular design decision.

You're right, it looked completely bogus to me with things seeming to do the opposite of what I configured, until I read your message! The problem with UIs is that people can't refrain from distinguishing themselves by doing something different from what seems intuitive to most, just because they can. And that results in the current web and interfaces...

Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

#26
post #4

Here'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…

> https://floooh.github.io/sokol-html5/nuklear-sapp-ui.html The check-box being an empty square when it's checked, and a filled square when it's unchecked is an unpopular design decision.

This must be a mistake in the demo. Because all other UI elements behave exactly as you expect them.

Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

#27

Does this support writing to a linear frame buffer? Would be interesting to port to run on my OS if so.

I have backend for the Hisilicon SoC from 2016, its about 1500 lines of C code, few calls to 2D API and copypasta of the triangle rasterizer. Dunno about modern version requirements.

Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

#28
post #4

Earlier quoted context omitted.

> https://floooh.github.io/sokol-html5/nuklear-sapp-ui.html The check-box being an empty square when it's checked, and a filled square when it's unchecked is an unpopular design decision.

You're right, it looked completely bogus to me with things seeming to do the opposite of what I configured, until I read your message! The problem with UIs is that people can't refrain from distinguishing themselves by doing something different from what seems intuitive to most, just because they can. And that results in the current web and interfaces...

[flagged]

Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

#30
post #4

Here'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…

> https://floooh.github.io/sokol-html5/nuklear-sapp-ui.html The check-box being an empty square when it's checked, and a filled square when it's unchecked is an unpopular design decision.

I can’t remember the name for it, but there is a certain kind of switch design that’s meant to be visually ‘on’ when you’re turning something off.

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...

Post reply on HN