Post Reply 
MOUSE command CLICK type
01-25-2018, 09:59 PM
Post: #1
MOUSE command CLICK type
Hello,
with the following code i am able to detect the key (the ENTER key in this example) to stop the program and some gestures on the touch screen.

What is making me mad is that i can detect the DRAG, the ROTATE and STRETCH but I am not able to detect the simple CLICK!

In reality this is not true since, when i click on the menu RUN to execute the program, it automatically detect a CLICK and then, for the rest of execution i am not able to reproduce again.

At the moment i am interested in the single CLICK not the LONG one...

Code:

EXPORT MAUZ()
BEGIN
  LOCAL T,X,Y;
  DIMGROB(G1,320,220,RGB(255,120,255));
  LINE_P(G1,0,0,400,220,RGB(0,255,255));
  LINE_P(G1,0,220,400,0,RGB(0,255,255));

 WHILE ISKEYDOWN(30)≠1 DO  // STOP ON PRESS ENTER KEY
 BLIT_P(G1,0,0,320,220); 
 T:=MOUSE();
    IF SIZE(T(1)) THEN
      IF T(1,5)==1 THEN  //CLICK DOESN'T WORK
        X:=B→R(T(1,1)-T(1,3));
        Y:=B→R(T(1,2)-T(1,4)); 
        TEXTOUT_P("X= " + X,G0,10,10);
        TEXTOUT_P("Y= " + Y,G0,10,30);
        TEXTOUT_P(B→R(T(1)),G0,70,20);   
        WAIT(3);
      END;
      IF T(1,5)==2 THEN //2 DRAG WORKS
        X:=B→R(T(1,1));
        Y:=B→R(T(1,2)); 
        TEXTOUT_P("ΔX= " + X,G0,10,10);
        TEXTOUT_P("ΔY= " + Y,G0,10,30);
        TEXTOUT_P(B→R(T(1)),G0,70,20);
        WAIT(3);
      END;
      IF T(1,5)==3 THEN //3 STRETCH
        X:=B→R(T(1,1));
        Y:=B→R(T(1,2)); 
        TEXTOUT_P("X= " + X,G0,10,10);
        TEXTOUT_P("Y= " + Y,G0,10,30);
        TEXTOUT_P(B→R(T(1)),G0,70,20);
        WAIT(3);
      END;
      IF T(1,5)==4 THEN //4 ROTATE
        X:=B→R(T(1,1));
        Y:=B→R(T(1,2)); 
        TEXTOUT_P("X= " + X,G0,10,10);
        TEXTOUT_P("Y= " + Y,G0,10,30);
        TEXTOUT_P(B→R(T(1)),G0,70,20);
        WAIT(3);
      END;
      IF T(1,5)==5 THEN //5 LONG CLICK
        X:=B→R(T(1,1));
        Y:=B→R(T(1,2)); 
        TEXTOUT_P("X= " + X,G0,10,10);
        TEXTOUT_P("Y= " + Y,G0,10,30);
        TEXTOUT_P(B→R(T(1)),G0,70,20);
        WAIT(3);
      END;

    END;
 END; //FINE WHILE
END;

Any hint?

Thanks

Giancarlo
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
MOUSE command CLICK type - Giancarlo - 01-25-2018 09:59 PM
RE: MOUSE command CLICK type - Carlos295pz - 01-25-2018, 10:37 PM
RE: MOUSE command CLICK type - Giancarlo - 01-25-2018, 11:40 PM
RE: MOUSE command CLICK type - Carlos295pz - 01-26-2018, 12:30 AM
RE: MOUSE command CLICK type - Giancarlo - 01-26-2018, 06:23 PM
RE: MOUSE command CLICK type - Carlos295pz - 01-26-2018, 07:34 PM
RE: MOUSE command CLICK type - Giancarlo - 01-27-2018, 04:22 PM
RE: MOUSE command CLICK type - Carlos295pz - 01-27-2018, 04:32 PM
RE: MOUSE command CLICK type - Carlos295pz - 01-26-2018, 07:52 PM
RE: MOUSE command CLICK type - Giancarlo - 01-27-2018, 06:35 PM
RE: MOUSE command CLICK type - Giancarlo - 01-29-2018, 08:16 PM
RE: MOUSE command CLICK type - Giancarlo - 02-24-2018, 10:08 PM
RE: MOUSE command CLICK type - Tyann - 03-04-2018, 11:08 AM
RE: MOUSE command CLICK type - Carlos295pz - 03-04-2018, 11:46 AM
RE: MOUSE command CLICK type - Tyann - 03-04-2018, 05:11 PM
RE: MOUSE command CLICK type - Carlos295pz - 03-04-2018, 07:50 PM
RE: MOUSE command CLICK type - Tyann - 03-06-2018, 05:58 AM
RE: MOUSE command CLICK type - Giancarlo - 03-04-2018, 09:11 PM
RE: MOUSE command CLICK type - Carlos295pz - 03-04-2018, 10:20 PM



User(s) browsing this thread: 1 Guest(s)