Double click button
You may wish to detect 'double-click' or 'triple-click' on buttons. This would be useful for showing special menus (layers) - or sending commands that need a little more security.
To detect 'multiple-clicks' we use 'Event handler - preprocessor'.
In this simple guide we usewant to control a variable called "ShowMenu". It has just two options: off / on.Then weWe create a behavior on a button - It must be double-clicked in order to set "ShowMenu" to 'on'
Create button behavior
Create Event handler
• click 'Show more' > atlocate Event handler section,section > enter name "DblPress" and click 'Create' > open theclick new Event handler to open it
- Handler type: Binary
- Set values: 'on'
Create preprocessor (from binary)
• InLocate the Event Preprocessor section > next to From binary > click '+' to create > click it to edit
• select 'Default' > click '+' to create > click 'ActDown' to selectopen itsettings
- Repeat: Delayed <-- this start thea timer
- Repeat delay: 300 <-- timer lenght in milleseconds
- Burst count: 2 <-- number of required button presses to allowproceed with output trigger
- Output trigger: ActDown
With the above, you must press button 2 times within 300ms for the action to proceed (ie. set ShowMenu to 'on')