在XNA中使用system.windows.forms [英] Using system.windows.forms with XNA

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

问题描述

我正在制作使用XNA的游戏.我想在游戏中添加一些内容,例如按钮,文本框,标签,工具提示文本以及system.windows.forms随附的其他内容.如何将System.windows.forms与XNA合并?我可以实施任何API或DLL来使其正常工作吗?

I am making a game that uses XNA. I would like to add things to the game such as buttons, textboxes, labels, tooltip texts, and other stuff that comes with system.windows.forms. How do I merge system.windows.forms with XNA? Are there any API's or DLL's that I could implement to get this to work?

谢谢

BenShums

推荐答案

坏消息:总之,不,这是不可能的(至少以一种直接的方式).确实可以将System.Windows.Forms控件用作游戏的画布,但不能将XNA设备用作控件的画布.

The bad news: in short, no, it is not possible (at least, in a straightforward way). While it is true that you can use a System.Windows.Forms control as a canvas for your game, you cannot use an XNA device as a canvas for your control.

好消息:已经有一些替代工具箱,可以使用XNA创建文本框,按钮和标签.

The good news: there are already some alternative toolkits that create textboxes, buttons and labels using XNA.

http://forums.xna.com/forums/p/1891 /9461.aspx

这篇关于在XNA中使用system.windows.forms的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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