使用HTML / CSS在XNA UI? [英] Using HTML/CSS for UI in XNA?

查看:151
本文介绍了使用HTML / CSS在XNA UI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使用HTML / CSS做一个XNA游戏的用户界面?我需要编程能够更新HTML,以及处理事件。

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.

还是有另一种框架,我应该使用?这个线程看起来很有希望: http://stackoverflow.com/questions/909671/ui-library-for-xna

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

此外,无论我用有在Xbox 360上运行。

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

推荐答案

在一些其他SO线程提到的库都基本上你将需要采取(至少在UI渲染)的方向。有服用HTML / CSS和使用XNA库使得它没有内置的方式。我的意思是,这不是说别人不能做,而是因为有像有在GDI +绘制的东西没有简单的方法将是不实际的。

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+.

大多数XNA文本呈现基于字形,这意味着在一个给定的字体每个字符变成然后可以被渲染到一些三维几何形状的纹理

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

这篇关于使用HTML / CSS在XNA UI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆