Page 1 of 1

GUI capabilities?

Posted: Wed Aug 17, 2011 1:39 pm
by Anurak
I asked in other forums about the capabilities of Qt, CEGUI and wxWidgets, but I still no reply answers my questions. So I decided to ask directly the users of each one. I've used C++ on and off for some projects over the years. Nothing too fancy, since I'm not a programmer; mostly simple games running on console window. I just have fun when I have time to spare.

Right now I'm on Windows XP SP3, using wx-Dev-C++ for the code. I've watched several tutorials about creating simple windows (Hello World window included), but I haven't seen any custom made buttons or imported images used as GUI elements. I decided to create a simple text RPG, similar to many board games which use dice and cards. I'm only interested in the visual presentation of the window, not 3d graphics or complex 2d. What I want to make is a fantasy themed interface which will have a relatively large text box in the middle with scrolling capabilities (to display dice rolls/damage/options). On the left and right I want to display information about the hero and his opponents. If it possible I would like to display some values that will change dynamically (like the health changes after some actions).

I don't really need buttons, except for one that will open a new window which will show details/stats about my character. For all other input (option selections) I will use the keyboard.

Can I do the above with wxWidgets? What troubles me is that I didn't manage to find an example of how to use custom made graphics, like some buttons/windows I can create in photoshop. If I can can you direct me to a link showing a project that is similar to mine? If not where should I turn to?

Thanks in advance.

Re: GUI capabilities?

Posted: Wed Aug 17, 2011 2:26 pm
by doublemax
Most GUI toolkits target "standard" applications, not games. And wxWidgets in particular uses native controls unlike most other toolkits. This is nice for standard applications, but makes stuff you want more difficult.

wxWidgets has no support for "themes", so there is no easy way to just replace some bitmaps and change the style/look of all controls. I.e. it's almost impossible to change the look of scrollbars with wxWidgets. (Only with the "universal" port, but using that is an adventure on its own).

For your case, it might be the easiest to just see the window as one big canvas that you can draw on and draw everything yourself.

And something like wxSkin might be worth checking:

Re: GUI capabilities?

Posted: Wed Aug 17, 2011 2:37 pm
by Anurak
Thank you for the quick answer. If you were in my place, wanting the things I described, what would you do? Would you choose another GUI toolkit?

Re: GUI capabilities?

Posted: Wed Aug 17, 2011 3:35 pm
by doublemax
For a definite answer i'd need to know more about what and how many custom gui elements you need for the game. If it's only buttons and simple elements, i'd use wxWidgets (but mainly because i know it pretty well and already know what i'd have to do).

If you more or less need a complete themed window manager, I'd look into 2D game engines. I would expect that there are game engines out there that support this.

Re: GUI capabilities?

Posted: Thu Aug 18, 2011 6:28 am
by Anurak
Since I'm more interested in simplicity (I'm not a programmer after all), and not making my life difficult, I'll take a look at other engines before I decide. Thanks for replying to my posts.

Re: GUI capabilities?

Posted: Wed Feb 08, 2012 7:49 pm
by archqt
it is possible to use theme with Qt but for a game use SFML it is more adapted.