Touch Screen - How to detect 'only' the mouse

BlitzMax Forums/BlitzMax Programming/Touch Screen - How to detect 'only' the mouse

Pingus(Posted 2014) [#1]
I'm trying to make my latest game (a match-3) working on a touchscreen PC (an Asus T100 transformer btw).
But the way the touchscreen emulate the mouse is not perfect as it requires a kind of small 'drag' on the screen to send a mousedown event.
What I want is to detect that the screen is touched, then released to emulate a click (mouse down, then release).

A poor trick is to check Pollevent() and EventX, EventY, this gives an event when the screen is touched, and coordinates that are reset just after the screen was touched.

Unfortunatly it gives also the same event if the mouse is moved and in the end it messes things with my stadard mouse code. Of course I do not want the user to have to choose between two device modes, that would be really user's unfriendly ;/

Would someone have a hint that would allow to detect that the mouse is used and only the mouse ?

I'm sure that this issue will become more current as touchscreen PC will democratize...


col(Posted 2014) [#2]
Hiya,

There'a a touchscreen module available in the german forum here

It may be of some help?


Pingus(Posted 2014) [#3]
Oh ? I never realized there was a german forum ?!

I'm not really at ease with understanding german but modules are documented in english.

Exactly what I needed, some nice working samples, well documented code... Thousand of thanks, Dave for the link and Lobby for the module ! I have now a good basis to enjoy my match3 on a tablet :-)