GUI capabilities?

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Anurak
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Aug 17, 2011 1:14 pm

GUI capabilities?

Postby Anurak » Wed Aug 17, 2011 1:39 pm

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.

User avatar
doublemax
Moderator
Moderator
Posts: 12614
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: GUI capabilities?

Postby doublemax » Wed Aug 17, 2011 2:26 pm

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.
http://wiki.wxwidgets.org/Drawing_on_a_panel_with_a_DC

And something like wxSkin might be worth checking:
http://www.upcase.de/wxSkin.html
Use the source, Luke!

Anurak
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Aug 17, 2011 1:14 pm

Re: GUI capabilities?

Postby Anurak » Wed Aug 17, 2011 2:37 pm

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?

User avatar
doublemax
Moderator
Moderator
Posts: 12614
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: GUI capabilities?

Postby doublemax » Wed Aug 17, 2011 3:35 pm

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.
Use the source, Luke!

Anurak
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Aug 17, 2011 1:14 pm

Re: GUI capabilities?

Postby Anurak » Thu Aug 18, 2011 6:28 am

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.

archqt
In need of some credit
In need of some credit
Posts: 3
Joined: Mon Aug 22, 2011 4:54 pm

Re: GUI capabilities?

Postby archqt » Wed Feb 08, 2012 7:49 pm

Hi,
it is possible to use theme with Qt but for a game use SFML it is more adapted.
Thanks


Return to “General Development”

Who is online

Users browsing this forum: No registered users and 1 guest