Input on Android Phone (Touch vs USB-Mouse)

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
~kai~
Prole
Posts: 1
Joined: Mon Dec 11, 2017 11:05 am

Input on Android Phone (Touch vs USB-Mouse)

Post 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
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

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

Post 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.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

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

Post by zorg »

Also, that's a callback, meaning you only define that function, not call it yourself.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 138 guests