Button.h 348 B

1234567891011121314151617181920
  1. #pragma once
  2. #include "Text.h"
  3. class Button : public Text
  4. {
  5. private:
  6. float width, height;
  7. Vec3f background;
  8. Vec2f planePosition;
  9. public:
  10. Button(const std::string &text, Vec2f position, float width, float height);
  11. ~Button();
  12. void draw();
  13. void update(int x, int y);
  14. void setForeground(Vec3f color);
  15. void setBackground(Vec3f color);
  16. };