2

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: UI library for XNA

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

Community
  • 1
  • 1
Nick Heiner
  • 119,074
  • 188
  • 476
  • 699

5 Answers5

2

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
  • 46,929
  • 26
  • 130
  • 185
0

So to understand that - there is no HTML/CSS/JavaScript support in XNA framework and unless someone port Webkit to XBox (http://gpl.ea.com/skate3.html) or Microsoft will add Silverlight support, which might come with some WebView components (see here: http://www.winrumors.com/microsoft-may-announce-silverlight-for-xbox-next-week/), we are out of luck?

BR STeN

STeN
  • 6,262
  • 22
  • 80
  • 125
0

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
  • 25,869
  • 4
  • 37
  • 58
-1

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,...)

-1

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.

Chris
  • 4,393
  • 1
  • 27
  • 33