Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / GetButtonReleased Only if Finger Up, Not Moved

Author
Message
PaulTR
11
Years of Service
User Offline
Joined: 25th Oct 2012
Location: Fresno, CA
Posted: 9th Dec 2012 03:19
If you have an action that's triggered by GetButtonReleased, it's only triggered if the finger is removed from the screen, but not if the finger is moved from the location of the button. The problem I'm having is if a user slides their finger from one button to another rather than picking their finger up, the button doesn't trigger that it's been let go.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th Dec 2012 04:18
GetButtonRelease only triggers when the button/pressure is stopped. There is no automagic tracking of the movement of the the finger/pointer as long as the pressure stays on.

You can check for this state with GetButtonState to watch while the button is down but not released.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
easter bunny
11
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 20th Dec 2012 01:25 Edited at: 24th Dec 2012 03:23
Here is my special code that i use for menus and gui's


I'm not sure if this code works, I'm just writing it from memory, I hope you can see where I'm going with it. It isn't hard to add more buttons.



It isn't exactly what you want, the buttons won't activate when you move you finger away from them, but it's better than using virtualbuttons. I'll try to get around to uploading an example of this soon. The problem with virtualbuttons is that if you tap one, then move your finger off it, and release your finger, it will still press it.

I've attached an example of this gui system. Click the red download button at the bottom right of this post.

There are 10 types of people, those who understand binary and those who don't

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-19 07:24:51
Your offset time is: 2024-04-19 07:24:51