Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (NewbieZorro, Grant, TipmyPip, AndrewAMD), 12,885 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
double click? #251009
02/11/09 08:17
02/11/09 08:17
Joined: Nov 2008
Posts: 42
Philippines
gagamBRYAN Offline OP
Newbie
gagamBRYAN  Offline OP
Newbie

Joined: Nov 2008
Posts: 42
Philippines
what is the key_mapping for double click?. I already refer to the manual but see nothing.. is there any key mapping for this?

tnx.


Secrets are stolen from deep inside..
Re: double click? [Re: gagamBRYAN] #251016
02/11/09 08:42
02/11/09 08:42
Joined: May 2008
Posts: 301
Oxy Offline
Senior Member
Oxy  Offline
Senior Member

Joined: May 2008
Posts: 301
No, you have to write that yourself with a script, basing on the
normal clicks.

Re: double click? [Re: Oxy] #251027
02/11/09 09:30
02/11/09 09:30
Joined: Nov 2008
Posts: 42
Philippines
gagamBRYAN Offline OP
Newbie
gagamBRYAN  Offline OP
Newbie

Joined: Nov 2008
Posts: 42
Philippines
can you help me do that?


Secrets are stolen from deep inside..
Re: double click? [Re: gagamBRYAN] #251041
02/11/09 11:03
02/11/09 11:03
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
hey, something like...
Code:
int double_click = 16; //allow approx 1/2 second for double click

function double_left_click(){
  ...
}

function single_left_click(){
  ...
}

function mouse_left_click(){
  while(mouse_left){ wait(1); }
  int i;
  for(i=0; i < double_click; i++){ //will check number of frames possible to be able to allow double click
    if(mouse_left){ //if mouse clicked again perform double_left_click action
      double_left_click();
      return;
    }
  }
  single_left_click(); //if mouse not clicked within double_click time, perform single_left_click action
}

void main(){
  on_mouse_left = mouse_left_click;
  ...
}


hope this helps

Re: double click? [Re: MrGuest] #251043
02/11/09 11:19
02/11/09 11:19
Joined: May 2008
Posts: 301
Oxy Offline
Senior Member
Oxy  Offline
Senior Member

Joined: May 2008
Posts: 301
you are missing a wait command in the loop
the wait command should also have a fixed time,
to adapt for a difference in the framerate.

Last edited by Oxy; 02/11/09 11:21.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1