Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorあく <alleteam@gmail.com>2021-02-03 12:52:54 +0300
committerGitHub <noreply@github.com>2021-02-03 12:52:54 +0300
commitcb4fb8e4aed62fcf7e456df2434fd414ae822910 (patch)
treeb4c70ebd15ff17d60900a3b13857fbaaf8aa9b29 /applications/gui/canvas.c
parent7481cfd6eb7fb593a04807ebd19cf6b166a7659c (diff)
FL-819 new first start screen, add multiline text (#318)
* GUI Canvas: get current font height routine * Dolphin: new start screen. GUI: new multiline element. * Dolphin: up state version to reset it for everyone * Dolphin: take maximum of idle screen height * Dolphin: frames on first start screen.
Diffstat (limited to 'applications/gui/canvas.c')
-rw-r--r--applications/gui/canvas.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/applications/gui/canvas.c b/applications/gui/canvas.c
index a8ea67eb..a2a5092f 100644
--- a/applications/gui/canvas.c
+++ b/applications/gui/canvas.c
@@ -3,14 +3,6 @@
#include <furi.h>
-struct Canvas {
- u8g2_t fb;
- uint8_t offset_x;
- uint8_t offset_y;
- uint8_t width;
- uint8_t height;
-};
-
uint8_t u8g2_gpio_and_delay_stm32(u8x8_t* u8x8, uint8_t msg, uint8_t arg_int, void* arg_ptr);
uint8_t u8x8_hw_spi_stm32(u8x8_t* u8x8, uint8_t msg, uint8_t arg_int, void* arg_ptr);
@@ -70,6 +62,11 @@ uint8_t canvas_height(Canvas* canvas) {
return canvas->height;
}
+uint8_t canvas_current_font_height(Canvas* canvas) {
+ furi_assert(canvas);
+ return u8g2_GetMaxCharHeight(&canvas->fb);
+}
+
void canvas_clear(Canvas* canvas) {
furi_assert(canvas);
u8g2_ClearBuffer(&canvas->fb);