Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AbrahamR, 1 invisible), 858 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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 | chip programmers | 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