Comment

Comment by flohofwoe

Isn't the whole point of immediate mode UIs to get rid of the "event loop" though?

> multiple application views that conditionally show/hide

The ImGui way of doing this is to conditionally run or not run the code which describes the conditionally shown UI elements. E.g. a simple

    if (viewShown) {
        ...code which describes what the view looks like
    }
There are plenty of real-world applications with complex UIs implemented in Dear ImGui which don't seem to have a problem with those things, e.g. see https://github.com/ocornut/imgui/labels/gallery

> The trouble comes from not componentizing things...

In ImGui, reusable UI components are just code which describes the UI component by calling lower-level ImGui functions and which itself is a new ImGui-style function. It works surprisingly well.

parent flohofwoe 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton