TouchPanel.IsGestureAvailable appears not to be getting updated when new events occur.
Create new MonoGame Win8 RT project
Create new XNA 4.0 WP7 game
Add a using:
Add to the Initialize before the base call:
TouchPanel.EnabledGestures = GestureType.Hold | GestureType.Tap | GestureType.DoubleTap | GestureType.Flick | GestureType.VerticalDrag | GestureType.HorizontalDrag;
Add to the update method before the base call:
GestureSample gesture = TouchPanel.ReadGesture();
Put breakpoint on the GestureSample line...
Create Gestures on screen...
Breakpoint not hit.
WP7 breaks as expected.
Seems TouchPanel.IsGestureAvailable is not updated
TouchCollection touches = TouchPanel.GetState();
The above appears to force an update of TouchPanel.
Thanks for the clear test case. We're aware of it and will have a bug fix soon.
The fix for this is posted... please test it.
Hi all -
I'm very much a newby to GitHub and MonoGame, but I have run into your issue 801 and have a pressing, professional need for a fix, if it exists.
It sounds like you've checked in a fix to this, but when I pulled the latest MonoGame.git, the behavior I get is sort of a 1% fix. That is to say that after I tap my screen, about 1% of the time, I get a corresponding "true" from TouchPanel.IsGestureAvailable.
I wonder if I got your fix for Issue 801 when I pulled down the latest MonoGame.git.
Could someone clarify / confirm that this issue has been fixed and that the fix is in the main MonoGame project? (And if someone is feeling especially charitable, perhaps could help me ensure I'm using GIT Bash properly to get that fix.)
- Dave F.
The latest code in the MonoGame develop3d branch should work for you.
If it does not please submit a new bug report with details on how to reproduce your issue.
I believe this was sorted out with tom's touchpanel fixes so can be closed.
Sorry, was a bit side tracked.... v3.0 beta does indeed fix the issue I reported.
Refactored TouchPanel to maintain seperate event list and state for t…
…ouch and gestures.
Fixes the following issues: