Post Reply 
MOUSE command CLICK type
01-27-2018, 04:22 PM (This post was last modified: 01-27-2018 04:24 PM by Giancarlo.)
Post: #8
RE: MOUSE command CLICK type
Hello Carlos,
Thank you very much for your help which is highly apreciated.
Using the MOUSE code above which is definitely more elegant than mine, there is never the possibility to detect mouse TYPES like 2, 3 or 4 since TYPE=0 being a mouse down, it is always triggered before turning into a DRAG, ROTATE.

Am i wrong? Are you able to detect mouse types different than 0 or 1?

For my application i would need to detect a CLICK (which is a selection of item in my application) and a DRAG (which is a LIST scroll in my application).

Thanks

Giancarlo



(01-26-2018 07:34 PM)Carlos295pz Wrote:  MOUSE returns these types:
0: Click
1: Click in menu zone
2: Drag
3: Zoom
4: Rotate
7: Problematic type

I think that would look good:
Code:
EXPORT MAUZ_2()
BEGIN
 LOCAL T,U,V;
 RECT(#E0E0FF);
 DRAWMENU("Menu "+{1,2,3,4,5,6});
 WHILE ISKEYDOWN(4)≠1 DO
 WAIT(.005); //Very recomended
 T:=MOUSE();
   IF SIZE(T(1)) THEN
     U:=T(1,5);
     CASE
       IF U=0 THEN V:="CLICK: "+T(1,1)+","+T(1,2) END
       IF U=1 THEN V:="CLICK IN MENU "+IP(6*T(1,1)/320+1)END
       IF U=2 THEN V:="DRAG" END
       IF U=3 THEN V:="ZOOM" END
       IF U=4 THEN V:="ROTATE" END
         V:="UNDEFINED"
     END;
     TEXTOUT_P(V,G0,80,25,3);
     WAIT(.5);   
     RECT_P(80,20,320,45,#E0E0FF);
   END;
 END; 
END;
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: 5 Guest(s)