News for hackers. Stuff that matters.
Re:Dear ImGui – Bloat-free graphical user interface library ... by roytries on Wednesday November 04, 2020 @03:53AM (#24987406)
Not sure why this is showing up on HN today. But Dear ImGui is absolutely amazing. And its not just for C++. I use it myself in my C# game engine. (There's a C# port that uses System.Numerics: https://github.com/mellinoe/ImGui.NET) which I've ported to MonoGame https://github.com/roy-t/ImGui.NET)

I've used a lot of different UI frameworks (winforms, WPF, Html/CSS based frameworks, custom game engine frameworks). But for prototyping Dear ImGui and the whole immediate GUI idea is amazing. It even looks quite decent and the new docking support is great :).

Re:Dear ImGui – Bloat-free graphical user interface library ... by flohofwoe on Wednesday November 04, 2020 @04:45AM (#24987660)
The Dear ImGui C++ API also maps very well to C, so well that I actually prefer the C-API when working on a project that's mostly C (instead of using C++ for the UI code and C for everything else as I did before). AFAIK most of the other language bindings are also based on the C-API (which is autogenerated from the C++ API):

https://github.com/cimgui/cimgui

Re:Dear ImGui – Bloat-free graphical user interface library ... by mholub on Wednesday November 04, 2020 @06:14AM (#24988052)
We recently started to use Dear ImGUI in our custom game engine. Before we used Unity which has its own immediate mode gui solution. And I have hard time to switch. I don't know if I don't understand how Dear ImGui work yet in comparison to Unity's one but it feels so limited.

So main difference is that Unity is multipass (it calls your gui drawing code multiple times per frame) and because of it it supports horizontal layout, vertical layout, custom layout modifiers, styles and it is easy to use

in Dear ImGUI I am struggling to write stuff like:

layout 3 controls horizontally, allocate fixed size for first and last one and use all left space for middle one

or

layout next N controls vertically of unknown height and use this background color for them, then layout another set of controls and use different background style for them

I am not the person who was actively working on integration it into our engine, so maybe it's the problem of not having documentation on our wrapper...or me not understanding very basics of it

Re:Dear ImGui – Bloat-free graphical user interface library ... by malkia on Wednesday November 04, 2020 @04:07PM (#24993084)
Talk to occornut! He even posts here. Surely you gonna get some reasonable reply, or at least something. Also consider supporting him! Raise an issue on github, or look for similar before hand. I'm also torn when comes to dear imgui, but keep reading updates on it, and trying it at least few times a month with small things.
Re:Dear ImGui – Bloat-free graphical user interface library ... by uryga on Wednesday November 04, 2020 @06:22AM (#24988088)
honestly, im pretty sure imgui can't help you here, i.e. you have to calculate all the necessary sizes/positions yourself and tell imgui where everything should be
Re:Dear ImGui – Bloat-free graphical user interface library ... by masterofmisc on Wednesday November 04, 2020 @06:23AM (#24988094)
Cool. Does that mean I can use this in a C# Console app?