How to add GUI?

Apr 17, 2012 at 10:52pm
Hello guys! I just "finished" a video game I was working on (Epic-Quest) and I was wondering how could I add GUI to the game to make it easier to use. Should I use QT, make it myself, or use SFGUI? If you are curious the project is hosted at github http://github.com/TheMassiveChipmunk/Epic-Quest/.

Any suggestions?
Apr 18, 2012 at 7:07am
Making it yourself shouldn't be too hard; the hardest things will be keeping widgets aligned (solution: use containers) and figuring out which widget to send events to (I'd have each widget figure out which child widget to inform; if you click on the widget C which is a child of B which is a child of A (the window) then A tells C that the mouse was somewhere within C's co-ordinates and C tells B that the mouse was somewhere within B's co-ordinates and then B figures out what to do with it).

I don't know how you'd do it with Qt (I know SFML can be integrated into GUI toolkits but I've never tried it) and I've not used SFGUI but it is probably easier to use one of those (I'd probably go with SFGUI).
Apr 21, 2012 at 3:10am
Thanks, I am going to start making it myself. I hope I don't fail epically XD.
Apr 21, 2012 at 1:54pm
Good luck :)
Apr 21, 2012 at 8:56pm
Writing GUI code in SFML isn't too bad, its actually pretty easy. All you really nee to do is define some classes for various types of buttons and labels, and maybe text-boxes if you need them.
Topic archived. No new replies allowed.