UI library for XNA

2019-01-30 07:13发布

问题:

I'm working on a small and simple XNA game and I'm noticing I'm spending way too much time implementing basic UI functionality like menus, (rich) text rendering including wrapping and basic UI lay-out such as alignment of elements.

This is a fairly common problem, and I was wondering whether anyone knows of a library to handle these things. I know there are some good skinnable options available to windows programmers (Crazy Eddie's GUI comes to mind), but as I'm targeting the Xbox 360 I would like to find a pure managed solution.

回答1:

xWinForms is easily the most complete and actively maintained GUI system for XNA. Window System for XNA (WSX) had some good progress in the past (I was working on it for a while), and is still a decent system, though it hasn't been maintained for over a year now. The best option is definitely to go with xWinForms, at least until WPF interoperability comes along (next version of WPF/XNA?) and makes all the other options effectively obsolete.



回答2:

There's XNA Simple Gui and xWinForms. They provide some basic GUI elements. Haven't seen any menu components, though.



回答3:

Check out SQUID: http://www.ionstar.org/

It's a really clean, fast, and engine independent UI system. I've worked with it extensively and really enjoy using it. The download includes sample code for XNA 3.1, Truevision3D, and SlimDX.



回答4:

I'm going to recommend the Nuclex Framework's GUI library. Nuclex is great, active and fully tested. It works on Windows and Xbox 360. It also has a great design.



回答5:

Most of the projects listed here are now out of date.

The official thread for this question on the XNA forum is at http://xboxforums.create.msdn.com/forums/t/15274.aspx [link updated]

It's been kept up to date over the years by The ZMan.



回答6:

Check out the Gamestate Management Example for a game menu example.

NOTE: Last I checked, it wasn't fully functional with XNA 3.0.



回答7:

see FuchsGUI it's a light-weight GUI library

http://ghoshehsoft.wordpress.com/2011/02/11/xna-fuchsgui-part-i/



回答8:

I have once used this Neoforce Controls library for one of my project. Skin can be changed, and default Modern & Space-like UI skin may interest you.

Notice that this library is stated to not continue the development. Anyway you may find something useful there.

Note: as of June of this year, moved to GitHub here and resumed development: https://github.com/NeoforceControls/XNA



回答9:

Adding Nuclear Winter to this list: https://bitbucket.org/sparklinlabs/nuclearwinter/

It's a stylish looking GUI and was built with touch input in mind.