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