Detecting mouse cursor keypress

Hello I have an XNA game that detects touch input through screen touch when the game is displayed in the emulator in Windows. Or if deployed to a phone.

Now, however If I hook my laptop up to a monitor I am no longer able to detect screen touch. Is there a way to fake out the code so that a mouse cursor location press is interpreted as a touch location press? As you can see below, currently I am using the touch location class to detect the touch location.

TouchCollection touchLocations = TouchPanel.GetState();
foreach (TouchLocation touchLocation in touchLocations)

TouchPanel.EnableMouseGestures = true;
TouchPanel.EnableMouseTouchPoint = true;

You will still require Mouse.GetState() for the other features.

Thank you!

1 Like