Hi,
I'm learning the using of MOUSE() command but I can´t get to understand how it really works. I wrote a little program that change the color of the screen depending the position of the pointer, but I have the following questions:
1.- How can I stop the loop until the next touch of the screen? I tried with BREAK and WAIT with no succes.
2.- What is the difference between the 0 and 1 value of MOUSE(4).
3.- Is there another alternative to wait for the touch of the screen whitout using a loop?
My goal is just to create a button to execute one action.
Sorry if my questions are too trivial.
EXPORT TOUCH()
BEGIN LOCAL xi,ni;
WHILE ni:=1 DO
ni:=B->R(MOUSE(4));
RECT();
xi:=B->R(MOUSE(0));
IF xi<160 THEN
RECT_P(0,0,160,240,#000000,#0000BB)
ELSE
RECT_P(160,0,320,240,#000000,#FF0000)
END;
END;
END;
END;