Commit | Line | Data |
896b04ee |
1 | =pod |
2 | |
3 | |
4 | |
5 | =head1 NAME |
6 | |
7 | SDL::Cursor - a SDL perl extension |
8 | |
9 | =head1 SYNOPSIS |
10 | |
11 | $cursor = SDL::Cursor->new( |
12 | -data => new SDL::Surface "cursor.png", |
13 | -mask => new SDL::Surface "mask.png", |
14 | -x => 0, -y => 0 ); |
15 | $cusor->use; |
16 | |
17 | =head1 DESCRIPTION |
18 | |
19 | the SDL::Cursor module handles mouse cursors, and provide the developer to |
20 | use custom made cursors. Note that the cursors can only be in black and |
21 | white. |
22 | |
23 | =head1 METHODS |
24 | |
25 | =head2 new( -data => $surface_data, -mask => $surface_mask, x => $x, y => $y) |
26 | |
27 | Creates a new cursor. The <C>-data</C> and <C>-mask</C> parameters should be both black and white pictures. The height and width of these surfaces should be a multiple of 8. The <C>-x</C> and <C>-y</C> are the coordinates of the cursor 'hot spot'. |
28 | |
29 | =head2 warp($x, $y) |
30 | |
31 | Set the position of the cursor at the <C>$x</C>, <C>$y</C> coordinates in the application window. |
32 | |
33 | =head2 use() |
34 | |
35 | Set the cursor as the active cursor. |
36 | |
37 | =head2 get() |
38 | |
39 | When used statically <C>SDL::Cursor::get()</C>, it will return the instance of the current cursor in use. Called as a method, it will return itself. |
40 | |
41 | This method can be useful if you are dealing with several cursors. |
42 | |
43 | =head2 show($toggle) |
44 | |
45 | Set the visibility of the cursor. A false value will make the cursor |
46 | invisible in the Application window. A true value will show it back. |
47 | |
48 | =head1 AUTHOR |
49 | |
50 | David J. Goehrig |
51 | |
52 | =head1 SEE ALSO |
53 | |
54 | L<perl> L<SDL::Surface> |
55 | |
56 | =cut |