[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Gui



>I do wonder though, what/if people have tried as alternatives to event
> driven GUI programming... anyone care to share?

Some time ago I was building my own widget system. It didn't take over the
program's main control loop. Instead, the main loop (of Pygame) caught
button-click events and said, "For every panel of the GUI, for every
widget in the panel, ask that widget if these coordinates (those of the
mouse click) are within its borders. If so, call that widget's "click"
function." I don't know if that's a _good_ way to handle a GUI, but it's a
slightly different approach, anyway.

Kris
Soon to want some kind of GUI for OpenGL.