Button.h 374 B

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