← Back to context

Comment by socalgal2

6 days ago

In my experience immediate mode guis almost always ignore internationalization and accessibility.

The thing you get by using an OS widget and putting a string in it is that the OS can interact with the string. It can read it out load, translate it, fill it in with a password, look it up in a dictionary, edit it right to left, handle input method editors whose hot keys are in conflict with app doing its own editing, etc…

There’s a reason why the most popular ImGUIs are targeted at game dev tools and in game dev uis and not end user uis

You could potentially make an Immediate mode gui that wrapped a retained gui. arguably that is what react is. From the programmers pov it’s supposed to look like imgui code all the way down. It runs into the issues of having to keep to two representations in sync. The ui represented by react and the actual widgets (html or native) and that’s where all its complications come from

Yes, one argument that I didn't make in the post but that does favor immediate mode is that you can somewhat straightforwardly convert from an immediate mode GUI to retained mode by just introducing your own abstractions. In some sense this makes you more disciplined about the FPS which could be a net win over all.

[Note that Tritium at least is translated into a number of a different languages. That part isn't that hard.]

  • hard is this: https://faultlore.com/blah/text-hates-you/

    and this: https://lord.io/text-editing-hates-you-too/

    those are both things most ImGUIs ignore. And, even if you pick some library that somehow handles the first you're left with all of the issue mentioned above.

    To be clear, if I was writing a devtool (and I am actually) i'd reach for an ImGUI (and I did). But I'd be unlikely to use one for user facing tool.

    • Those are also things that most retained mode GUIs ignore, unless they are "platform native". Only a small number of GUI implementations get these things right because they are hard. There are many, many GUI implementations, and most of them are pretty rough, to put it mildly.

      It has nothing to do with how the state is managed. (This is the only distinction between immediate and retained modes.)

    • Tritium is a rich text editor. I'm familiar with the issues outlined in those posts.

      To be fair with a lot of the GUI frameworks in various ecosystems ... they try to solve different pieces of them.