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.


1 Answer 1


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.

  • \$\begingroup\$ Also if xnagui doesent work, Id recommend Neoforce Controls \$\endgroup\$
    – Cyral
    Aug 4, 2012 at 17:01
  • \$\begingroup\$ 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/…) \$\endgroup\$ Aug 21, 2012 at 20:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .