views:

249

answers:

4

Is there any way to use HTML/CSS to do the user interface for a XNA game? I would need to programmatically be able to update the HTML, as well as handle events.

Or is there another framework I should be using? This thread looks promising: http://stackoverflow.com/questions/909671/ui-library-for-xna

Also, whatever I use has to work on the Xbox 360.

+1  A: 

Some of the libraries mentioned in that other SO thread are basically the direction you will need to take (at least for UI rendering). There is no built-in way of taking HTML/CSS and rendering it using the XNA libraries. I mean, it's not to say that someone couldn't do it, but it would not be practical because there is no simple way of drawing things like there was in GDI+.

Most XNA text rendering is glyph based, meaning that each character in a given font is turned into a texture which can then be rendered onto some 3d geometry

Joel Martinez
A: 

No support for HTML/CSS in XNA. No support for Silverlight controls in the XNA GSE 4.0 CTP, either.

The other Stack Overflow thread is likely to be your best bet.

Gabriel Isenberg
A: 

The only problem with the examples in the other thread are that they only support windows-like gui interfaces. In that case windows forms is indeed the best solution (on the site of xna creators club there is a tutorial about that), but for more complex texture-based gui it's not good enough (like having buttons with a special form,...)

Servan Wolff
A: 

You could try out Awesomium with the AwesomiumDotNet wrapper. I'm not too familiar with XNA, so I'm not sure if this will work on the Xbox though. I did get a simple test of drawing a webpage that also showed the game's total elapsed time up and running very quickly.

Rfvgyhn
Awesomium is a native library, and won't work on the Xbox 360 (for XBLIG games, anyway).
Andrew Russell