XNA 的 UI 库
我正在开发一个小型且简单的 XNA 游戏,我注意到我花费了太多时间来实现基本 UI 功能,例如菜单、(丰富)文本渲染(包括换行)和基本 UI 布局(例如元素对齐)。
这是一个相当常见的问题,我想知道是否有人知道有一个库可以处理这些事情。 我知道 Windows 程序员可以使用一些很好的换肤选项(我想到了 Crazy Eddie 的 GUI),但由于我的目标是 Xbox 360,所以我想找到一个纯粹的托管解决方案。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
xWinForms 无疑是 XNA 最完整且维护最活跃的 GUI 系统。 XNA 窗口系统 (WSX) 过去取得了一些良好的进展(我已经研究了一段时间),并且仍然是一个不错的系统,尽管它已经一年多没有维护了。 最好的选择肯定是使用 xWinForms,至少在 WPF 互操作性出现(WPF/XNA 的下一个版本?)并使所有其他选项实际上变得过时。
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.
有 XNA Simple Gui 和 xWinForms。 它们提供了一些基本的 GUI 元素。 但还没有看到任何菜单组件。
There's XNA Simple Gui and xWinForms. They provide some basic GUI elements. Haven't seen any menu components, though.
查看鱿鱼:
http://www.ionstar.org/
这是一个非常干净、快速且独立于引擎的 UI 系统。 我已经广泛使用它并且非常喜欢使用它。 下载内容包括 XNA 3.1、Truevision3D 和 SlimDX 的示例代码。
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.
我将推荐 Nuclex Framework 的 GUI 库。 Nuclex 很棒、活跃且经过充分测试。 它适用于 Windows 和 Xbox 360。它的设计也很棒。
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.
这里列出的大多数项目现在都已经过时了。
XNA 论坛上此问题的官方帖子位于 http://xboxforums.create .msdn.com/forums/t/15274.aspx [链接已更新]
ZMan 多年来一直保持最新状态。
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.
查看游戏状态管理示例了解游戏菜单示例。
注意:上次我检查过,它在 XNA 3.0 中不能完全发挥作用。
Check out the Gamestate Management Example for a game menu example.
NOTE: Last I checked, it wasn't fully functional with XNA 3.0.
请参阅 FuchsGUI,它是一个轻量级 GUI 库
http://ghoshehsoft .wordpress.com/2011/02/11/xna-fuchsgui-part-i/
see FuchsGUI it's a light-weight GUI library
http://ghoshehsoft.wordpress.com/2011/02/11/xna-fuchsgui-part-i/
我曾经在我的一个项目中使用过这个 Neoforce Controls 库。
皮肤可以更换,默认Modern & 您可能会对类似太空的 UI 皮肤感兴趣。
请注意,该库被声明不会继续开发。 不管怎样,你可能会在那里找到一些有用的东西。
注:截至今年 6 月,已移至 GitHub 并恢复开发:
https://github.com/NeoforceControls/XNA
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
将“核冬天”添加到此列表中: https://bitbucket.org/sparklinlabs/nuclearwinter/
这是一个时尚的看起来像 GUI,并且在构建时考虑了触摸输入。
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.