Using system.windows.forms with XNA

巧了我就是萌 提交于 2019-12-10 04:08:05

问题


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?

Thanks,

BenShums


回答1:


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.

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



来源:https://stackoverflow.com/questions/258048/using-system-windows-forms-with-xna

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!