Jump to content
  • Advertisement
Sign in to follow this  
Guy Meh

GUI Library (again)

This topic is 3746 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been trying to build my own game GUI, but I suspect it'll get really hairy eventually. Over half of my code is GUI! So, I'm thinking about picking up a library. I want something relatively lightweight. I've tried wxWidgets in a past project (actually, wxPython) but it left a little to be desired for my project. To give some context, I'm creating a 2D turn-based RPG in C++. I want it to be fairly cross-platform, at the very least Windows and Mac (I'm developing on a Mac by the way). The only "standard" widgets I need are buttons, text fields, text labels, and list boxes. Of course, I'm sure most GUI libraries have these. What I'm more interested in are window/container features; that is, the widgets that you don't click on. Modal dialogues ("Are you sure you want to quit?") would be usefull, especially if I can create custom dialogs that contain whatever widgets I want. Bonus if the library includes a save/load file dialog (though that'll probably get me into wxWidgets territory again). One other functionality, which I haven't really seen in any GUI library, is the ability to easily switch the whole interface from one set of widgets to another. By this I mean switching from the Start screen to the Game screen, and later switching to the Options screen, etc. It's also important that there is good support for animated graphics. I'm only going to be using animation for special effects and so on, but I do remember that this was one of the things that wxWidgets wasn't that good at as far as I could tell. So far, the library that I thought might be good is Guichan. I still have my doubts though, and was wondering if anyone had other libraries to recommend. P.S. Here's a screenshot of my title screen, in the interest of making this post more interesting. This GUI is using SDL.

Share this post


Link to post
Share on other sites
Advertisement
So you want it to have the native feel or you want it to look fancy? If you want the native feel, then maybe IUP?

Share this post


Link to post
Share on other sites
Quote:
Original post by GMuser
So you want it to have the native feel or you want it to look fancy? If you want the native feel, then maybe IUP?


I want to look fancy. At the very least: custom button graphics (probably just sprites) and background textures for the screen.

Share this post


Link to post
Share on other sites
I am using Guichan myself.

I haven't done much custom stuff since in most cases I have been able to get away with changing fonts, line widths and colors kind of like the RPG demo on the Guichan site.

I haven't used it yet but I have been meaning to try out Guichan's GUI editor. It looks pretty clunky but I am sure there is at least some good ideas on how to achieve what you are looking for using Guichan.

Share this post


Link to post
Share on other sites
You could take a look at the FOX Toolkit - I think that it has most of what you listed. I'm not sure, I'm afraid, of how "light" or "heavy" it is - I haven't really looked into that myself.

If I recall correctly, all of buttons, text fields, text labels, list boxes and modal dialogues (including, again as I recall, a number of specialist subclasses, amongst which is a file dialogue, etc.).

Quote:
Originally posted by Guy Meh
One other functionality, which I haven't really seen in any GUI library, is the ability to easily switch the whole interface from one set of widgets to another. By this I mean switching from the Start screen to the Game screen, and later switching to the Options screen, etc.


I'm honestly not sure of what would go into this. If I recall correctly, I've thus far taken a fairly simple approach when using FOX thusly: I just have "special" screens, such as menus, be modal dialogue boxes (with the game generally no longer running - either suspended or ended - in the background).

Quote:
Originally posted by Guy Meh
It's also important that there is good support for animated graphics.


I'm honestly not sure that FOX supports this itself, although I don't think so. I do think, however, that you should be able to subclass one of their classes to support animation without too much difficulty once you get used to the library.

Share this post


Link to post
Share on other sites
I don't know if you already know about it, but I would recommend CEGUI (Crazy Eddie's GUI) because it has a renderer built specifically for use with OpenGL. Very customizable as well.

Share this post


Link to post
Share on other sites
Quote:
Original post by Thaumaturge
You could take a look at the FOX Toolkit - I think that it has most of what you listed. I'm not sure, I'm afraid, of how "light" or "heavy" it is - I haven't really looked into that myself.


Hmm. There isn't any native Mac port. I'll also have to check how skinnable it is (it even says in the FAQ that it looks like Windows by default).

Quote:
Quote:
Originally posted by Guy Meh
One other functionality, which I haven't really seen in any GUI library, is the ability to easily switch the whole interface from one set of widgets to another. By this I mean switching from the Start screen to the Game screen, and later switching to the Options screen, etc.


I'm honestly not sure of what would go into this. If I recall correctly, I've thus far taken a fairly simple approach when using FOX thusly: I just have "special" screens, such as menus, be modal dialogue boxes (with the game generally no longer running - either suspended or ended - in the background).


Yeah. The only API I ever saw that had this kind of functionality is Java Swing, which had a CardLayout class. But seeing that I'm using C++...

Quote:
Original post by Halifax2
I don't know if you already know about it, but I would recommend CEGUI (Crazy Eddie's GUI) because it has a renderer built specifically for use with OpenGL. Very customizable as well.


I saw CEGUI before too. My project right now is using SDL but no OpenGL. If I use GEGUI with OpenGL, would that make SDL redundant?

Share this post


Link to post
Share on other sites
If you're using SDL without OpenGL then you might consider using a barebones build of Agar. It is written in C and the OpenGL renderer is optional. It supports skinning but probably is a little more than you might want. It builds natively just fine under Linux and BSD. I suspect a Darwin BSD/MacOSX version is no problem since it is available in precompiled code. Likewise Windows is also supported on more than one compiler.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!