Button.h 383 B

12345678910111213141516171819202122
  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. bool cursorOnButton;
  10. float alfa;
  11. public:
  12. Button(const std::string &text, Vec2f position, float width, float height);
  13. ~Button();
  14. void draw();
  15. void update(int x, int y);
  16. void setForeground(Vec3f color);
  17. void setBackground(Vec3f color);
  18. };