Post Reply 
MOUSE returns Invalid Input
12-14-2013, 10:53 PM (This post was last modified: 12-16-2013 06:44 PM by Damien.)
Post: #6
RE: MOUSE returns Invalid Input
Hi, everyone,

maybe something like that should work...


Code:

//-------------------------------------------
// MOUSE() ... 
//  
EXPORT MOUZ()
BEGIN
 LOCAL grey=#707070h;
 LOCAL s,DEP=0; 
 LOCAL x1,y1,xo1,yo1; 
 RECT_P(G0,0,0,319,219,grey);
 DRAWMENU("","","","","","QUIT");
 WHILE GETKEY() ≠ 4 DO // Esc to QUIT
  CASE
// :::::::::1 FINGER ::::::::::
   IF (MOUSE(0)≠−1 AND MOUSE(1)≠−1) AND
      (MOUSE(5)==−1 AND MOUSE(6)==−1)
   THEN 
     xo1:=B→R(MOUSE(2));
     yo1:=B→R(MOUSE(3));
     y1:=B→R(MOUSE(1));
     x1:=B→R(MOUSE(0));
    CASE
     IF 0<xo1<158 AND 0<yo1<100 THEN RECT_P(0,0,158,100,#FF0000h); END;
     IF 159<xo1<318 AND 0<yo1<100 THEN RECT_P(159,0,318,100,#FFh); END;
     IF 0<xo1<158 AND 101<yo1<200 THEN RECT_P(0,101,158,200,#FFFF00h); END;
     IF 159<xo1<318 AND 101<yo1<200 THEN RECT_P(159,101,318,200,#00FF00h); END;
    DEFAULT
    END;
// :::::::: MENU ::::::::: 
    IF y1>219 THEN 
     CASE
      IF   0<x1< 52 THEN END;
      IF  52<x1<105 THEN END;
      IF 105<x1<158 THEN END;
      IF 158<x1<211 THEN END;
      IF 211<x1<264 THEN END;
      IF 264<x1<319 AND DEP≠ 0 THEN BREAK; END;
     DEFAULT
     END; 
    END;
   END;
// :::::::: 0 FINGER :::::::::
   IF (MOUSE(0)==−1 AND MOUSE(1)==−1) AND
      (MOUSE(5)==−1 AND MOUSE(6)==−1) 
   THEN
    RECT_P(G0,0,0,319,210,grey);
    DEP:=1;  
   END; 
  END; 
 END; //While
END;


Regards,


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


Messages In This Thread
RE: MOUSE returns Invalid Input - Han - 12-14-2013, 09:16 PM
RE: MOUSE returns Invalid Input - Damien - 12-14-2013 10:53 PM
RE: MOUSE returns Invalid Input - Snorre - 12-20-2013, 04:34 PM



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