Re: [AD] scare_mouse_area

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sun, Dec 19, 1999 at 05:41:57PM +0000, Shawn Hargreaves wrote:
> Vincent Penquerc'h <lyrian@xxxxxxxxxx> writes:
> > Here is a scare_mouse_area routine, which scares the mouse only if it is 
> > in the specified bounds. 
> 
> Cool.

OK, I have this one too...

-- 
Vincent Penquerc'h
Windows NT - New Trial

--- allegro/include/allegro.h.original	Sun Dec 19 10:29:17 1999
+++ allegro/include/allegro.h	Sun Dec 19 12:18:46 1999
@@ -342,6 +342,7 @@
 AL_FUNC(void, show_mouse, (struct BITMAP *bmp));
 AL_FUNC(void, scare_mouse, (void));
 AL_FUNC(void, unscare_mouse, (void));
+AL_FUNC(void, scare_mouse_area, (int x, int y, int w, int h));
 AL_FUNC(void, position_mouse, (int x, int y));
 AL_FUNC(void, position_mouse_z, (int z));
 AL_FUNC(void, set_mouse_range, (int x1, int y1, int x2, int y2));
--- allegro/allegro.txt.original	Sun Dec 19 10:26:04 1999
+++ allegro/allegro.txt	Sun Dec 19 10:28:55 1999
@@ -845,6 +845,14 @@
    Undoes the effect of a previous call to scare_mouse(), restoring the 
    original pointer state.
 
+void scare_mouse_area(int x, int y, int w, int h);
+   Helper for hiding the mouse pointer prior to a drawing operation. This 
+   one acts like scare_mouse except the mouse will be hidden only if the
+   specified rectangle overlaps with the mouse pointer. Otherwise, the mouse
+   will be frozen. In other words, when drawing to the screen, pass the outer
+   bounds of the rectangle that will be updated to this function. The previous
+   mouse state is stored for subsequent calls to unscare_mouse().
+
 extern int freeze_mouse_flag;
    If this flag is set, the mouse pointer won't be redrawn when the mouse 
    moves. This can avoid the need to hide the pointer every time you draw to 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/