Immediate mode GUI
















































Immediate mode GUI
For some reason I felt like writing a little immediate-mode GUI library.
It has:
Labels
Buttons
Check boxes
Radio buttons
Sliders
Text boxes
You write into the text boxes on a little popup keyboard.
It works best with the mouse, but it can run in controller-only mode, where you move the pointer around with the direction arrows (it's pretty cumbersome though).
'Immediate mode' means you call the functions to draw the widgets in your drawing code, and it returns the user's input. It's generally easier to integrate into projects than a traditional widget UI would be, as you don't have to create and manage objects, you just draw the UI controls you need where and when you need them.
The first tab in the source is the library. The second is a little demo, that doubles as the documentation :)
UPDATE: Better looking buttons (thanks @freds72)