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:
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gui/icon.h>
|
||||
#include <assets_icons_i.h>
|
||||
#include <gui/icon_animation.h>
|
||||
#include <assets_icons.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -91,15 +91,25 @@ void canvas_draw_str_aligned(
|
||||
*/
|
||||
uint16_t canvas_string_width(Canvas* canvas, const char* str);
|
||||
|
||||
/*
|
||||
* Draw stateful icon at position defined by x,y.
|
||||
/** Draw animation at position defined by x,y.
|
||||
* @param canvas - canvas instance
|
||||
* @param x - x coordinate
|
||||
* @param y - y coordinate
|
||||
* @param icon_animation - data pointer to IconAnimation
|
||||
*/
|
||||
void canvas_draw_icon(Canvas* canvas, uint8_t x, uint8_t y, Icon* icon);
|
||||
void canvas_draw_icon_animation(
|
||||
Canvas* canvas,
|
||||
uint8_t x,
|
||||
uint8_t y,
|
||||
IconAnimation* icon_animation);
|
||||
|
||||
/*
|
||||
* Draw stateless icon at position defined by x,y.
|
||||
/** Draw icon at position defined by x,y.
|
||||
* @param canvas - canvas instance
|
||||
* @param x - x coordinate
|
||||
* @param y - y coordinate
|
||||
* @param icon - data pointer to Icon
|
||||
*/
|
||||
void canvas_draw_icon_name(Canvas* canvas, uint8_t x, uint8_t y, IconName name);
|
||||
void canvas_draw_icon(Canvas* canvas, uint8_t x, uint8_t y, const Icon* icon);
|
||||
|
||||
/*
|
||||
* Draw xbm icon of width, height at position defined by x,y.
|
||||
|
Reference in New Issue
Block a user