Brian Wrote:
Interesting idea, though the “typical one-look fits all” GUI we often
see don’t seem to fit in a gaming library environment.
It would have to be extremely low-level, “image oriented” for buttons,
menus, etc. This would give game builders the flexibility to make a very
custom look. Not just “change the colors” of the buttons.
Making it extremely customizable, where you can have “pop-up” dialogs, or
even “transparent/alpha transparent” dialogs that pop up over the window.
For it to be “plugable” it would probably have to be a seperate layer
between the game engine drawing graphics and the “SDL_Update…” calls.
You’d want to be able to draw your graphics just as you do now… and add
the menuing section over the top of it during each update, if any menu’s
are active.
I was actually thinking about this quite a bit over the last few weeks…
What I came up with very closely mirrors the X model, but on a very
light-weight scale. Basically the idea was to keep things modular, so it
would be pretty to pull one piece out and drop in a replacement. Basically
I see three libraries layered on top of SDL (like smpeg and mixer).
SDL_win : This library would handle the actual phisical windowing… It
would implement the much pined-for “color mouse-cursor” as well as
a windowing hierarchy of parent and child windows. It would handle a
dirty-list to keep track of what part of which windows needed to be
updated, as well as clipping of child windows to parent windows.
(FYI, a “dialog box” or other similar window would be treated as a
sibling window… not as a child) It would also be responsible for
handleing the event queue, and all the non-window_manager related
events. This would be where most of the complexity would lie.
SDL_gui : This would be the actual GUI widget library… For simplicity I
was thinking of making this a port of GDK to SDL_win (where GTK would
come along for the ride) but the beauty of this is that the UI would
be easily pluggable.
SDL_wm : this would be the equivilant of the X window manager… It would
control positioning and sizing of SDL_win windows, and provide users an
interface to modify these (window decorations). This would most likely
use widgets from SDL_gui.
I really don’t have time to contribute to such an effort at this time, but
I hope that these ideas help you. Best of luck.
Regards,
-Loren============
Loki Developer