Start to do some 2D tools

Source: Internet
Author: User

I started some tools and studied the combination of xNa and winform. After studying several implementations, I became familiar with winform and found that the implementation on the Internet was not good.

So I made a minimum implementation of modifying the image.

Because the xNa default Template already has a game. Run. on Windows platform, there is no doubt that there is a main loop of window message processing. So any solution to build an app to put the game into the game is put before the horse, the problem is that everyone's implementation on the internet is like this ......

That's easy. You just need to create a tool window and show it. Then, it's OK. See figure 2 above.

Then merge the graphic window, which can be directly merged in game. init.

Then, when the tool exits, if you do not need to separate it, do nothing. Exit the separation status tool.ProgramExit.

Resetdevice is required when merging State size changes. Well, it's perfect, and there is no other work.

These are two functions added to game.

This is automatically merged during game initialization.

This is added in the tool window.Code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.