Text.h 357 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include "MenuElement.h"
  3. #include "Vector.h"
  4. #include "Util.h"
  5. class Text : public MenuElement
  6. {
  7. private:
  8. std::string text;
  9. Vec3f color;
  10. protected:
  11. int textWidth;
  12. int textHeight;
  13. public:
  14. Text(const std::string &text, Vec2f position);
  15. ~Text();
  16. virtual void draw();
  17. virtual void update(int x, int y);
  18. void setColor(Vec3f color);
  19. };