2
* Copyright (C) 2001 by Holger Rapp
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25
* This class represents the cursor AS AN IMAGE
26
* so, this knows how to display a cursor on the graphics
27
* device. But it can't get the current cordinates
31
* DEPENDS: Graph::draw_bob function
32
* DEPENDS: Graph::Pic class
36
/** Cursor::Cursor(void)
38
* default constructor. Simple inits
43
Cursor::Cursor(void) {
48
/** Cursor::~Cursor(void)
55
Cursor::~Cursor(void) {
61
/** void Cursor::show_cursor(const bool b)
63
* This toggles, if the cursor should be visible or not
65
* Args; b true if it should be visible, false otherwise
68
void Cursor::show_cursor(const bool b) {
72
/** void Cursor::set_pic(Pic* p)
74
* set a new cursor picture.
79
void Cursor::set_pic(Pic* p) {
89
/** void Cursor::draw(const unsigned int x, const unsigned int y)
91
* Draws the current picture at the given location on the screen
93
* Args: x x pos of cursor
97
void Cursor::draw(const unsigned int x, const unsigned int y) {
99
Graph::draw_pic(pic, x, y, 0,0, pic->get_w(), pic->get_h());