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