Jump to content


Photo

Double Click Function


  • Please log in to reply
4 replies to this topic

#1 Joe H

Joe H

    GMC Member

  • GMC Member
  • 352 posts
  • Version:Unknown

Posted 04 August 2012 - 02:27 AM

Pretty simple. I need to add a double click function to my game. I have not done this yet so I'm just looking for a few hints and maybe tips. Should I use the get_timer() function and see if the second click occurs within a short period of time. Will this work on all devices? Should I just use an alarm. Set it on the first click to a small number and check for that alarm > 0 with the "second" click.

Thanks in advance.
  • 0

#2 benetonmovie

benetonmovie

    GMC Member

  • GMC Member
  • 1368 posts
  • Version:GM:Studio

Posted 05 August 2012 - 02:37 PM

get_timer() works on all devices and is more precise than alarms so I would use that.
  • 0

#3 Joe H

Joe H

    GMC Member

  • GMC Member
  • 352 posts
  • Version:Unknown

Posted 06 August 2012 - 12:17 AM

get_timer() works on all devices and is more precise than alarms so I would use that.



Thanks benetonmovie, I appreciate the reply. I will probably go with that.
  • 0

#4 2Dcube

2Dcube

    Programming sucks

  • GMC Member
  • 704 posts
  • Version:GM:Studio

Posted 07 August 2012 - 12:30 AM

On iOS and Android double tapping the screen results in registering a right click (unless it's changed in recent versions).

If so, you can disable this with the code device_mouse_dbclick_enable(false)
  • 0

#5 Joe H

Joe H

    GMC Member

  • GMC Member
  • 352 posts
  • Version:Unknown

Posted 09 August 2012 - 05:28 PM

On iOS and Android double tapping the screen results in registering a right click (unless it's changed in recent versions).

If so, you can disable this with the code device_mouse_dbclick_enable(false)



Interesting. Is there a double click feature that works on windows/mac ?? It seems pointless to disable the double-tap function only to reimplement it manually. However, if there is no double click function for win/mac then this would be the only course.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users