[q-lang-cvs] q/modules/magick/examples sprite.q,1.2,1.3
Brought to you by:
agraef
From: <ag...@us...> - 2004-01-05 03:24:44
|
Update of /cvsroot/q-lang/q/modules/magick/examples In directory sc8-pr-cvs1:/tmp/cvs-serv18493 Modified Files: sprite.q Log Message: Windows usability fixes Index: sprite.q =================================================================== RCS file: /cvsroot/q-lang/q/modules/magick/examples/sprite.q,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sprite.q 23 Dec 2003 01:15:02 -0000 1.2 --- sprite.q 5 Jan 2004 03:24:41 -0000 1.3 *************** *** 6,10 **** /* To use, evaluate `sprite', click left in the GGI window to show the sprite at the current pointer position, move the pointer to move it around, click ! right to hide the sprite again, etc. Press the middle mouse button to terminate the input loop at any time. */ --- 6,10 ---- /* To use, evaluate `sprite', click left in the GGI window to show the sprite at the current pointer position, move the pointer to move it around, click ! left again to hide the sprite, etc. Press the right mouse button to terminate the input loop at any time. */ *************** *** 82,90 **** loop STATE POS = process STATE POS (ggi_read VIS GGI_EM_ALL); ! // exit when middle button pressed process STATE _ (ggi_event TYPE _ _ _ _ PARAM) = cleanup STATE if (TYPE = GGI_EV_PTRBUTTONPRESS) and then ! (PARAM = 3); // clean up at exit --- 82,90 ---- loop STATE POS = process STATE POS (ggi_read VIS GGI_EM_ALL); ! // exit when right button pressed process STATE _ (ggi_event TYPE _ _ _ _ PARAM) = cleanup STATE if (TYPE = GGI_EV_PTRBUTTONPRESS) and then ! (PARAM = 2); // clean up at exit *************** *** 95,99 **** def W2 = W div 2, H2 = H div 2; ! // show sprite when left button pressed process () (X,Y) (ggi_event TYPE _ _ _ _ PARAM) = show_sprite (X-W2,Y-H2) || --- 95,99 ---- def W2 = W div 2, H2 = H div 2; ! // toggle sprite when left button pressed process () (X,Y) (ggi_event TYPE _ _ _ _ PARAM) = show_sprite (X-W2,Y-H2) || *************** *** 101,111 **** if (TYPE = GGI_EV_PTRBUTTONPRESS) and then (PARAM = 1); - - // hide sprite when right button pressed process (X,Y) _ (ggi_event TYPE _ _ _ _ PARAM) = hide_sprite (X-W2,Y-H2) || loop () (X,Y) if (TYPE = GGI_EV_PTRBUTTONPRESS) and then ! (PARAM = 2); // move sprite when pointer is moved --- 101,109 ---- if (TYPE = GGI_EV_PTRBUTTONPRESS) and then (PARAM = 1); process (X,Y) _ (ggi_event TYPE _ _ _ _ PARAM) = hide_sprite (X-W2,Y-H2) || loop () (X,Y) if (TYPE = GGI_EV_PTRBUTTONPRESS) and then ! (PARAM = 1); // move sprite when pointer is moved |