<- Back
Comments (42)
- dazzawazza> While it’s far from perfect, writing it taught me more about UI systems than I ever would have learned by sticking to established solutions alone.This is a great attitude to have. Keep up the great work.
- cardanomeImmediate mode GUI is the way to go.Retaining state is a pain and causes bugs. Trying to get fancy a la react and diffing the tree for changes makes not sense. That was a performance hack because changing the DOM in JS used to be slow as hell. You don't need that.Just redraw the whole thing every frame. Great performance, simple, less bugs.
- threetwoonezeroHad a similar itch during my game development with libgdx, and had almost same architecture eventuallyI found that I have two different ways to construct UI layout , from top down, and from down to top, those could be contradictory, wonder how one could solve this, seems like common problem in all frameworks that I saw, like flutter just fail with error on screen if it can't solve restrictions in such conflict , others just show jiberish
- mbmproductionsauthor here - thanks for posting :D would love to hear any thoughts or questions.
- eviks> writing it taught me more about UI systems than I ever would have learned by sticking to established solutions aloneBut less if you had spent a fraction of that time just learning about established solutions and hacking around those(ironic indicator: the first button on the page reflows on first click, so an example of bad UI)
- leecommamichaelLots of confused comments here about immediate vs retained GUIs. Immediate-mode is an API-design, not an implementation detail. All Immediate-mode GUIs retain data, and for that reason they each have their own APIs for retaining data in various capacities. Usually something really simple like hashing for component-local state.
- giveexamplesrectcut is a good API for layout if you have a fixed viewport (eg eink display)the API is a very simple one where you slice parts off an initial Rect. the only feature it provides is that it tracks (x, y, h, w) for you.it doesn't work well with intrinsic sizes - it's more of a top down, fixed size thing.