2021-06-28 14:42:30 +00:00
|
|
|
#pragma once
|
|
|
|
#include "generic-element.h"
|
|
|
|
|
|
|
|
class IconElement : public GenericElement {
|
|
|
|
public:
|
|
|
|
IconElement();
|
|
|
|
~IconElement() final;
|
|
|
|
void draw(Canvas* canvas) final;
|
|
|
|
bool input(InputEvent* event) final;
|
|
|
|
|
2021-07-07 08:57:49 +00:00
|
|
|
void set_icon(uint8_t x = 0, uint8_t y = 0, const Icon* icon = NULL);
|
2021-06-28 14:42:30 +00:00
|
|
|
|
|
|
|
private:
|
2021-07-07 08:57:49 +00:00
|
|
|
const Icon* icon = NULL;
|
2021-06-28 14:42:30 +00:00
|
|
|
uint8_t x = 0;
|
|
|
|
uint8_t y = 0;
|
|
|
|
};
|