SDL Gui library

Started by
7 comments, last by TortyFoo 18 years, 3 months ago
Are there any libraries that I can use with SDL to create standard windows GUI elements? Particularly menus. I can do it using the API but doing it that way breaks the cross platform use. Does anyone know of any libs that will abstract this so the program can be used in linux as well?
Advertisement
There are a bunch of half finished gui libs that use sdl for rendering - look in the links section of the sdl site, or google "sdl gui". Depending on your needs, one of them may be enough. If you need more than basic widgets you're probably out of luck and should look at FLTK or wxWidgets.

If you don't mind using opengl, javcooldude's gui may be useful. http://www.gamedev.net/community/forums/topic.asp?topic_id=325963
[size="1"]
If you absolutely MUST use standard Windows and Linux GUI elements then I'd suggest using wxWidgets as MrBastard suggested. But note that you won't be able to use SDL without first using some OpenGL backend to convert all of your SDL calls into OpenGL for use with the wxWidgets OpenGL support context.

If you don't mind using a custom GUI with SDL then I'd suggest ParaGUI in fullscreen mode. It has a dependancy concern in LibSigC++ but this has been ported to both Windows and Linux so as long as you are satisfied using these two OSs then you should be fine.
I am working on a DX GUI lib right now, as well as an editor to create the guis. I would be happy to share this with you when I'm finished (about one more week). It has support for buttons, sliders, radio and check boxes, statics, list boxes (multi/single select), and decals.

Also, the editor uses gdi and has no dependance on DX. It will export an XML file that you could use for your own SDL stuff if you want.
Don't be afraid to be yourself. Nobody else ever will be.
bit64 - Thanks for the offer, however I am putting aside my current projects (aka random code) and spending some time in Java land. I will probably be coming back to revisit this so I will definitely keep it in mind. Thanks for all the input everyone.
I just may as well add that it would be trivial to write a custom SDL renderer for Crazy Eddie's GUI (which is quite mature and is currently serving me well, albeit I might have done some things differently myself). It might be worth a look when you return...
I wrote an SDL+OpenGL GUI using the DirectX tutorials on this site; I had to rewrite most of the code to suit my own programming style, but at a conceptual level I found them very helpful. I highly recommend them for anyone who is involved in such a project.

http://www.gamedev.net/reference/articles/article994.asp
http://www.gamedev.net/reference/articles/article999.asp
http://www.gamedev.net/reference/articles/article1000.asp
http://www.gamedev.net/reference/articles/article737.asp

Best of luck
GTK+ might be an option.

There's an example of using SDL with GTK here.
There are 2 other GUI's I know of they seem to get rarely mentioned that may be worth looking at.

Guichan - a portable C++ GUI library designed for games using Allegro, SDL and/or OpenGL.

JUCE - (Jules' Utility Class Extensions) is an all-encompassing C++ class library for developing cross-platform applications.

I personally after much searching am going to use JUCE for my project. It looks very clean and the cross platform whilst not essential for me is a nice bonus. I also like the fact it *doesn't* make it look like a native windows/mac/linux app. Guichan might be more appropriate for you though as you are already using SDL.

Daniel.

This topic is closed to new replies.

Advertisement