[FL-1090] Dolphin scenes (#402)
* dolphin scene draft wip * gui/elements multiline framed text added * zoom poc * item callbacks * engine tweaks * move scenes out of services * improve dolphin gfx selection * glitch hints * dialogue typewriter effect * app loading from scenes app, small action changes, passport app(WIP) * removed passport from main dolphin app, added statusbar * small elements position fixes * fix thread alloc, dolphin and dolphin_scene free functions, other minor issues * sleep emote improvements * Dolpin: fix memory leaks, variable namings and etc Co-authored-by: gornekich <44112859+gornekich@users.noreply.github.com> Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com> Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -250,3 +250,7 @@ void canvas_draw_glyph(Canvas* canvas, uint8_t x, uint8_t y, uint16_t ch) {
|
||||
y += canvas->offset_y;
|
||||
u8g2_DrawGlyph(&canvas->fb, x, y, ch);
|
||||
}
|
||||
|
||||
void canvas_set_bitmap_mode(Canvas* canvas, bool alpha) {
|
||||
u8g2_SetBitmapMode(&canvas->fb, alpha ? 1 : 0);
|
||||
}
|
||||
|
@@ -147,6 +147,11 @@ void canvas_draw_disc(Canvas* canvas, uint8_t x, uint8_t y, uint8_t r);
|
||||
*/
|
||||
void canvas_draw_glyph(Canvas* canvas, uint8_t x, uint8_t y, uint16_t ch);
|
||||
|
||||
/*
|
||||
* Set transparency mode
|
||||
*/
|
||||
void canvas_set_bitmap_mode(Canvas* canvas, bool alpha);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#include <furi.h>
|
||||
#include "canvas_i.h"
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
void elements_scrollbar(Canvas* canvas, uint8_t pos, uint8_t total) {
|
||||
furi_assert(canvas);
|
||||
|
@@ -68,6 +68,14 @@ void elements_multiline_text(Canvas* canvas, uint8_t x, uint8_t y, const char* t
|
||||
*/
|
||||
void elements_multiline_text_framed(Canvas* canvas, uint8_t x, uint8_t y, const char* text);
|
||||
|
||||
/*
|
||||
* Draw framed multiline text
|
||||
* @param x, y - top left corner coordinates
|
||||
* @param text - string (possible multiline)
|
||||
*/
|
||||
|
||||
void elements_multiline_text_framed(Canvas* canvas, uint8_t x, uint8_t y, const char* text);
|
||||
|
||||
/*
|
||||
* Draw slightly rounded frame
|
||||
* @param x, y - top left corner coordinates
|
||||
|
@@ -48,6 +48,11 @@ bool icon_is_animated(Icon* icon) {
|
||||
return icon->data->frame_count > 1;
|
||||
}
|
||||
|
||||
bool icon_is_animating(Icon* icon) {
|
||||
furi_assert(icon);
|
||||
return icon->tick > 0;
|
||||
}
|
||||
|
||||
void icon_start_animation(Icon* icon) {
|
||||
furi_assert(icon);
|
||||
icon->tick = osKernelGetTickCount();
|
||||
|
@@ -36,6 +36,11 @@ uint8_t icon_get_height(Icon* icon);
|
||||
*/
|
||||
bool icon_is_animated(Icon* icon);
|
||||
|
||||
/*
|
||||
* Check if icon animation is active
|
||||
*/
|
||||
bool icon_is_animating(Icon* icon);
|
||||
|
||||
/*
|
||||
* Start icon animation
|
||||
*/
|
||||
|
Reference in New Issue
Block a user