C# XNA 的 UI 库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/909671/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
UI library for XNA
提问by drxzcl
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.
我正在开发一个小而简单的 XNA 游戏,我注意到我花了太多时间来实现基本的 UI 功能,比如菜单、(富)文本渲染,包括换行和基本的 UI 布局,比如元素的对齐。
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.
这是一个相当普遍的问题,我想知道是否有人知道处理这些事情的库。我知道有一些很好的可换肤选项可供 Windows 程序员使用(我想到了 Crazy Eddie 的 GUI),但是当我针对 Xbox 360 时,我想找到一个纯粹的托管解决方案。
采纳答案by Noldorin
xWinFormsis 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.
xWinForms很容易成为 XNA 最完整和积极维护的 GUI 系统。XNA(WSX) 的窗口系统在过去取得了一些不错的进展(我已经研究了一段时间),并且仍然是一个不错的系统,尽管它已经一年多没有维护了。最好的选择肯定是使用 xWinForms,至少在WPF 互操作性出现之前(WPF/XNA 的下一个版本?)并使所有其他选项有效地过时。
回答by dommer
There's XNA Simple Guiand xWinForms. They provide some basic GUI elements. Haven't seen any menu components, though.
有XNA Simple Gui和xWinForms。它们提供了一些基本的 GUI 元素。不过,还没有看到任何菜单组件。
回答by ahawker
Check out the Gamestate Management Examplefor a game menu example.
查看游戏状态管理示例以获取游戏菜单示例。
NOTE: Last I checked, it wasn't fully functional with XNA 3.0.
注意:上次我检查过,它在 XNA 3.0 中没有完全发挥作用。
回答by Dan
Check out SQUID: http://www.ionstar.org/
查看 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.
这是一个非常干净、快速且与引擎无关的 UI 系统。我已经广泛使用它并且非常喜欢使用它。下载包括 XNA 3.1、Truevision3D 和 SlimDX 的示例代码。
回答by scottheckel
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.
我将推荐Nuclex 框架的 GUI 库。Nuclex 很棒、很活跃并且经过全面测试。它适用于 Windows 和 Xbox 360。它的设计也很棒。
回答by MhdSyrwan
see FuchsGUI it's a light-weight GUI library
参见 FuchsGUI,这是一个轻量级的 GUI 库
http://ghoshehsoft.wordpress.com/2011/02/11/xna-fuchsgui-part-i/
http://ghoshehsoft.wordpress.com/2011/02/11/xna-fuchsgui-part-i/
回答by Bryan Legend
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]
XNA 论坛上有关此问题的官方帖子位于http://xboxforums.create.msdn.com/forums/t/15274.aspx[链接已更新]
It's been kept up to date over the years by The ZMan.
多年来,ZMan 一直在更新它。
回答by haxpor
I have once used this Neoforce Controlslibrary for one of my project. Skin can be changed, and default Modern & Space-like UI skin may interest you.
我曾经在我的一个项目中使用过这个Neoforce Controls库。皮肤可以更改,默认的 Modern & Space-like UI 皮肤可能会让您感兴趣。
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
注:截至今年 6 月,移至 GitHub 此处并恢复开发:https: //github.com/NeoforceControls/XNA
回答by Aranda
Adding Nuclear Winter to this list: https://bitbucket.org/sparklinlabs/nuclearwinter/
将核冬天添加到此列表中:https: //bitbucket.org/sparklinlabs/nuclearwinter/
It's a stylish looking GUI and was built with touch input in mind.
这是一个外观时尚的 GUI,并且在构建时考虑了触摸输入。