AdvancedButton

Author: Bérenger

Description
Display a a button the way you're used to, but it returns SimpleClick, DoubleClick, Drag, Drop or None, depending on the delays you set in the constructor.

Usage
First, initialiaze an AdvancedButton object. Then in OnGUI, draw and get the result. Let's take a look at the constructor :

delayMin and delayMax control the double click. It must occurs at least delayMin seconds after the first click and before delayMax seconds after.

delayDrag is the delay before the button starts returning Drag. As soon as you leave the rect once you've clicked, this gets restarted.

Here is an example :