Microsoft, and I also use the input. Touch module.

Source: Internet
Author: User

The input. Touch module impressed me a lot during xna4 CTP.

I have completely abandoned the handling of keyboard and mouse events and put them into touch's arms.

Because I simulate the mouse into a touch point, and directly touch the screen, if the touch event does not respond, it will be converted into a mouse event, and then switched back to the simulated touch point.

So I have never found that xna4 beta actually castrated input. Touch.

This is an unacceptable cruel fact,

I immediately removed the DLL of input. Touch And xNa. framework from the HP tx2z that has not been reinstalled, decompiled, modified, tested, and struggled for a long time.

Finally, input. Touch is back.

The first shameful use of decompilation to analyze what actually happened

After you understand it, you can use a knife, a knife, or a knife.

Combine some input. Touch modules of framework and CTP xna4 into a project

There is a little more to use, because the game module must be a little tricky, and only one line of initialization can be solved, so I didn't touch the game Module

The original input. Touch module is not required during use, so we can just bring our module.

The namespace remains unchanged, so the previous Code does not need to be modified.

It is worth mentioning that I have also modified this function to return the actual number of multi-touch operations. Originally, 4 is fixed.

This is the only extra line:

Touchpanel. Fig = This. Window. Handle;

The original game module must be automatically initialized. Now let's add a line without engaging in the game module. How happy it is.

I am very happy to solve the problem properly.

The SVN address of this cross-track project is attached. At this point, I still have no reason for Microsoft to caster this function. Isn't there more and more computers with multiple touch screens? Why do we need CTP? Beta has been castrated, and we hope this function will not be restored in the official version? What is the problem with me tonight.

Https://crazylights.googlecode.com/svn/CLGE_XNA/test

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.