2022-01-05 16:10:18 +00:00
|
|
|
#include "icon_element.h"
|
2021-06-28 14:42:30 +00:00
|
|
|
|
|
|
|
IconElement::IconElement() {
|
|
|
|
}
|
|
|
|
|
|
|
|
IconElement::~IconElement() {
|
|
|
|
}
|
|
|
|
|
|
|
|
void IconElement::draw(Canvas* canvas) {
|
2021-07-07 08:57:49 +00:00
|
|
|
if(icon != NULL) {
|
|
|
|
canvas_draw_icon(canvas, x, y, icon);
|
2021-06-28 14:42:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bool IconElement::input(InputEvent* event) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2021-07-07 08:57:49 +00:00
|
|
|
void IconElement::set_icon(uint8_t _x, uint8_t _y, const Icon* _icon) {
|
2021-06-28 14:42:30 +00:00
|
|
|
lock_model();
|
2021-07-07 08:57:49 +00:00
|
|
|
icon = _icon;
|
2021-06-28 14:42:30 +00:00
|
|
|
x = _x;
|
|
|
|
y = _y;
|
|
|
|
unlock_model(true);
|
|
|
|
}
|