GUI: Icons and IconsAnimation refactoring. Switch assets to new Icon Api (#566)

* GUI: Icons and IconsAnimation refactoring. Switch assets to new Icon API.
* Gui: icon and animation draw now do not accept null pointer
* Format Sources
* Fix no debug build
* Furi: stricter checks in memmgr
This commit is contained in:
あく
2021-07-07 11:57:49 +03:00
committed by GitHub
parent 607e873404
commit a7283280ef
82 changed files with 1093 additions and 1053 deletions

View File

@@ -17,7 +17,7 @@ void DialogExVM::clean() {
set_context(NULL);
set_header(NULL, 0, 0, AlignLeft, AlignBottom);
set_text(NULL, 0, 0, AlignLeft, AlignBottom);
set_icon(0, 0, I_Empty_1x1);
set_icon(0, 0, NULL);
set_left_button_text(NULL);
set_center_button_text(NULL);
set_right_button_text(NULL);
@@ -44,8 +44,8 @@ void DialogExVM::set_text(const char* text, uint8_t x, uint8_t y, Align horizont
dialog_ex_set_text(dialog_ex, text, x, y, horizontal, vertical);
}
void DialogExVM::set_icon(uint8_t x, uint8_t y, IconName name) {
dialog_ex_set_icon(dialog_ex, x, y, name);
void DialogExVM::set_icon(uint8_t x, uint8_t y, const Icon* icon) {
dialog_ex_set_icon(dialog_ex, x, y, icon);
}
void DialogExVM::set_left_button_text(const char* text) {

View File

@@ -45,7 +45,7 @@ public:
* @param x, y - icon position
* @param name - icon to be shown
*/
void set_icon(uint8_t x, uint8_t y, IconName name);
void set_icon(uint8_t x, uint8_t y, const Icon* icon);
/**
* Set left button text

View File

@@ -16,7 +16,7 @@ void PopupVM::clean() {
set_context(NULL);
set_header(NULL, 0, 0, AlignLeft, AlignBottom);
set_text(NULL, 0, 0, AlignLeft, AlignBottom);
set_icon(0, 0, I_Empty_1x1);
set_icon(0, 0, NULL);
disable_timeout();
set_timeout(1000);
}
@@ -37,8 +37,8 @@ void PopupVM::set_text(const char* text, uint8_t x, uint8_t y, Align horizontal,
popup_set_text(popup, text, x, y, horizontal, vertical);
}
void PopupVM::set_icon(int8_t x, int8_t y, IconName name) {
popup_set_icon(popup, x, y, name);
void PopupVM::set_icon(int8_t x, int8_t y, const Icon* icon) {
popup_set_icon(popup, x, y, icon);
}
void PopupVM::set_timeout(uint32_t timeout_in_ms) {

View File

@@ -45,7 +45,7 @@ public:
* @param x, y - icon position
* @param name - icon to be shown
*/
void set_icon(int8_t x, int8_t y, IconName name);
void set_icon(int8_t x, int8_t y, const Icon* icon);
/**
* Set popup timeout