CCursorHandler.h 756 B

1234567891011121314151617181920212223242526272829
  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(const int & x, const int & y); //change cursor's positions to (x, y)
  18. 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)
  19. void draw1();
  20. void draw2();
  21. void hide(){Show=0;};
  22. void show(){Show=1;};
  23. };
  24. #endif // __CCURSORHANDLER_H__