开发者

an XNA way to make a menustrip

I will preface this by I am new to XNA and I realize what I am asking fo开发者_运维技巧r doesn't exist.

However I am curious if I wanted to create something similar to a menustrip from winforms in XNA, how would I do that? Is there a best way? Or even a way?

I appreciate it, thanks!


Well, if you're only targeting windows, you can always render XNA in a winforms project or wpf app. Once you do that, you can use the built-in controls to render the menu.

If however you're looking for something that will work on xbox or windows phone, you will have to do the work of rendering and positioning the menu yourself using whatever rendering techniques you are familiar with (ie. SpriteBatch, etc.)


I found a possible solution, that will need further investigation: http://neoforce.codeplex.com/

This should give me UI control w/o having to recode everything, unless I can just add an XNA pane to my winforms app


Edit:

neoforce appears to not work well with c# 2010. I did however find this: http://create.msdn.com/en-US/education/catalog/sample/winforms_series_1 which does work, to do as Joel Martinez mentioned of drawing an XNA form inside of a winform. It is not trivial but this example code should be enough for a jump start.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜