Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Discussion: Detecting a Double Click

Jiminy Roo
Registered User
Join date: 25 Dec 2004
Posts: 42
01-05-2007 13:45
Hi There.
This allows you to get double clicks from a user. makes interfaces a bit easier to create! warning.. in laggy areas this may not be too good to use.

Enjoy!

CODE

integer poke = FALSE;
default
{
touch_start(integer x)
{
if(poke){
llSetTimerEvent(0);
poke = FALSE;
//double clicked
}
else{
poke = TRUE;
llSetTimerEvent(0.5);//change this depending on how fast you give them to click again
}
}
timer()
{
llSetTimerEvent(0);
poke = FALSE;
//single clicked
}
}

Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Original Thread
01-06-2007 09:32
/15/3e/158763/1.html
_____________________
i've got nothing. ;)