Hacker News new | past | comments | ask | show | jobs | submit login

Could you expand a bit on 'immediate mode design purity'? I've done immediate mode stuff from scratch and my experience had been "just write whatever code you need to get it to work," there hasn't really been an overall architecture guiding it. Never worked with an im library before.



Looking at the Nuklear example code again it turns out that I was remembering wrong. I seemed to remember that Nuklear requires to store persistent state on the API user side and pass that into the Nuklear functions, but this was actually microui 1.x (which also has been fixed in the meantime in microui 2.x).

Sorry about the confusion.

E.g. in microui 1.x defining a window worked like this:

    static mu_Container window;
    if (mu_begin_window(ctx, &window, "Style Editor")) { ... }
...in microui 2.x it's no longer necessary to store the window state on the user side:

    if (mu_begin_window(ctx, "Style Editor", mu_rect(350, 250, 300, 240))) { ... }




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: