Android isleftmouse()

Discuss any general programming issues here
Post Reply
User avatar
lazi
Posts: 627
Joined: Thu Feb 24, 2011 11:08 pm

Android isleftmouse()

Post by lazi »

Made something that uses IsLeftMouse() in a loop. It is working with leftmouse button holded down.
On android only the touching moment makes IsLeftMouse() -> true.
Can I somehow informed if the user still holds a finger on the touchscreen?

Just tested the eventhandler too. After the onmousedown event there is an immidiate onmouseup.
So, drag is not possible currently?
Bugala
Posts: 1180
Joined: Sun Feb 14, 2010 7:11 pm

Re: Android isleftmouse()

Post by Bugala »

I was actually thinking about almost similar couple of days ago.

For what if I want to make on android/iOS a system where user puts his finger on screen, and then moves his finger, and this movement results in scrolling around a map for example.

How does this work in coding level?

Do i for example keep checking if isleftmousedown() is true, and then check the mouse(x) and mouse(y), or is there some other system for this?


And what about if i want user to be able to use two fingers, to for example zooming. Is this possible at all?
User avatar
lazi
Posts: 627
Joined: Thu Feb 24, 2011 11:08 pm

Re: Android isleftmouse()

Post by lazi »

Bugala wrote:I was actually thinking about almost similar couple of days ago.

Do i for example keep checking if isleftmousedown() is true, and then check the mouse(x) and mouse(y), or is there some other system for this?
This is not working as I mentioned in the previous post.
And what about if i want user to be able to use two fingers, to for example zooming. Is this possible at all?
I think currently we cannot use multitouch. This is something that is not existed any of the desktop systems which Hollywood originally made for.
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Android isleftmouse()

Post by airsoftsoftwair »

Just tested the eventhandler too. After the onmousedown event there is an immidiate onmouseup.
So, drag is not possible currently?
This is actually a bug in Hollywood. OnMouseUp is always triggered right after OnMouseDown, even if the finger is still on the touch screen. I'll fix this for the next version. Thanks for reporting!

It's also planned to support gesture detection in Hollywood but at this point I'm not sure if this is possible. I already did some tests but I haven't been successful to call through the Android GestureDetector from Hollywood which is a C program (Android interface is in Java). But I hope I can somehow work around this.
Post Reply