Files
HeavenlyHeroStar/main/ui/ui.c
T
rsgltzyd 73e62c4dfd feat: 添加第二屏幕及其事件处理功能
- 在 CMakeLists.txt 中添加 ui_Screen2.c 源文件以支持新屏幕
- 新增 ui_events.c 和 ui_events.h,定义按钮点击事件处理函数
- 实现 ui_Screen2.c,构建第二屏幕的 UI 组件和事件回调
- 更新 ui.c 以初始化和加载第二屏幕
- 更新相关头文件,确保新屏幕与现有结构兼容
2026-07-01 22:02:31 +08:00

44 lines
1.2 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_Screen2_screen_init();
ui____initial_actions0 = lv_obj_create(NULL);
lv_disp_load_scr(ui_Screen2);
}
void ui_destroy(void)
{
ui_Screen1_screen_destroy();
ui_Screen2_screen_destroy();
}