NumText.hpp 436 B

123456789101112131415161718192021
  1. #pragma once
  2. #include <SFML/Graphics.hpp>
  3. using namespace sf;
  4. class NumText: public Drawable, public Transformable {
  5. public:
  6. NumText();
  7. virtual ~NumText();
  8. void setTexture(Texture* texture);
  9. void setNumber(unsigned number);
  10. void semicolon();
  11. void percent();
  12. private:
  13. Texture* _font;
  14. std::vector<Sprite> _nums;
  15. bool _semicolon;
  16. bool _percent;
  17. virtual void draw(RenderTarget& target, RenderStates states) const override;
  18. };