b0ba814625
- 在 CMakeLists.txt 中添加新的源文件和依赖项以支持 UI 组件 - 新增 ui.c、ui_helpers.c、ui_events.h、ui.h、screens/ui_Screen1.c 和相关头文件,构建用户界面 - 更新 main.c 以初始化 UI 组件并调整 LVGL 任务栈大小 - 引入新的屏幕和控件,提升用户交互体验 - 添加 project.info 文件以记录项目元数据
42 lines
1.1 KiB
C
42 lines
1.1 KiB
C
// This file was generated by SquareLine Studio
|
|
// SquareLine Studio version: SquareLine Studio 1.6.1
|
|
// LVGL version: 9.2.2
|
|
// Project name: HeavenlyHeroStar
|
|
|
|
#include "ui.h"
|
|
#include "ui_helpers.h"
|
|
|
|
///////////////////// VARIABLES ////////////////////
|
|
|
|
// EVENTS
|
|
lv_obj_t * ui____initial_actions0;
|
|
|
|
// IMAGES AND IMAGE SETS
|
|
|
|
///////////////////// TEST LVGL SETTINGS ////////////////////
|
|
#if LV_COLOR_DEPTH != 16
|
|
#error "LV_COLOR_DEPTH should be 16bit to match SquareLine Studio's settings"
|
|
#endif
|
|
|
|
///////////////////// ANIMATIONS ////////////////////
|
|
|
|
///////////////////// FUNCTIONS ////////////////////
|
|
|
|
///////////////////// SCREENS ////////////////////
|
|
|
|
void ui_init(void)
|
|
{
|
|
lv_disp_t * dispp = lv_display_get_default();
|
|
lv_theme_t * theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),
|
|
false, LV_FONT_DEFAULT);
|
|
lv_disp_set_theme(dispp, theme);
|
|
ui_Screen1_screen_init();
|
|
ui____initial_actions0 = lv_obj_create(NULL);
|
|
lv_disp_load_scr(ui_Screen1);
|
|
}
|
|
|
|
void ui_destroy(void)
|
|
{
|
|
ui_Screen1_screen_destroy();
|
|
}
|