TouchPanel.IsGestureAvailable() is always false
本文关键字:always false is IsGestureAvailable TouchPanel | 更新日期: 2023-09-27 18:19:00
代码如下调试器进入handinput区域,但从不清除触摸面板。即使我们轻触屏幕,手势也是可用的谢谢你的帮助:)
#region Handle Input
public override void HandleInput(InputState input)
{
Debug.WriteLine("hey stackoverflow'n");
if (TouchPanel.IsGestureAvailable)
{
Debug.WriteLine("check presence'n");
// read the next gesture
var gesture = TouchPanel.ReadGesture();
if (gesture.GestureType == GestureType.Tap | gesture.GestureType == GestureType.Flick | gesture.GestureType == GestureType.Hold)
{
// code sample
}
}
base.HandleInput(input);
}
#endregion
请帮忙做这件事已经两天了!!!!!
我想你忘记初始化你想要处理的手势了。
TouchPanel.EnabledGestures = gestureType;