Rectangle.hh 675 B

123456789101112131415161718192021222324252627
  1. #ifndef RECTANGLE_HH
  2. #define RECTANGLE_HH
  3. #include "still2d.hh"
  4. #include <iostream>
  5. class Rectangle : public still2d{
  6. private:
  7. //std::shared_ptr<sf::RectangleShape> shape;//(sf::Vector2f(120, 50));
  8. public:
  9. //Rectangle(){}
  10. Rectangle(float posx=0,float posy=0,
  11. int width=20,int height=20);
  12. Rectangle(const sf::Texture& texture,
  13. float posx=0,float posy=0,
  14. int width=20,int height=20,
  15. int textwidth=20,int textheight=20,
  16. int textx=0,int texty=0);
  17. ~Rectangle();
  18. float x()override ;
  19. float y()override ;
  20. float limLeft()override ;
  21. float limRight()override ;
  22. float limUp()override ;
  23. float limDown()override ;
  24. };
  25. #endif // RECTANGLE_HH