CCursorHandler.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef __CCURSORHANDLER_H__
  2. #define __CCURSORHANDLER_H__
  3. #include "../global.h"
  4. #include <vector>
  5. struct SDL_Thread;
  6. class CDefHandler;
  7. struct SDL_Surface;
  8. /*
  9. * CCursorhandler.h, part of VCMI engine
  10. *
  11. * Authors: listed in file AUTHORS in main folder
  12. *
  13. * License: GNU General Public License v2.0 or later
  14. * Full text of license available in license.txt file, in main folder
  15. *
  16. */
  17. class CCursorHandler //handles cursor
  18. {
  19. public:
  20. int mode, number;
  21. SDL_Surface * help;
  22. bool Show;
  23. std::vector<CDefHandler*> cursors;
  24. int xpos, ypos; //position of cursor
  25. void initCursor(); //inits cursorHandler
  26. void cursorMove(const int & x, const int & y); //change cursor's positions to (x, y)
  27. 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)
  28. void draw1();
  29. void shiftPos( int &x, int &y );
  30. void draw2();
  31. void hide(){Show=0;};
  32. void show(){Show=1;};
  33. };
  34. #endif // __CCURSORHANDLER_H__