java - JustTouched works on windows? -


i'm using justtouched manipulate easly touches , released in android, cause istouched method acumulates many touches; works same in windows? meaning, 1 event when keep pressed? or need method/invoker/listener?

on desktop builds, libgdx treats mouse button presses touches. justtouched acts same, except polls mouse buttons instead of screen taps. , how on mobile can't tell finger touched screen, can't tell mouse button pressed. if need know mouse button or finger touched down, need use inputprocessor, gives far more information using gdx.input convenience methods.

if don't care mouse button pressed, need is:

if (gdx.input.justtouched()){     //... } 

based on comments under question, seem trying distinguish button touched || gdx.input.isbuttonpressed(input.buttons.left)) return true on every frame long left button held down. , if instead did && gdx.input.isbuttonpressed(input.buttons.left)), wouldn't sure it's left button pressed. (maybe you're holding down left button , pressed right button.) there no easy way distinguish button pressed unless using inputprocessor.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -