2007-08-21 13:48:18 +00:00
# ifndef CCURSORHANDLER_H
# define CCURSORHANDLER_H
2008-08-01 18:13:33 +00:00
# include "global.h"
# include <vector>
2007-08-21 13:48:18 +00:00
struct SDL_Thread ;
2008-04-20 15:56:03 +00:00
class CDefHandler ;
2007-08-21 13:48:18 +00:00
struct SDL_Surface ;
class CCursorHandler //handles cursor
{
public :
int mode , number ;
2008-08-01 18:13:33 +00:00
SDL_Surface * help ;
2008-08-07 00:38:44 +00:00
bool Show ;
2007-08-21 13:48:18 +00:00
2008-08-01 18:13:33 +00:00
std : : vector < CDefHandler * > cursors ;
int xpos , ypos ; //position of cursor
2007-08-21 13:48:18 +00:00
void initCursor ( ) ; //inits cursorHandler
void cursorMove ( int x , int y ) ; //change cursor's positions to (x, y)
void changeGraphic ( int type , int no ) ; //changes cursor graphic for type type (0 - adventure, 1 - combat, 2 - default, 3 - spellbook) and frame no (not used for type 3)
2008-08-01 18:13:33 +00:00
void draw1 ( ) ;
void draw2 ( ) ;
2008-08-07 00:38:44 +00:00
void hide ( ) { Show = 0 ; } ;
void show ( ) { Show = 1 ; } ;
2007-08-21 13:48:18 +00:00
} ;
2008-08-02 15:08:03 +00:00
# endif //CCURSORHANDLER_H