1mouse_on_screen(3)              Allegro manual              mouse_on_screen(3)
2
3
4

NAME

6       mouse_on_screen  -  Tells you whether the mouse pointer is currently on
7       screen. Allegro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       int mouse_on_screen();
14

DESCRIPTION

16       This function can be useful to prevent having two mouse pointers on the
17       screen  at the same time when running your program in windowed mode and
18       drawing the mouse pointer yourself. Other  possible  uses  include  the
19       ability  to  pause  your game when the mouse goes off of the window, or
20       only scrolling the view when the pointer is near the edge of  the  win‐
21       dow, but not while off of the window.
22
23       Example :
24
25          if (mouse_on_screen()) {draw_sprite(buffer , mouse_sprite , mouse_x , mouse_y);}
26
27
28

RETURN VALUE

30       Returns 0 if the mouse pointer is off of the screen, or non-zero other‐
31       wise.
32
33
34
35
36
37
38Allegro                          version 4.4.2              mouse_on_screen(3)
Impressum