CCursorHandler.h 738 B

12345678910111213141516171819202122232425262728
  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. class CCursorHandler //handles cursor
  9. {
  10. public:
  11. int mode, number;
  12. SDL_Surface * help;
  13. bool Show;
  14. std::vector<CDefHandler*> cursors;
  15. int xpos, ypos; //position of cursor
  16. void initCursor(); //inits cursorHandler
  17. void cursorMove(int x, int y); //change cursor's positions to (x, y)
  18. 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)
  19. void draw1();
  20. void draw2();
  21. void hide(){Show=0;};
  22. void show(){Show=1;};
  23. };
  24. #endif //CCURSORHANDLER_H