Page 1 of 1
How can i put double click in Mouse button down?
Posted:
Wed Dec 19, 2007 9:45 pm
by Sondise
How can i put double click in Mouse button down?
Re: How can i put double click in Mouse button down?
Posted:
Thu Dec 20, 2007 4:51 am
by Troodon
Well you can make one variable clicknum and when you press the mouse button
clicknum += 1;
if (clicknum > 2)
{
clicknum = 0;
}
And perhaps you want to control the max time limit with a variable which effect is:
clicknum = 0;
Re: How can i put double click in Mouse button down?
Posted:
Thu Dec 20, 2007 1:21 pm
by Sondise
And then I put what I want to do?
Re: How can i put double click in Mouse button down?
Posted:
Thu Dec 20, 2007 1:47 pm
by Troodon
Then you check in mouse button down:
if(clicknum == 2) //(simulated double-click)
{
//put here what you want to happen;
}
Re: How can i put double click in Mouse button down?
Posted:
Thu Dec 20, 2007 4:05 pm
by Sondise
Thanks, with these codes, i got to put a little secret in my game
.
Re: How can i put double click in Mouse button down?
Posted:
Thu Dec 20, 2007 5:39 pm
by Troodon
Cool.