Immediate Mode GUIs

Miscellaneous Forums/General Discussion/Immediate Mode GUIs

The point isn't how buttons trigger the 'I got clicked' state, it's how the buttons get rendered and used in the main body of your program.

If you want your button to register a click as soon as MouseDown happens, then do it. I don't know what you're saying about toggles and spinner buttons?

Everything you're doing to draw your widgets remains the same, they just get called directly from your main code. Your toggle button code doesn't store its state (on or off), the main body of your code is responsible.

This makes sense. If the UI library stores the button states and edit-box data then your program has to say "gee, thanks for handling all this edit-box stuff for me, but, errr, what's in the edit box please?". Rather than "mystring$=EditBox(x,y,z)" where EditBox is the UI library function which renders the edit-box.

Wrap that all up in with the Hot / Active logic and you're well away.