Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I want to implement some startup dialogs, for selecting game parameters, etc. The obvious (and I suppose naive) choice is to just use windows forms (I'm not really planning on porting this game to anything other than windows). But implementing this seems to be a real pain, i.e. can't use ShowDialog, and if I use Show() I have the question of how to return the result to the main loop.

I was wondering if there's an established way to implement dialogs (radio buttons, combo boxes, text boxes, etc) in XNA (maybe some libraries) or is it just a case of reinventing the wheel each time?

Just looking for some general advice on this issue before I spend too much time thrashing around trying different things.

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

From my personal experience with XNA, it's a pain. I think the way they expect us to do it, is to write our own GUI controls from the ground up. Buttons and checkboxes aren't so bad, but when you want lists, or text fields, it can eat up a lot of your development time.

I would highly recommend using a 3rd party GUI library. @ClassicThunder has developed one such library that you can check out on CodePlex, although I can't personally vouch for it. In my game, I was completely sick of developing my own GUI library, so I took off in a completely different direction. I've started to use Awesomium, a web-GUI. With Awesomium, you can create your entire interface using HTML, JavaScript, CSS, and any other fancy web package like JQuery. @MindWorX and I have co-authored an open-source Awesomium component for XNA that you can find on BitBicket.

Whatever you decide, I would not recommend making your own GUI package unless you are certain you will only need really basic controls. Use someone else's package.

share|improve this answer
    
Also if xnagui doesent work, Id recommend Neoforce Controls –  Cyral Aug 4 '12 at 17:01
    
If xnagui doesn't work please shoot me an email :). Anyways neoforce had no documentation until this fine fellow put a lot of work in. (mikekukta.com/post/2011/05/19/…) –  ClassicThunder Aug 21 '12 at 20:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.