/* * Copyright 2026 NXP * NXP Proprietary. This software is owned or controlled by NXP and may only be used strictly in * accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing, * activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to * comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license * terms, then you may not retain, install, activate or otherwise use the software. */ #include "lvgl.h" #include #include "gui_guider.h" #include "events_init.h" #include "widgets_init.h" #include "custom.h" void setup_scr_screen_set(lv_ui *ui) { //Write codes screen_set ui->screen_set = lv_obj_create(NULL); lv_obj_set_size(ui->screen_set, 502, 410); lv_obj_set_scrollbar_mode(ui->screen_set, LV_SCROLLBAR_MODE_OFF); //Write style for screen_set, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_bg_opa(ui->screen_set, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_color(ui->screen_set, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_grad_dir(ui->screen_set, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_set_btn_guide ui->screen_set_btn_guide = lv_button_create(ui->screen_set); lv_obj_set_pos(ui->screen_set_btn_guide, 90, 210); lv_obj_set_size(ui->screen_set_btn_guide, 330, 50); ui->screen_set_btn_guide_label = lv_label_create(ui->screen_set_btn_guide); lv_label_set_text(ui->screen_set_btn_guide_label, "使 用 说 明"); lv_label_set_long_mode(ui->screen_set_btn_guide_label, LV_LABEL_LONG_WRAP); lv_obj_align(ui->screen_set_btn_guide_label, LV_ALIGN_CENTER, 0, 0); lv_obj_set_style_pad_all(ui->screen_set_btn_guide, 0, LV_STATE_DEFAULT); lv_obj_set_width(ui->screen_set_btn_guide_label, LV_PCT(100)); //Write style for screen_set_btn_guide, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_bg_opa(ui->screen_set_btn_guide, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_color(ui->screen_set_btn_guide, lv_color_hex(0x242323), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_grad_dir(ui->screen_set_btn_guide, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_border_width(ui->screen_set_btn_guide, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_set_btn_guide, 15, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_set_btn_guide, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_set_btn_guide, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_set_btn_guide, &lv_font_montserrat_14, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_set_btn_guide, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_set_btn_guide, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); //Write style for screen_set_btn_guide, Part: LV_PART_MAIN, State: LV_STATE_CHECKED. lv_obj_set_style_bg_opa(ui->screen_set_btn_guide, 255, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_bg_color(ui->screen_set_btn_guide, lv_color_hex(0x242323), LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_bg_grad_dir(ui->screen_set_btn_guide, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_border_width(ui->screen_set_btn_guide, 0, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_radius(ui->screen_set_btn_guide, 15, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_shadow_width(ui->screen_set_btn_guide, 0, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_color(ui->screen_set_btn_guide, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_font(ui->screen_set_btn_guide, &lv_font_montserrat_14, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_opa(ui->screen_set_btn_guide, 255, LV_PART_MAIN|LV_STATE_CHECKED); //Write codes screen_set_btn_information ui->screen_set_btn_information = lv_button_create(ui->screen_set); lv_obj_set_pos(ui->screen_set_btn_information, 90, 140); lv_obj_set_size(ui->screen_set_btn_information, 330, 50); ui->screen_set_btn_information_label = lv_label_create(ui->screen_set_btn_information); lv_label_set_text(ui->screen_set_btn_information_label, "版 本 信 息"); lv_label_set_long_mode(ui->screen_set_btn_information_label, LV_LABEL_LONG_WRAP); lv_obj_align(ui->screen_set_btn_information_label, LV_ALIGN_CENTER, 0, 0); lv_obj_set_style_pad_all(ui->screen_set_btn_information, 0, LV_STATE_DEFAULT); lv_obj_set_width(ui->screen_set_btn_information_label, LV_PCT(100)); //Write style for screen_set_btn_information, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_bg_opa(ui->screen_set_btn_information, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_color(ui->screen_set_btn_information, lv_color_hex(0x242323), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_grad_dir(ui->screen_set_btn_information, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_border_width(ui->screen_set_btn_information, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_set_btn_information, 15, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_set_btn_information, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_set_btn_information, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_set_btn_information, &lv_font_montserrat_14, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_set_btn_information, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_set_btn_information, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); //Write style for screen_set_btn_information, Part: LV_PART_MAIN, State: LV_STATE_CHECKED. lv_obj_set_style_bg_opa(ui->screen_set_btn_information, 255, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_bg_color(ui->screen_set_btn_information, lv_color_hex(0x242323), LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_bg_grad_dir(ui->screen_set_btn_information, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_border_width(ui->screen_set_btn_information, 0, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_radius(ui->screen_set_btn_information, 15, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_shadow_width(ui->screen_set_btn_information, 0, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_color(ui->screen_set_btn_information, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_font(ui->screen_set_btn_information, &lv_font_montserrat_14, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_opa(ui->screen_set_btn_information, 255, LV_PART_MAIN|LV_STATE_CHECKED); //Write codes screen_set_btn_set_recover ui->screen_set_btn_set_recover = lv_button_create(ui->screen_set); lv_obj_set_pos(ui->screen_set_btn_set_recover, 90, 280); lv_obj_set_size(ui->screen_set_btn_set_recover, 330, 50); ui->screen_set_btn_set_recover_label = lv_label_create(ui->screen_set_btn_set_recover); lv_label_set_text(ui->screen_set_btn_set_recover_label, "恢 复 出 厂"); lv_label_set_long_mode(ui->screen_set_btn_set_recover_label, LV_LABEL_LONG_WRAP); lv_obj_align(ui->screen_set_btn_set_recover_label, LV_ALIGN_CENTER, 0, 0); lv_obj_set_style_pad_all(ui->screen_set_btn_set_recover, 0, LV_STATE_DEFAULT); lv_obj_set_width(ui->screen_set_btn_set_recover_label, LV_PCT(100)); //Write style for screen_set_btn_set_recover, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_bg_opa(ui->screen_set_btn_set_recover, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_color(ui->screen_set_btn_set_recover, lv_color_hex(0x242323), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_grad_dir(ui->screen_set_btn_set_recover, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_border_width(ui->screen_set_btn_set_recover, 2, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_border_opa(ui->screen_set_btn_set_recover, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_border_color(ui->screen_set_btn_set_recover, lv_color_hex(0xff0027), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_border_side(ui->screen_set_btn_set_recover, LV_BORDER_SIDE_FULL, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_set_btn_set_recover, 15, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_set_btn_set_recover, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_set_btn_set_recover, lv_color_hex(0xfefefe), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_set_btn_set_recover, &lv_font_montserrat_14, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_set_btn_set_recover, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_set_btn_set_recover, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); //Write style for screen_set_btn_set_recover, Part: LV_PART_MAIN, State: LV_STATE_CHECKED. lv_obj_set_style_bg_opa(ui->screen_set_btn_set_recover, 255, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_bg_color(ui->screen_set_btn_set_recover, lv_color_hex(0x242323), LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_bg_grad_dir(ui->screen_set_btn_set_recover, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_border_width(ui->screen_set_btn_set_recover, 0, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_radius(ui->screen_set_btn_set_recover, 15, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_shadow_width(ui->screen_set_btn_set_recover, 0, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_color(ui->screen_set_btn_set_recover, lv_color_hex(0xf5f5f5), LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_font(ui->screen_set_btn_set_recover, &lv_font_montserrat_14, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_opa(ui->screen_set_btn_set_recover, 255, LV_PART_MAIN|LV_STATE_CHECKED); //Write codes screen_set_slider_light ui->screen_set_slider_light = lv_slider_create(ui->screen_set); lv_obj_set_pos(ui->screen_set_slider_light, 91, 81); lv_obj_set_size(ui->screen_set_slider_light, 328, 38); lv_slider_set_range(ui->screen_set_slider_light, 0, 100); lv_slider_set_mode(ui->screen_set_slider_light, LV_SLIDER_MODE_NORMAL); lv_slider_set_value(ui->screen_set_slider_light, 20, LV_ANIM_OFF); //Write style for screen_set_slider_light, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_bg_opa(ui->screen_set_slider_light, 95, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_color(ui->screen_set_slider_light, lv_color_hex(0x4C4C4C), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_grad_dir(ui->screen_set_slider_light, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_set_slider_light, 10, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_outline_width(ui->screen_set_slider_light, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_set_slider_light, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write style for screen_set_slider_light, Part: LV_PART_INDICATOR, State: LV_STATE_DEFAULT. lv_obj_set_style_bg_opa(ui->screen_set_slider_light, 255, LV_PART_INDICATOR|LV_STATE_DEFAULT); lv_obj_set_style_bg_color(ui->screen_set_slider_light, lv_color_hex(0x4C4C4C), LV_PART_INDICATOR|LV_STATE_DEFAULT); lv_obj_set_style_bg_grad_dir(ui->screen_set_slider_light, LV_GRAD_DIR_NONE, LV_PART_INDICATOR|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_set_slider_light, 10, LV_PART_INDICATOR|LV_STATE_DEFAULT); //Write style for screen_set_slider_light, Part: LV_PART_KNOB, State: LV_STATE_DEFAULT. lv_obj_set_style_bg_opa(ui->screen_set_slider_light, 255, LV_PART_KNOB|LV_STATE_DEFAULT); lv_obj_set_style_bg_color(ui->screen_set_slider_light, lv_color_hex(0x4C4C4C), LV_PART_KNOB|LV_STATE_DEFAULT); lv_obj_set_style_bg_grad_dir(ui->screen_set_slider_light, LV_GRAD_DIR_NONE, LV_PART_KNOB|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_set_slider_light, 25, LV_PART_KNOB|LV_STATE_DEFAULT); //Write codes screen_set_btn_set_back ui->screen_set_btn_set_back = lv_button_create(ui->screen_set); lv_obj_set_pos(ui->screen_set_btn_set_back, 25, 30); lv_obj_set_size(ui->screen_set_btn_set_back, 57, 45); ui->screen_set_btn_set_back_label = lv_label_create(ui->screen_set_btn_set_back); lv_label_set_text(ui->screen_set_btn_set_back_label, ""); lv_label_set_long_mode(ui->screen_set_btn_set_back_label, LV_LABEL_LONG_WRAP); lv_obj_align(ui->screen_set_btn_set_back_label, LV_ALIGN_CENTER, 0, 0); lv_obj_set_style_pad_all(ui->screen_set_btn_set_back, 0, LV_STATE_DEFAULT); lv_obj_set_width(ui->screen_set_btn_set_back_label, LV_PCT(100)); //Write style for screen_set_btn_set_back, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_bg_opa(ui->screen_set_btn_set_back, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_color(ui->screen_set_btn_set_back, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_grad_dir(ui->screen_set_btn_set_back, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_border_width(ui->screen_set_btn_set_back, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_set_btn_set_back, 17, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_set_btn_set_back, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_set_btn_set_back, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_set_btn_set_back, &lv_font_montserrat_14, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_set_btn_set_back, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_set_btn_set_back, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); //Write style for screen_set_btn_set_back, Part: LV_PART_MAIN, State: LV_STATE_CHECKED. lv_obj_set_style_bg_opa(ui->screen_set_btn_set_back, 255, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_bg_color(ui->screen_set_btn_set_back, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_bg_grad_dir(ui->screen_set_btn_set_back, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_border_width(ui->screen_set_btn_set_back, 0, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_radius(ui->screen_set_btn_set_back, 5, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_shadow_width(ui->screen_set_btn_set_back, 0, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_color(ui->screen_set_btn_set_back, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_font(ui->screen_set_btn_set_back, &lv_font_montserrat_14, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_opa(ui->screen_set_btn_set_back, 255, LV_PART_MAIN|LV_STATE_CHECKED); //Write codes screen_set_img_Bright ui->screen_set_img_Bright = lv_image_create(ui->screen_set); lv_obj_set_pos(ui->screen_set_img_Bright, 103, 87); lv_obj_set_size(ui->screen_set_img_Bright, 25, 25); lv_obj_add_flag(ui->screen_set_img_Bright, LV_OBJ_FLAG_CLICKABLE); lv_image_set_src(ui->screen_set_img_Bright, &_Brightness_RGB888_25x25); lv_image_set_pivot(ui->screen_set_img_Bright, 50,50); lv_image_set_rotation(ui->screen_set_img_Bright, 0); //Write style for screen_set_img_Bright, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_image_recolor_opa(ui->screen_set_img_Bright, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_image_opa(ui->screen_set_img_Bright, 255, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_set_img_Info ui->screen_set_img_Info = lv_image_create(ui->screen_set); lv_obj_set_pos(ui->screen_set_img_Info, 103, 152); lv_obj_set_size(ui->screen_set_img_Info, 25, 25); lv_obj_add_flag(ui->screen_set_img_Info, LV_OBJ_FLAG_CLICKABLE); lv_image_set_src(ui->screen_set_img_Info, &_Version_Info_RGB888_25x25); lv_image_set_pivot(ui->screen_set_img_Info, 50,50); lv_image_set_rotation(ui->screen_set_img_Info, 0); //Write style for screen_set_img_Info, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_image_recolor_opa(ui->screen_set_img_Info, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_image_opa(ui->screen_set_img_Info, 255, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_set_img_user ui->screen_set_img_user = lv_image_create(ui->screen_set); lv_obj_set_pos(ui->screen_set_img_user, 103, 221); lv_obj_set_size(ui->screen_set_img_user, 25, 25); lv_obj_add_flag(ui->screen_set_img_user, LV_OBJ_FLAG_CLICKABLE); lv_image_set_src(ui->screen_set_img_user, &_User_Guide_RGB888_25x25); lv_image_set_pivot(ui->screen_set_img_user, 50,50); lv_image_set_rotation(ui->screen_set_img_user, 0); //Write style for screen_set_img_user, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_image_recolor_opa(ui->screen_set_img_user, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_image_opa(ui->screen_set_img_user, 255, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_set_img_Reset ui->screen_set_img_Reset = lv_image_create(ui->screen_set); lv_obj_set_pos(ui->screen_set_img_Reset, 103, 292); lv_obj_set_size(ui->screen_set_img_Reset, 25, 25); lv_obj_add_flag(ui->screen_set_img_Reset, LV_OBJ_FLAG_CLICKABLE); lv_image_set_src(ui->screen_set_img_Reset, &_Factory_Reset_RGB888_25x25); lv_image_set_pivot(ui->screen_set_img_Reset, 50,50); lv_image_set_rotation(ui->screen_set_img_Reset, 0); //Write style for screen_set_img_Reset, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_image_recolor_opa(ui->screen_set_img_Reset, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_image_opa(ui->screen_set_img_Reset, 255, LV_PART_MAIN|LV_STATE_DEFAULT); //The custom code of screen_set. //Update current screen layout. lv_obj_update_layout(ui->screen_set); //Init events for screen. events_init_screen_set(ui); }