Live data from Hacker News

Buttons as Finite Automata

web.stanford.edu

81–82 of 82 posts

Re: Buttons as Finite Automata

#81

Earlier quoted context omitted.

No repro here (Chrome 99 on Windows): right-clicking the button works the same as left-clicking it (yes, there's my browser's context-menu, but it doesn't seem to interfere with the webpage's logic at my end).

On Chrome on Mac I get the same, and right clicking outside the button makes it stick in the (idle, down) state, hovering makes it move between (hover, pressed) and (idle, down). Still a crazy cool demo though. Having worked on ui for my hobby games, I always knew it was more complex than just onClick, but this makes me understand it perfectly. I'm probably going to implement a model based on this in my current proje…

I can make it do this on Firefox on Ubuntu; the key is to hit Escape to dismiss the context menu, instead of clicking away. Closing it by clicking away makes it act correctly.

Re: Buttons as Finite Automata

#82
in 2016 Casey Muratori wrote a few words about his old video "IMMEDIATE-MODE GRAPHICAL USER INTERFACES (2005)" -- apparently he'd been using the technique for years by then and had coined the, now commonly used, imgui acronym -- see: https://caseymuratori.com/blog_0001

and if you dive into that video at 16:50 you'll see a very elegant description of minimal state immediate mode button logic; direct time link: https://youtu.be/Z1qyvQsjK5Y&t=16m50s

Post reply on HN