Live data from Hacker News

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

github.com

81–90 of 103 posts

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

#81
post #78

I really like this trend. Also see: * Raylib - A single header file game engine https://www.raylib.com/ * Miniaudio - A single header file audio library https://miniaud.io/ Both (actually, not just three systems) cross-platform. For their design and cross-platform support they make for great bases for Go libraries, unlike most C code out there.

I can't say I'm excited about this trend, if it is a trend.

Immediate mode GUIs are usually pretty nice from a developer point of view, but many of them are lacking many things like accessibility and text selection. Maybe good for 3D modelers, video editors, etc., but not for more general purpose apps.

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

#83
post #78

I really like this trend. Also see: * Raylib - A single header file game engine https://www.raylib.com/ * Miniaudio - A single header file audio library https://miniaud.io/ Both (actually, not just three systems) cross-platform. For their design and cross-platform support they make for great bases for Go libraries, unlike most C code out there.

Having a peep at miniaud.io, I am astounded to say the least.

It supports almost all of the popular back-ends across platforms. A library as complex as PortAudio in a (largish) header.

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

#84
post #78

I really like this trend. Also see: * Raylib - A single header file game engine https://www.raylib.com/ * Miniaudio - A single header file audio library https://miniaud.io/ Both (actually, not just three systems) cross-platform. For their design and cross-platform support they make for great bases for Go libraries, unlike most C code out there.

I can't say I'm excited about this trend, if it is a trend. Immediate mode GUIs are usually pretty nice from a developer point of view, but many of them are lacking many things like accessibility and text selection. Maybe good for 3D modelers, video editors, etc., but not for more general purpose apps.

General purpose apps are pretty bad with accessibility. I've noticed a trend with Electron based apps which neglect to proper use aria annotations until someone complains.

Harping on immediate mode GUIs doesn't help. I don't think anyone is against making IM GUIs more accessible.

The predominant immediate mode library in Go, Gio, has been slowly working on support for various ecosystems. I believe it supports Android to some extent already.

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

#85

Earlier quoted context omitted.

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

I can see what you mean - but I would think that an array of int32s representing RGBA would be fairly standard these days. ImGui already draws fonts using textures, if I recall.

If you're writing the ImGui backend already, don't you practically have to handle texture upload? Why not just upload the image yourself?

I've never found this to be problematic. Long before ImGui even gets involved I've already got stb.h and a spinning textured cube.

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

#86

I use Nuklear for a Steam game I made in C. It worked well for my needs but there are a few things I still haven't figured out yet - like rendering centered multi-line text. Localizing my game was very straightforward with Nuklear - I didn't run into any roadblocks with fonts or different alphabets. I was able to get the interfaces to be controller-friendly too. Overall, I had a positive experience and will use it ag…

Did the Steam Overlay work?

In the pathological case, the steam overlay needs zero effort to "implement". It works out of the box in most cases when the application is launched via the Steam launcher.

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

#87

Earlier quoted context omitted.

I can see what you mean - but I would think that an array of int32s representing RGBA would be fairly standard these days. ImGui already draws fonts using textures, if I recall.

If you're writing the ImGui backend already, don't you practically have to handle texture upload? Why not just upload the image yourself? I've never found this to be problematic. Long before ImGui even gets involved I've already got stb.h and a spinning textured cube.

I suspect that the majority of ImGui users use one of the included, ready-to-use backends. For example, I use the OpenGL one. I work around the lack of images, handling the textures myself, but it's always struck me as an odd omission.

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

#88

Earlier quoted context omitted.

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.

I had something like this happen w some documentation I was working on in docbook (~13 years ago - forgive me if this isn’t 100% accurate), iirc: “[*]” meant “empty checkbox”.

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

#90
post #86

Earlier quoted context omitted.

Did the Steam Overlay work?

In the pathological case, the steam overlay needs zero effort to "implement". It works out of the box in most cases when the application is launched via the Steam launcher.

It only works for DirectX, OpenGL, Metal, Vulkan: https://partner.steamgames.com/doc/features/overlay

It also uses heuristics to find the right window that can lead to issues. Not a common problem, but one I unfortunately ran into :(

Post reply on HN