Page 1 of 1

Input on Android Phone (Touch vs USB-Mouse)

Posted: Mon Dec 11, 2017 11:22 am
by ~kai~
Hi Everyone,

is there a way to deactivate the touch-screen via LÖVE (on an android phone) completely and just get the
Input from a connected usb-mouse? - or just ignore touch input?

for the latter I tried:
https://love2d.org/wiki/love.mousepressed

- set the Boolean 'istouch' to false, but then it ignores both: my input via touch and via mouse

maybe, I guess, it's a bit more complicated?

kai

Re: Input on Android Phone (Touch vs USB-Mouse)

Posted: Mon Dec 11, 2017 1:30 pm
by Nixola
Just use mousepressed. isTouch isn't a boolean you should set; it tells you if the mousepress was originated by a touch or an actual mouseclick; thus, something like "if isTouch then return end" at the top of your mousepressed would make it ignore touches without ignorin clicks.

Re: Input on Android Phone (Touch vs USB-Mouse)

Posted: Mon Dec 11, 2017 11:17 pm
by zorg
Also, that's a callback, meaning you only define that function, not call it yourself.