starting with launch screen

This commit is contained in:
2023-08-08 17:03:53 +02:00
parent 91c2571114
commit 8f2c7ddc4b
8 changed files with 219 additions and 12 deletions

22
src/ui/launch_screen.cpp Normal file
View File

@@ -0,0 +1,22 @@
#include "ui/launch_screen.h"
#include <lvgl.h>
lv_obj_t *ui_SplashScreen;
void ui_LaunchScreen_open()
{
// Create a screen
ui_SplashScreen = lv_obj_create(NULL);
lv_obj_clear_flag(ui_SplashScreen, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_set_style_bg_color(ui_SplashScreen, lv_color_make(0x78, 0x94, 0xa7), 0);
// Create a label
lv_obj_t *label = lv_label_create(ui_SplashScreen);
lv_label_set_text(label, "Hello world!");
// Align the label to the center
lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0);
lv_disp_load_scr(ui_SplashScreen);
}