Post Reply 
MOUSE returns Invalid Input
12-14-2013, 10:29 PM
Post: #5
RE: MOUSE returns Invalid Input
(12-14-2013 08:51 PM)Eddie W. Shore Wrote:  No such luck.

Maybe I'm misunderstanding what you're trying to do, I thought your goal was to do something similar to what the code below does:

Code:
EXPORT FOURSQUARE()
BEGIN
LOCAL mx, my, L0;
mx=-1; my:=-1;

RECT();
RECT_P(0,0,320,200);
RECT_P(0,201,320,240,0);
TEXTOUT_P("EXIT",147,214,3,RGB(255,255,255));

REPEAT

L0:=WAIT(-1);

IF SIZE(L0)>1 THEN
mx:=L0(2);
my:=L0(3);

CASE
 IF mx<160 THEN
  CASE
   IF my<100 THEN RECT_P(0,0,320,200,RGB(255,0,0)); END;
   IF my<201 THEN RECT_P(0,0,320,200,RGB(255,255,0)); END;
  END;
 END;
 IF mx>159 THEN
  CASE
   IF my<100 THEN RECT_P(0,0,320,200,RGB(0,0,255)); END;
   IF my<201 THEN RECT_P(0,0,320,200,RGB(0,255,0)); END;
  END;
 END;
END;

END;

UNTIL my>200; 
RETURN "DONE";
END;

Jacob
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: MOUSE returns Invalid Input - Jacob Wall - 12-14-2013 10:29 PM
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)