Reputation: 71
I'm using Monogame to develop an universal app for Windows Store and Windows Phone.
I know that is possible to check if a TouchPanel is available and I'm looking for a method that do the same thing with a mouse.
I can't ignore the fact that a mouse is not connected because instructions like this.IsMouseVisible = true; launch exceptions on Windows Phone.
Thank you all for your reply,
Luca.
Upvotes: 3
Views: 255
Reputation: 402
You have various solutions, depends of what you want to do :
this.IsMouseVisible
. If you get a exception, you know for sure that the mouse is unavailable.#if !WINDOWS_PHONE
to prevent phones to check the mouse. I think you can consider that most of phones don't use mouse. (See MSDN documentation)Upvotes: 1