2
0

CursorHardware.h 761 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * CursorHardware.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. class IImage;
  12. struct SDL_Surface;
  13. struct SDL_Texture;
  14. struct SDL_Cursor;
  15. #include "../../lib/Point.h"
  16. #include "../render/ICursor.h"
  17. class CursorHardware : public ICursor
  18. {
  19. std::shared_ptr<IImage> cursorImage;
  20. SDL_Cursor * cursor;
  21. public:
  22. CursorHardware();
  23. ~CursorHardware();
  24. void setImage(std::shared_ptr<IImage> image, const Point & pivotOffset) override;
  25. void setCursorPosition( const Point & newPos ) override;
  26. void render() override;
  27. void update() override;
  28. void setVisible( bool on) override;
  29. };