UI library for SDL

How many people use GUI’s with their SDL projects? I was thinking of
making up a library of various user interfaces that people could use in SDL
programs. Popup menus, menu bars, dialoge boxes, consoles… typical stuff
used in various user interfaces. It would be written in C and would only
need SDL so hopefully it would be portable between OS’s. Is this something
anyone uses?

I would love to use one, and have been thinking about this for ages. Eventually, when I get the time, I’m going to add some strange
hacks to SDL to enable support for multiple windows without completely destroying backwards compatibility. This’d be useful -
for one thing, if we had this, we could port GDK over to SDL and then just use GTK+. A nice game oriented GUI would be very cool,
and I’d gladly chip in some code.

-Garrett WPI student majoring in Computer Science.

Nicholas

How many people use GUI’s with their SDL projects? I was thinking of
making up a library of various user interfaces that people could use in SDL
programs. Popup menus, menu bars, dialoge boxes, consoles… typical stuff
used in various user interfaces. It would be written in C and would only
need SDL so hopefully it would be portable between OS’s. Is this something
anyone uses?

-Garrett WPI student majoring in Computer Science.

“The fastest way to succeed is to look as if you’re playing by somebody
else’s rules, while quietly playing by your own.” -Michael Konda

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.–
Brian

How many people use GUI’s with their SDL projects? I was thinking of
making up a library of various user interfaces that people could use in SDL
programs. Popup menus, menu bars, dialoge boxes, consoles… typical stuff
used in various user interfaces. It would be written in C and would only
need SDL so hopefully it would be portable between OS’s. Is this something
anyone uses?

-Garrett WPI student majoring in Computer Science.

“The fastest way to succeed is to look as if you’re playing by somebody
else’s rules, while quietly playing by your own.” -Michael Konda

How many people use GUI’s with their SDL projects? I was thinking of
making up a library of various user interfaces that people could use in
SDL
programs. Popup menus, menu bars, dialoge boxes, consoles… typical
stuff
used in various user interfaces. It would be written in C and would only
need SDL so hopefully it would be portable between OS’s. Is this something
anyone uses?

You mean like a collection of widgets? It would be nice. I’m writing a RPG
game right now that’s presented in a similar manner as the early Final
Fantasy II/III games on the snes. Since I’m writing most of the UI stuff
myself, it would be kinda nice if I could rip out already built stuff and
tailor it to my game.

cheers,
Dave “PenguinDude” Archbold
davea at radiks.netOn Wednesday, February 23, 2000 12:00 PM, Garrett Banuk [SMTP:mongoose at WPI.EDU] wrote:

Well that basically what I was planning. Make a skeleton of a gui, then
let the user picks fonts, background images, transparencies, etc… kinda
like what I did with my console. I was thinking just have a basic gui that
would load up and do some basic stuff, then the user could just make
function calls to the gui library that would tell it what alpha blending
mode to use, what background images to load up, colors, borders, etc…

At 07:32 AM 2/23/00 -0600, you 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.


Brian

How many people use GUI’s with their SDL projects? I was thinking of
making up a library of various user interfaces that people could use in SDL
programs. Popup menus, menu bars, dialoge boxes, consoles… typical stuff
used in various user interfaces. It would be written in C and would only
need SDL so hopefully it would be portable between OS’s. Is this something
anyone uses?

-Garrett WPI student majoring in Computer Science.

“The fastest way to succeed is to look as if you’re playing by somebody
else’s rules, while quietly playing by your own.” -Michael Konda

-Garrett WPI student majoring in Computer Science.

“The fastest way to succeed is to look as if you’re playing by somebody
else’s rules, while quietly playing by your own.” -Michael Konda

I’ll have to tackle this issue in a bunch of upcoming RPG projects I
have planned. The most difficult thing you will face is how to handle
events going to your own psuedo windows, that is most easily solved by
using your own event handling functions that pick the events out of
SDL’s queue and distributes them properly. If you really want to get
some cool points here build your GUI system around a scripted language
like HTML, I got alot of oohs and ahhs when I proposed doing that in
my own project a while back.

Phoenix Kokido
members.xoom.com/kokido
@Wes_Poole

Garrett Banuk wrote:> How many people use GUI’s with their SDL projects? I was thinking of

making up a library of various user interfaces that people could use in SDL
programs. Popup menus, menu bars, dialoge boxes, consoles… typical stuff
used in various user interfaces. It would be written in C and would only
need SDL so hopefully it would be portable between OS’s. Is this something
anyone uses?

-Garrett WPI student majoring in Computer Science.

“The fastest way to succeed is to look as if you’re playing by somebody
else’s rules, while quietly playing by your own.” -Michael Konda

You mean like a collection of widgets? It would be nice. I’m writing a RPG
game right now that’s presented in a similar manner as the early Final
Fantasy II/III games on the snes. Since I’m writing most of the UI stuff
myself, it would be kinda nice if I could rip out already built stuff and
tailor it to my game.

Sounds like a really good idea. Even if you aren’t writing an RPG. Right
now I am in the process of designing a side-scroller with some friends.
It will be our first game and we plan to use SDL to do it.

I am really excited about the idea right now because we think that we are
going to put humorous element all over the place. (Remember Earthworm
Jim?)

Well I am at work on a win98 box (eeeeeeyyyyuuuuuuuu!)

Dave

Well that basically what I was planning. Make a skeleton of a gui, then
let the user picks fonts, background images, transparencies, etc… kinda
like what I did with my console. I was thinking just have a basic gui that
would load up and do some basic stuff, then the user could just make
function calls to the gui library that would tell it what alpha blending
mode to use, what background images to load up, colors, borders, etc…

Sounds like we are on the same track then.
Clarification about the background… I would find it useful for the
background to not even exist. Having it popup a fully transparent window,
but the text/buttons may show up and you can see the game through it.

Also, would this be released under the GPL or LGPL? I downloaded the
SDL_Console program and noticed it has the GPL license in it, not the LGPL
license. If you license it under the GPL, then non-GPL apps can’t link to
it.–
Brian

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.

Indeed, that would be very nice. Not many GUIs out there that fit the gaming
niche properly. Since SDL supports all the bitmap functionality, should be easy
to write.

For example, i often have animating push
buttons for game menus. That is, the button animates while the cursor is
over it and has other bitmaps for idle (cursor not over) and pressed (cursor over
and pressed).

You could define the most common types of game buttons, sliders, toggles,
and such and let the user define special stuff with override functions
(eg. userProcessFunc, userDrawFunc)

–Dave McClurg

Well I’ve found it best to rely on the programmer using to API to pass
the appropriate events to the UI. Like for my console, I just need the
programmer to set some function (some unicode function or something, i
forget) when they want to use the console, and then place the consoles
event handler at the end of their event filter routine they have written.
Then all the important events are handled by their part of the program, and
the rest are sent to the console to interpet.

At 07:13 PM 2/23/00 +0000, you wrote:

I’ll have to tackle this issue in a bunch of upcoming RPG projects I
have planned. The most difficult thing you will face is how to handle
events going to your own psuedo windows, that is most easily solved by
using your own event handling functions that pick the events out of
SDL’s queue and distributes them properly. If you really want to get
some cool points here build your GUI system around a scripted language
like HTML, I got alot of oohs and ahhs when I proposed doing that in
my own project a while back.

Phoenix Kokido
members.xoom.com/kokido
kokido at postmark.net

Garrett Banuk wrote:

How many people use GUI’s with their SDL projects? I was thinking of
making up a library of various user interfaces that people could use in SDL
programs. Popup menus, menu bars, dialoge boxes, consoles… typical stuff
used in various user interfaces. It would be written in C and would only
need SDL so hopefully it would be portable between OS’s. Is this something
anyone uses?

-Garrett WPI student majoring in Computer Science.

“The fastest way to succeed is to look as if you’re playing by somebody
else’s rules, while quietly playing by your own.” -Michael Konda

-Garrett WPI student majoring in Computer Science.

“The fastest way to succeed is to look as if you’re playing by somebody
else’s rules, while quietly playing by your own.” -Michael Konda

Ya I was thinking of just taking the license out of the console and
making it free since its just a tiny little application, maybe the same
with the UI if I make that. Hows the LGPL work?
As for the transparent windows and stuff, options are easy to add.

At 08:34 AM 2/23/00 -0600, you wrote:

Well that basically what I was planning. Make a skeleton of a gui, then
let the user picks fonts, background images, transparencies, etc… kinda
like what I did with my console. I was thinking just have a basic gui that
would load up and do some basic stuff, then the user could just make
function calls to the gui library that would tell it what alpha blending
mode to use, what background images to load up, colors, borders, etc…

Sounds like we are on the same track then.
Clarification about the background… I would find it useful for the
background to not even exist. Having it popup a fully transparent window,
but the text/buttons may show up and you can see the game through it.

Also, would this be released under the GPL or LGPL? I downloaded the
SDL_Console program and noticed it has the GPL license in it, not the LGPL
license. If you license it under the GPL, then non-GPL apps can’t link to
it.


Brian

-Garrett WPI student majoring in Computer Science.

“The fastest way to succeed is to look as if you’re playing by somebody
else’s rules, while quietly playing by your own.” -Michael Konda

Sounds like a really good idea. Even if you aren’t writing an RPG. Right
now I am in the process of designing a side-scroller with some friends.
It will be our first game and we plan to use SDL to do it.

I am really excited about the idea right now because we think that we are
going to put humorous element all over the place. (Remember Earthworm
Jim?)

Yep! Make something with lots of cool manipulations, not just a simple “Run and shoot” - so you can throw ropes and swing off of
them and fall off of buildings with umbrellas and stuff. :slight_smile:

Well I am at work on a win98 box (eeeeeeyyyyuuuuuuuu!)

Win98, eh? Don’t suppose you’d like to help me get some Linux based SDL/GL/SDL_Image/SDLMixer code ported over to
Windows? I need somebody who actually has a copy of MSVC :wink:

Dave

Nicholas

LGPL is perfect with me.–
Brian
On Wed, 23 Feb 2000, Garrett Banuk wrote:

Ya I was thinking of just taking the license out of the console and
making it free since its just a tiny little application, maybe the same
with the UI if I make that. Hows the LGPL work?
As for the transparent windows and stuff, options are easy to add.

At 08:34 AM 2/23/00 -0600, you wrote:

Well that basically what I was planning. Make a skeleton of a gui, then
let the user picks fonts, background images, transparencies, etc… kinda
like what I did with my console. I was thinking just have a basic gui that
would load up and do some basic stuff, then the user could just make
function calls to the gui library that would tell it what alpha blending
mode to use, what background images to load up, colors, borders, etc…

Sounds like we are on the same track then.
Clarification about the background… I would find it useful for the
background to not even exist. Having it popup a fully transparent window,
but the text/buttons may show up and you can see the game through it.

Also, would this be released under the GPL or LGPL? I downloaded the
SDL_Console program and noticed it has the GPL license in it, not the LGPL
license. If you license it under the GPL, then non-GPL apps can’t link to
it.


Brian

-Garrett WPI student majoring in Computer Science.

“The fastest way to succeed is to look as if you’re playing by somebody
else’s rules, while quietly playing by your own.” -Michael Konda

Phoenix Kokido Wrote:

If you really want to get
some cool points here build your GUI system around a scripted language
like HTML, I got alot of oohs and ahhs when I proposed doing that in
my own project a while back.

you can’t have dynamic content in HTML without javascript so embedding
HTML is tough unless you have a javascript interpreter (There are lots of
HTML interpreters). If you define your own special TAGS for doing dynamic
content then you lose the ability to author the interface with standard web
page tools.

i wish someone would write a HTML/Javascript library you could embed
in your game to use for interface :slight_smile: but that is a really big project.

–Dave McClurg

Sounds like a really good idea. Even if you aren’t writing an RPG. Right
now I am in the process of designing a side-scroller with some friends.
It will be our first game and we plan to use SDL to do it.
Well, as someone else pointed out, the UI stuff would have to be pretty
flexable. I mean, transparent text boxes, bitmaps that act like buttons,
and so on. We wouldn’t want our games littered with the same old boring
grey buttons and all :slight_smile:

I am really excited about the idea right now because we think that we are
going to put humorous element all over the place. (Remember Earthworm
Jim?)
Earthworm Jim was cool. And humor is cool. I wish you luck :slight_smile:

Well I am at work on a win98 box (eeeeeeyyyyuuuuuuuu!)
Heh,heh…not only do I have to use NT, but I have to program
in…ah…won’t tell :slight_smile: Too embarrassed :). Let’s put it like this,
Edsger Dijkstra’s once said it cripples the mind, it’s teaching should be
regarded as a criminal offsense :slight_smile:

Dave

cheers,
Dave “PenguinDude” Archbold
davea at radiks.netOn Wednesday, February 23, 2000 1:15 PM, Dave [SMTP:dleimbac at phoenix.lhup.edu] wrote:

Oh no…not again :slight_smile:

cheers,
Dave “PenguinDude” Archbold
davea at radiks.netOn Wednesday, February 23, 2000 8:35 AM, hayward at slothmud.org [SMTP:hayward at slothmud.org] wrote:

Also, would this be released under the GPL or LGPL? I downloaded the
SDL_Console program and noticed it has the GPL license in it, not the LGPL
license. If you license it under the GPL, then non-GPL apps can’t link to
it.

Flexability is simple design issue. Whenever you can’t decide between a
set of options, just put them all in and let the user take his pick. =) Of
course you have to find that right balance between options and bloat-ware.

At 01:52 PM 2/23/00 -0600, you wrote:

Well, as someone else pointed out, the UI stuff would have to be pretty
flexable. I mean, transparent text boxes, bitmaps that act like buttons,
and so on. We wouldn’t want our games littered with the same old boring
grey buttons and all :slight_smile:

-Garrett WPI student majoring in Computer Science.

“The fastest way to succeed is to look as if you’re playing by somebody
else’s rules, while quietly playing by your own.” -Michael Konda

— vining at pacificcoast.net wrote:

How many people use GUI’s with their SDL projects? I was thinking
of
making up a library of various user interfaces that people could use
in SDL
programs. Popup menus, menu bars, dialoge boxes, consoles…
typical stuff
used in various user interfaces. It would be written in C and would
only
need SDL so hopefully it would be portable between OS’s. Is this
something
anyone uses?

I would love to use one, and have been thinking about this for ages.
Eventually, when I get the time, I’m going to add some strange
hacks to SDL to enable support for multiple windows without
completely destroying backwards compatibility. This’d be useful -
for one thing, if we had this, we could port GDK over to SDL and then
just use GTK+. A nice game oriented GUI would be very cool,
and I’d gladly chip in some code.

-Garrett WPI student majoring in Computer Science.

Nicholas

If your interested in a example of some of those things you may want
to take a look at csws (crystal space windowing system), which can be
found at http://crystal.linuxgames.com . The only downside is that it
does not use SDL.=====
Jason Platt.

“In theory: theory and practice are the same.
In practice: they arn’t.”


Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.

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

If I understand you right you’d want to use SDL like some kind of
windowmanager, which manages your GDK-made windows. Wouldn’t it be simpler
and cleaner (as in “not breaking console-(non-X-)compatibility”) to use
SDL as a replacement for X, so that GDK draws to the (single) SDL-window as
it would to an X-screen ? You’d have to have “virtual” windows inside of it.
Something like an Xlib with SDL as its target. Well, perhaps that’s simpler
only in theory, I don’t know, but I think it would be much nicer.
Perhaps the gtk-themability would already be enough to make fancy game-
windows/controls ?

Just my 0.02$
robOn Wed, Feb 23, 2000 at 12:12:35PM -0000, vining at pacificcoast.net wrote:

[GUI]
I would love to use one, and have been thinking about this for ages. Eventually, when I get the time, I’m going to add some strange
hacks to SDL to enable support for multiple windows without completely destroying backwards compatibility. This’d be useful -
for one thing, if we had this, we could port GDK over to SDL and then just use GTK+. A nice game oriented GUI would be very cool,
and I’d gladly chip in some code.