-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Touch Support #204
Add Touch Support #204
Conversation
A whole bunch of comments as seen above, but man does this look nicer than the old Touch stuff. Tomorrow morning I'll give this a shot and provide feedback. This is a total shot in the dark, but @nickgravelyn, if you have a PC with touch support, would you be up for trying this out to see how it feels? @TheSpydog has a prepared FNA sample to make testing this easier (can you post that for us, Caleb?). |
I do not have a PC with touch support, I'm afraid. |
Well, shoot - would have been cool to bring XNA Touch support full circle like that! Another person that will need to see this is @0x0ade. Maik, see if Caleb's FNA sample works with FNADroid - functionally it seems to be the same as far as event handling goes, so I'm hoping this should be okay right off the bat. |
All right, fixed everything you mentioned and uploaded the Gesture Sample project for anyone who wants to take this for a spin. |
Well, this has certainly passed my test: https://twitter.com/flibitijibibo/status/1054522305118904320 @0x0ade, if you think you'll have time within the week to play with this let me know, otherwise I'll do one last scan and merge this in. The binaries in the sample should load up without any fuss, I hope. |
I'll have some time to test this on Android either tomorrow or on Thursday. |
This PR implements the
Microsoft.Xna.Framework.Input.Touch
namespace, as per #2.Big highlights include:
TouchPanel.GetState()
GestureDetector
class whose sole responsibility is (you guessed it!) detecting GesturesAfter testing extensively with Nick Gravelyn's XNA Gesture Sample, as well as a few other XNA sample games, I believe it works pretty well...at least on my Windows 10 machine! This will definitely need to be tested on different devices (and different touch-enabled OS's if possible).