Announcement

Collapse
No announcement yet.

Long Press Event?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Also you could try something like this:
    Create a new bool variable and call it Interrupted .
    - On left click pressed event Set Interrupted to false -> retriggerable delay (2 sec) -> and create branch with Interrupted -> on false -- do stuff
    - On released left click Set Interrupted to true.

    Leave a comment:


  • replied
    How about a 2 seconds timer that starts when the left-click is pressed. When time elapses simply execute the event and bring up a context menu in this case.
    When left-click is released stop and clear the timer so if it is held for less than 2 seconds nothing will happen.

    EDIT. Always late ;D

    Leave a comment:


  • replied
    On Press -> start timer.
    If timer >= 2 -> do stuff.
    On Release -> stop timer.

    Leave a comment:


  • started a topic Long Press Event?

    Long Press Event?

    How can you detect and run an event on the long press of a button?

    For example, holding the left click button for 2 seconds to bring up a context menu or something...

    Any ideas?
Working...
X