add finalize launch screen design
This commit is contained in:
@@ -268,14 +268,14 @@
|
|||||||
*-----------*/
|
*-----------*/
|
||||||
|
|
||||||
/*1: Show CPU usage and FPS count*/
|
/*1: Show CPU usage and FPS count*/
|
||||||
#define LV_USE_PERF_MONITOR 1
|
#define LV_USE_PERF_MONITOR 0
|
||||||
#if LV_USE_PERF_MONITOR
|
#if LV_USE_PERF_MONITOR
|
||||||
#define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
|
#define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*1: Show the used memory and the memory fragmentation
|
/*1: Show the used memory and the memory fragmentation
|
||||||
* Requires LV_MEM_CUSTOM = 0*/
|
* Requires LV_MEM_CUSTOM = 0*/
|
||||||
#define LV_USE_MEM_MONITOR 1
|
#define LV_USE_MEM_MONITOR 0
|
||||||
#if LV_USE_MEM_MONITOR
|
#if LV_USE_MEM_MONITOR
|
||||||
#define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
|
#define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
|
||||||
#endif
|
#endif
|
||||||
|
1006
src/assets/os_railway_icon_lvgl.c
Normal file
1006
src/assets/os_railway_icon_lvgl.c
Normal file
File diff suppressed because one or more lines are too long
@@ -2,21 +2,20 @@
|
|||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
lv_obj_t *ui_SplashScreen;
|
|
||||||
|
|
||||||
void ui_LaunchScreen_open()
|
void ui_LaunchScreen_open()
|
||||||
{
|
{
|
||||||
// Create a screen
|
auto ui_SplashScreen = lv_obj_create(NULL);
|
||||||
ui_SplashScreen = lv_obj_create(NULL);
|
|
||||||
lv_obj_clear_flag(ui_SplashScreen, LV_OBJ_FLAG_SCROLLABLE);
|
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);
|
lv_obj_set_style_bg_color(ui_SplashScreen, lv_color_make(0x78, 0x94, 0xa7), 0);
|
||||||
|
|
||||||
// Create a label
|
LV_IMG_DECLARE(os_railway_icon_lvgl);
|
||||||
lv_obj_t *label = lv_label_create(ui_SplashScreen);
|
auto *img = lv_img_create(ui_SplashScreen);
|
||||||
lv_label_set_text(label, "Hello world!");
|
lv_img_set_src(img, &os_railway_icon_lvgl);
|
||||||
|
lv_obj_align(img, LV_ALIGN_CENTER, 0, 0);
|
||||||
|
|
||||||
// Align the label to the center
|
auto *label = lv_label_create(ui_SplashScreen);
|
||||||
lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0);
|
lv_label_set_text(label, "OS-Railway");
|
||||||
|
lv_obj_align(label, LV_ALIGN_BOTTOM_MID, 0, -25);
|
||||||
|
|
||||||
lv_disp_load_scr(ui_SplashScreen);
|
lv_disp_load_scr(ui_SplashScreen);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user