[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:
its your bedtime
2021-04-13 21:06:25 +03:00
committed by GitHub
parent eae9cb3514
commit d1f523687e
70 changed files with 1093 additions and 169 deletions

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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);

View File

@@ -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

View File

@@ -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();

View File

@@ -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
*/