2007-08-21 16:48:18 +03:00
# ifndef CCURSORHANDLER_H
# define CCURSORHANDLER_H
2008-08-01 21:13:33 +03:00
# include "global.h"
# include <vector>
2007-08-21 16:48:18 +03:00
struct SDL_Thread ;
2008-04-20 18:56:03 +03:00
class CDefHandler ;
2007-08-21 16:48:18 +03:00
struct SDL_Surface ;
class CCursorHandler //handles cursor
{
public :
int mode , number ;
2008-08-01 21:13:33 +03:00
SDL_Surface * help ;
2008-08-07 03:38:44 +03:00
bool Show ;
2007-08-21 16:48:18 +03:00
2008-08-01 21:13:33 +03:00
std : : vector < CDefHandler * > cursors ;
int xpos , ypos ; //position of cursor
2007-08-21 16:48:18 +03:00
void initCursor ( ) ; //inits cursorHandler
2008-09-25 17:09:31 +03:00
void cursorMove ( const int & x , const int & y ) ; //change cursor's positions to (x, y)
void changeGraphic ( const int & type , const 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 21:13:33 +03:00
void draw1 ( ) ;
void draw2 ( ) ;
2008-08-07 03:38:44 +03:00
void hide ( ) { Show = 0 ; } ;
void show ( ) { Show = 1 ; } ;
2007-08-21 16:48:18 +03:00
} ;
2008-08-02 18:08:03 +03:00
# endif //CCURSORHANDLER_H