icon_element.h 373 B

1234567891011121314151617
  1. #pragma once
  2. #include "generic_element.h"
  3. class IconElement : public GenericElement {
  4. public:
  5. IconElement();
  6. ~IconElement() final;
  7. void draw(Canvas* canvas) final;
  8. bool input(InputEvent* event) final;
  9. void set_icon(uint8_t x = 0, uint8_t y = 0, const Icon* icon = NULL);
  10. private:
  11. const Icon* icon = NULL;
  12. uint8_t x = 0;
  13. uint8_t y = 0;
  14. };