/* * Copyright 2025 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(lv_ui *ui) { //Write codes screen ui->screen = lv_obj_create(NULL); lv_obj_set_size(ui->screen, 480, 480); lv_obj_set_scrollbar_mode(ui->screen, LV_SCROLLBAR_MODE_OFF); //Write style for screen, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_bg_opa(ui->screen, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_color(ui->screen, lv_color_hex(0x1F1E23), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_grad_dir(ui->screen, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_image_src(ui->screen, &_main_bg_RGB565A8_480x480, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_image_opa(ui->screen, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_image_recolor_opa(ui->screen, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_cont_power_on ui->screen_cont_power_on = lv_obj_create(ui->screen); lv_obj_set_pos(ui->screen_cont_power_on, 0, 0); lv_obj_set_size(ui->screen_cont_power_on, 480, 480); lv_obj_set_scrollbar_mode(ui->screen_cont_power_on, LV_SCROLLBAR_MODE_OFF); lv_obj_add_flag(ui->screen_cont_power_on, LV_OBJ_FLAG_HIDDEN); //Write style for screen_cont_power_on, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_cont_power_on, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_cont_power_on, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_cont_power_on, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_cont_power_on, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_cont_power_on, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_cont_power_on, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_cont_power_on, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_cont_power_on, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_label_6 ui->screen_label_6 = lv_label_create(ui->screen_cont_power_on); lv_obj_set_pos(ui->screen_label_6, 252, 238); lv_obj_set_size(ui->screen_label_6, 71, 22); lv_label_set_text(ui->screen_label_6, "°C"); lv_label_set_long_mode(ui->screen_label_6, LV_LABEL_LONG_WRAP); //Write style for screen_label_6, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_label_6, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_label_6, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_label_6, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_label_6, &lv_font_montserratMedium_25, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_label_6, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui->screen_label_6, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui->screen_label_6, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_label_6, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_label_6, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_label_6, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_label_6, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_label_6, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_label_6, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_label_6, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_arc_temp ui->screen_arc_temp = lv_arc_create(ui->screen_cont_power_on); lv_obj_set_pos(ui->screen_arc_temp, 67, 63); lv_obj_set_size(ui->screen_arc_temp, 360, 343); lv_arc_set_mode(ui->screen_arc_temp, LV_ARC_MODE_NORMAL); lv_arc_set_range(ui->screen_arc_temp, 0, 50); lv_arc_set_bg_angles(ui->screen_arc_temp, 150, 30); lv_arc_set_value(ui->screen_arc_temp, 23); lv_arc_set_rotation(ui->screen_arc_temp, 0); //Write style for screen_arc_temp, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_bg_opa(ui->screen_arc_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_border_width(ui->screen_arc_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_arc_width(ui->screen_arc_temp, 20, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_arc_opa(ui->screen_arc_temp, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_arc_color(ui->screen_arc_temp, lv_color_hex(0x817878), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_arc_rounded(ui->screen_arc_temp, true, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_arc_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_arc_temp, 20, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_arc_temp, 20, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_arc_temp, 20, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_arc_temp, 20, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_arc_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write style for screen_arc_temp, Part: LV_PART_INDICATOR, State: LV_STATE_DEFAULT. lv_obj_set_style_arc_width(ui->screen_arc_temp, 20, LV_PART_INDICATOR|LV_STATE_DEFAULT); lv_obj_set_style_arc_opa(ui->screen_arc_temp, 255, LV_PART_INDICATOR|LV_STATE_DEFAULT); lv_obj_set_style_arc_color(ui->screen_arc_temp, lv_color_hex(0x00d9ff), LV_PART_INDICATOR|LV_STATE_DEFAULT); lv_obj_set_style_arc_rounded(ui->screen_arc_temp, true, LV_PART_INDICATOR|LV_STATE_DEFAULT); //Write style for screen_arc_temp, Part: LV_PART_KNOB, State: LV_STATE_DEFAULT. lv_obj_set_style_bg_opa(ui->screen_arc_temp, 0, LV_PART_KNOB|LV_STATE_DEFAULT); lv_obj_set_style_pad_all(ui->screen_arc_temp, 5, LV_PART_KNOB|LV_STATE_DEFAULT); //Write codes screen_cont_1 ui->screen_cont_1 = lv_obj_create(ui->screen_cont_power_on); lv_obj_set_pos(ui->screen_cont_1, 255, 374); lv_obj_set_size(ui->screen_cont_1, 225, 75); lv_obj_set_scrollbar_mode(ui->screen_cont_1, LV_SCROLLBAR_MODE_OFF); //Write style for screen_cont_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_ib_cool ui->screen_ib_cool = lv_imagebutton_create(ui->screen_cont_1); lv_obj_set_pos(ui->screen_ib_cool, 58, 11); lv_obj_set_size(ui->screen_ib_cool, 55, 55); lv_obj_add_flag(ui->screen_ib_cool, LV_OBJ_FLAG_CHECKABLE); lv_imagebutton_set_src(ui->screen_ib_cool, LV_IMAGEBUTTON_STATE_RELEASED, &_ac_mode_cool_RGB565A8_55x55, NULL, NULL); lv_imagebutton_set_src(ui->screen_ib_cool, LV_IMAGEBUTTON_STATE_PRESSED, &_ac_mode_cool_sel_RGB565A8_55x55, NULL, NULL); lv_imagebutton_set_src(ui->screen_ib_cool, LV_IMAGEBUTTON_STATE_CHECKED_RELEASED, &_ac_mode_cool_sel_RGB565A8_55x55, NULL, NULL); ui->screen_ib_cool_label = lv_label_create(ui->screen_ib_cool); lv_label_set_text(ui->screen_ib_cool_label, ""); lv_label_set_long_mode(ui->screen_ib_cool_label, LV_LABEL_LONG_WRAP); lv_obj_align(ui->screen_ib_cool_label, LV_ALIGN_CENTER, 0, 0); lv_obj_set_style_pad_all(ui->screen_ib_cool, 0, LV_STATE_DEFAULT); //Write style for screen_ib_cool, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_text_color(ui->screen_ib_cool, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_ib_cool, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_ib_cool, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_ib_cool, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_ib_cool, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write style for screen_ib_cool, Part: LV_PART_MAIN, State: LV_STATE_PRESSED. lv_obj_set_style_image_recolor_opa(ui->screen_ib_cool, 0, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_image_opa(ui->screen_ib_cool, 255, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_text_color(ui->screen_ib_cool, lv_color_hex(0xFF33FF), LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_text_font(ui->screen_ib_cool, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_text_opa(ui->screen_ib_cool, 255, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_shadow_width(ui->screen_ib_cool, 0, LV_PART_MAIN|LV_STATE_PRESSED); //Write style for screen_ib_cool, Part: LV_PART_MAIN, State: LV_STATE_CHECKED. lv_obj_set_style_image_recolor_opa(ui->screen_ib_cool, 0, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_image_opa(ui->screen_ib_cool, 255, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_color(ui->screen_ib_cool, lv_color_hex(0xFF33FF), LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_font(ui->screen_ib_cool, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_opa(ui->screen_ib_cool, 255, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_shadow_width(ui->screen_ib_cool, 0, LV_PART_MAIN|LV_STATE_CHECKED); //Write style for screen_ib_cool, Part: LV_PART_MAIN, State: LV_IMAGEBUTTON_STATE_RELEASED. lv_obj_set_style_image_recolor_opa(ui->screen_ib_cool, 0, LV_PART_MAIN|LV_IMAGEBUTTON_STATE_RELEASED); lv_obj_set_style_image_opa(ui->screen_ib_cool, 255, LV_PART_MAIN|LV_IMAGEBUTTON_STATE_RELEASED); //Write codes screen_ib_heat ui->screen_ib_heat = lv_imagebutton_create(ui->screen_cont_1); lv_obj_set_pos(ui->screen_ib_heat, 138, 11); lv_obj_set_size(ui->screen_ib_heat, 55, 55); lv_obj_add_flag(ui->screen_ib_heat, LV_OBJ_FLAG_CHECKABLE); lv_imagebutton_set_src(ui->screen_ib_heat, LV_IMAGEBUTTON_STATE_RELEASED, &_ac_mode_heat_RGB565A8_55x55, NULL, NULL); lv_imagebutton_set_src(ui->screen_ib_heat, LV_IMAGEBUTTON_STATE_PRESSED, &_ac_mode_heat_sel_RGB565A8_55x55, NULL, NULL); lv_imagebutton_set_src(ui->screen_ib_heat, LV_IMAGEBUTTON_STATE_CHECKED_RELEASED, &_ac_mode_heat_sel_RGB565A8_55x55, NULL, NULL); ui->screen_ib_heat_label = lv_label_create(ui->screen_ib_heat); lv_label_set_text(ui->screen_ib_heat_label, ""); lv_label_set_long_mode(ui->screen_ib_heat_label, LV_LABEL_LONG_WRAP); lv_obj_align(ui->screen_ib_heat_label, LV_ALIGN_CENTER, 0, 0); lv_obj_set_style_pad_all(ui->screen_ib_heat, 0, LV_STATE_DEFAULT); //Write style for screen_ib_heat, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_text_color(ui->screen_ib_heat, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_ib_heat, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_ib_heat, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_ib_heat, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_ib_heat, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write style for screen_ib_heat, Part: LV_PART_MAIN, State: LV_STATE_PRESSED. lv_obj_set_style_image_recolor_opa(ui->screen_ib_heat, 0, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_image_opa(ui->screen_ib_heat, 255, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_text_color(ui->screen_ib_heat, lv_color_hex(0xFF33FF), LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_text_font(ui->screen_ib_heat, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_text_opa(ui->screen_ib_heat, 255, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_shadow_width(ui->screen_ib_heat, 0, LV_PART_MAIN|LV_STATE_PRESSED); //Write style for screen_ib_heat, Part: LV_PART_MAIN, State: LV_STATE_CHECKED. lv_obj_set_style_image_recolor_opa(ui->screen_ib_heat, 0, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_image_opa(ui->screen_ib_heat, 255, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_color(ui->screen_ib_heat, lv_color_hex(0xFF33FF), LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_font(ui->screen_ib_heat, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_opa(ui->screen_ib_heat, 255, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_shadow_width(ui->screen_ib_heat, 0, LV_PART_MAIN|LV_STATE_CHECKED); //Write style for screen_ib_heat, Part: LV_PART_MAIN, State: LV_IMAGEBUTTON_STATE_RELEASED. lv_obj_set_style_image_recolor_opa(ui->screen_ib_heat, 0, LV_PART_MAIN|LV_IMAGEBUTTON_STATE_RELEASED); lv_obj_set_style_image_opa(ui->screen_ib_heat, 255, LV_PART_MAIN|LV_IMAGEBUTTON_STATE_RELEASED); //Write codes screen_label_1 ui->screen_label_1 = lv_label_create(ui->screen_cont_power_on); lv_obj_set_pos(ui->screen_label_1, 147, 150); lv_obj_set_size(ui->screen_label_1, 34, 32); lv_label_set_text(ui->screen_label_1, ""); lv_label_set_long_mode(ui->screen_label_1, LV_LABEL_LONG_WRAP); //Write style for screen_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_label_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_label_1, &lv_font_iconfont_25, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_label_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_label_2 ui->screen_label_2 = lv_label_create(ui->screen_cont_power_on); lv_obj_set_pos(ui->screen_label_2, 242, 150); lv_obj_set_size(ui->screen_label_2, 34, 32); lv_label_set_text(ui->screen_label_2, ""); lv_label_set_long_mode(ui->screen_label_2, LV_LABEL_LONG_WRAP); //Write style for screen_label_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_label_2, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_label_2, &lv_font_iconfont_25, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_label_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui->screen_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui->screen_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_label_2, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_label_7 ui->screen_label_7 = lv_label_create(ui->screen_cont_power_on); lv_obj_set_pos(ui->screen_label_7, 81, 330); lv_obj_set_size(ui->screen_label_7, 71, 20); lv_label_set_text(ui->screen_label_7, "0°C"); lv_label_set_long_mode(ui->screen_label_7, LV_LABEL_LONG_WRAP); //Write style for screen_label_7, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_label_7, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_label_7, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_label_7, lv_color_hex(0x9d9191), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_label_7, &lv_font_montserratMedium_16, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_label_7, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui->screen_label_7, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui->screen_label_7, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_label_7, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_label_7, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_label_7, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_label_7, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_label_7, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_label_7, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_label_7, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_label_8 ui->screen_label_8 = lv_label_create(ui->screen_cont_power_on); lv_obj_set_pos(ui->screen_label_8, 325, 326); lv_obj_set_size(ui->screen_label_8, 71, 20); lv_label_set_text(ui->screen_label_8, "50°C"); lv_label_set_long_mode(ui->screen_label_8, LV_LABEL_LONG_WRAP); //Write style for screen_label_8, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_label_8, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_label_8, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_label_8, lv_color_hex(0x9d9191), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_label_8, &lv_font_montserratMedium_16, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_label_8, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui->screen_label_8, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui->screen_label_8, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_label_8, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_label_8, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_label_8, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_label_8, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_label_8, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_label_8, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_label_8, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_imgbtn_5 ui->screen_imgbtn_5 = lv_imagebutton_create(ui->screen_cont_power_on); lv_obj_set_pos(ui->screen_imgbtn_5, 46, 384); lv_obj_set_size(ui->screen_imgbtn_5, 60, 60); lv_obj_add_flag(ui->screen_imgbtn_5, LV_OBJ_FLAG_CHECKABLE); lv_imagebutton_set_src(ui->screen_imgbtn_5, LV_IMAGEBUTTON_STATE_RELEASED, &_dinuan3_RGB565A8_60x60, NULL, NULL); lv_imagebutton_set_src(ui->screen_imgbtn_5, LV_IMAGEBUTTON_STATE_PRESSED, &_dinuan2_RGB565A8_60x60, NULL, NULL); lv_imagebutton_set_src(ui->screen_imgbtn_5, LV_IMAGEBUTTON_STATE_CHECKED_RELEASED, &_dinuan3_RGB565A8_60x60, NULL, NULL); lv_imagebutton_set_src(ui->screen_imgbtn_5, LV_IMAGEBUTTON_STATE_CHECKED_PRESSED, &_dinuan2_RGB565A8_60x60, NULL, NULL); ui->screen_imgbtn_5_label = lv_label_create(ui->screen_imgbtn_5); lv_label_set_text(ui->screen_imgbtn_5_label, ""); lv_label_set_long_mode(ui->screen_imgbtn_5_label, LV_LABEL_LONG_WRAP); lv_obj_align(ui->screen_imgbtn_5_label, LV_ALIGN_CENTER, 0, 0); lv_obj_set_style_pad_all(ui->screen_imgbtn_5, 0, LV_STATE_DEFAULT); //Write style for screen_imgbtn_5, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_text_color(ui->screen_imgbtn_5, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_imgbtn_5, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_imgbtn_5, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_imgbtn_5, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_imgbtn_5, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write style for screen_imgbtn_5, Part: LV_PART_MAIN, State: LV_STATE_PRESSED. lv_obj_set_style_image_recolor_opa(ui->screen_imgbtn_5, 0, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_image_opa(ui->screen_imgbtn_5, 255, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_text_color(ui->screen_imgbtn_5, lv_color_hex(0xFF33FF), LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_text_font(ui->screen_imgbtn_5, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_text_opa(ui->screen_imgbtn_5, 255, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_shadow_width(ui->screen_imgbtn_5, 0, LV_PART_MAIN|LV_STATE_PRESSED); //Write style for screen_imgbtn_5, Part: LV_PART_MAIN, State: LV_STATE_CHECKED. lv_obj_set_style_image_recolor_opa(ui->screen_imgbtn_5, 0, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_image_opa(ui->screen_imgbtn_5, 255, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_color(ui->screen_imgbtn_5, lv_color_hex(0xFF33FF), LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_font(ui->screen_imgbtn_5, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_opa(ui->screen_imgbtn_5, 255, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_shadow_width(ui->screen_imgbtn_5, 0, LV_PART_MAIN|LV_STATE_CHECKED); //Write style for screen_imgbtn_5, Part: LV_PART_MAIN, State: LV_IMAGEBUTTON_STATE_RELEASED. lv_obj_set_style_image_recolor_opa(ui->screen_imgbtn_5, 0, LV_PART_MAIN|LV_IMAGEBUTTON_STATE_RELEASED); lv_obj_set_style_image_opa(ui->screen_imgbtn_5, 255, LV_PART_MAIN|LV_IMAGEBUTTON_STATE_RELEASED); //Write codes screen_lab_mode ui->screen_lab_mode = lv_label_create(ui->screen_cont_power_on); lv_obj_set_pos(ui->screen_lab_mode, 176, 399); lv_obj_set_size(ui->screen_lab_mode, 131, 34); lv_label_set_text(ui->screen_lab_mode, "模式"); lv_label_set_long_mode(ui->screen_lab_mode, LV_LABEL_LONG_WRAP); //Write style for screen_lab_mode, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_lab_mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_lab_mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_lab_mode, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_lab_mode, &lv_font_Alibaba_PuHuiTi_Medium_31, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_lab_mode, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui->screen_lab_mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui->screen_lab_mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_lab_mode, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_lab_mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_lab_mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_lab_mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_lab_mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_lab_mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_lab_mode, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_lab_env_temp ui->screen_lab_env_temp = lv_label_create(ui->screen_cont_power_on); lv_obj_set_pos(ui->screen_lab_env_temp, 181, 155); lv_obj_set_size(ui->screen_lab_env_temp, 71, 20); lv_label_set_text(ui->screen_lab_env_temp, "26°C"); lv_label_set_long_mode(ui->screen_lab_env_temp, LV_LABEL_LONG_WRAP); //Write style for screen_lab_env_temp, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_lab_env_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_lab_env_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_lab_env_temp, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_lab_env_temp, &lv_font_montserratMedium_16, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_lab_env_temp, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui->screen_lab_env_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui->screen_lab_env_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_lab_env_temp, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_lab_env_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_lab_env_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_lab_env_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_lab_env_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_lab_env_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_lab_env_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_lab_env_hum ui->screen_lab_env_hum = lv_label_create(ui->screen_cont_power_on); lv_obj_set_pos(ui->screen_lab_env_hum, 279, 155); lv_obj_set_size(ui->screen_lab_env_hum, 71, 20); lv_label_set_text(ui->screen_lab_env_hum, "40%"); lv_label_set_long_mode(ui->screen_lab_env_hum, LV_LABEL_LONG_WRAP); //Write style for screen_lab_env_hum, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_lab_env_hum, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_lab_env_hum, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_lab_env_hum, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_lab_env_hum, &lv_font_montserratMedium_16, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_lab_env_hum, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui->screen_lab_env_hum, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui->screen_lab_env_hum, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_lab_env_hum, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_lab_env_hum, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_lab_env_hum, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_lab_env_hum, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_lab_env_hum, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_lab_env_hum, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_lab_env_hum, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_lab_ac_temp ui->screen_lab_ac_temp = lv_label_create(ui->screen_cont_power_on); lv_obj_set_pos(ui->screen_lab_ac_temp, 165, 208); lv_obj_set_size(ui->screen_lab_ac_temp, 132, 72); lv_label_set_text(ui->screen_lab_ac_temp, "26"); lv_label_set_long_mode(ui->screen_lab_ac_temp, LV_LABEL_LONG_WRAP); //Write style for screen_lab_ac_temp, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_lab_ac_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_lab_ac_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_lab_ac_temp, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_lab_ac_temp, &lv_font_PuHui_ExtraBold_60, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_lab_ac_temp, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui->screen_lab_ac_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui->screen_lab_ac_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_lab_ac_temp, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_lab_ac_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_lab_ac_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_lab_ac_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_lab_ac_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_lab_ac_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_lab_ac_temp, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_ib_power ui->screen_ib_power = lv_imagebutton_create(ui->screen_cont_power_on); lv_obj_set_pos(ui->screen_ib_power, 199, 293); lv_obj_set_size(ui->screen_ib_power, 84, 84); lv_obj_add_flag(ui->screen_ib_power, LV_OBJ_FLAG_CHECKABLE); lv_imagebutton_set_src(ui->screen_ib_power, LV_IMAGEBUTTON_STATE_RELEASED, &_swtich_RGB565A8_84x84, NULL, NULL); lv_imagebutton_set_src(ui->screen_ib_power, LV_IMAGEBUTTON_STATE_PRESSED, &_swtich_RGB565A8_84x84, NULL, NULL); lv_imagebutton_set_src(ui->screen_ib_power, LV_IMAGEBUTTON_STATE_CHECKED_RELEASED, &_swtich_RGB565A8_84x84, NULL, NULL); ui->screen_ib_power_label = lv_label_create(ui->screen_ib_power); lv_label_set_text(ui->screen_ib_power_label, ""); lv_label_set_long_mode(ui->screen_ib_power_label, LV_LABEL_LONG_WRAP); lv_obj_align(ui->screen_ib_power_label, LV_ALIGN_CENTER, 0, 0); lv_obj_set_style_pad_all(ui->screen_ib_power, 0, LV_STATE_DEFAULT); //Write style for screen_ib_power, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_text_color(ui->screen_ib_power, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_ib_power, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_ib_power, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_ib_power, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_ib_power, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write style for screen_ib_power, Part: LV_PART_MAIN, State: LV_STATE_PRESSED. lv_obj_set_style_image_recolor_opa(ui->screen_ib_power, 0, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_image_opa(ui->screen_ib_power, 255, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_text_color(ui->screen_ib_power, lv_color_hex(0xFF33FF), LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_text_font(ui->screen_ib_power, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_text_opa(ui->screen_ib_power, 255, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_shadow_width(ui->screen_ib_power, 0, LV_PART_MAIN|LV_STATE_PRESSED); //Write style for screen_ib_power, Part: LV_PART_MAIN, State: LV_STATE_CHECKED. lv_obj_set_style_image_recolor_opa(ui->screen_ib_power, 0, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_image_opa(ui->screen_ib_power, 255, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_color(ui->screen_ib_power, lv_color_hex(0xFF33FF), LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_font(ui->screen_ib_power, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_opa(ui->screen_ib_power, 255, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_shadow_width(ui->screen_ib_power, 0, LV_PART_MAIN|LV_STATE_CHECKED); //Write style for screen_ib_power, Part: LV_PART_MAIN, State: LV_IMAGEBUTTON_STATE_RELEASED. lv_obj_set_style_image_recolor_opa(ui->screen_ib_power, 0, LV_PART_MAIN|LV_IMAGEBUTTON_STATE_RELEASED); lv_obj_set_style_image_opa(ui->screen_ib_power, 255, LV_PART_MAIN|LV_IMAGEBUTTON_STATE_RELEASED); //Write codes screen_cont_power_off ui->screen_cont_power_off = lv_obj_create(ui->screen); lv_obj_set_pos(ui->screen_cont_power_off, 0, 0); lv_obj_set_size(ui->screen_cont_power_off, 480, 480); lv_obj_set_scrollbar_mode(ui->screen_cont_power_off, LV_SCROLLBAR_MODE_OFF); //Write style for screen_cont_power_off, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_cont_power_off, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_cont_power_off, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_cont_power_off, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_cont_power_off, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_cont_power_off, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_cont_power_off, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_cont_power_off, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_cont_power_off, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_lab_env_hum_2 ui->screen_lab_env_hum_2 = lv_label_create(ui->screen_cont_power_off); lv_obj_set_pos(ui->screen_lab_env_hum_2, 300, 225); lv_obj_set_size(ui->screen_lab_env_hum_2, 71, 20); lv_label_set_text(ui->screen_lab_env_hum_2, "40%"); lv_label_set_long_mode(ui->screen_lab_env_hum_2, LV_LABEL_LONG_WRAP); //Write style for screen_lab_env_hum_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_lab_env_hum_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_lab_env_hum_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_lab_env_hum_2, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_lab_env_hum_2, &lv_font_montserratMedium_16, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_lab_env_hum_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui->screen_lab_env_hum_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui->screen_lab_env_hum_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_lab_env_hum_2, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_lab_env_hum_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_lab_env_hum_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_lab_env_hum_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_lab_env_hum_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_lab_env_hum_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_lab_env_hum_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_label_9 ui->screen_label_9 = lv_label_create(ui->screen_cont_power_off); lv_obj_set_pos(ui->screen_label_9, 184, 225); lv_obj_set_size(ui->screen_label_9, 71, 20); lv_label_set_text(ui->screen_label_9, "26°C"); lv_label_set_long_mode(ui->screen_label_9, LV_LABEL_LONG_WRAP); //Write style for screen_label_9, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_label_9, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_label_9, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_label_9, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_label_9, &lv_font_montserratMedium_16, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_label_9, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui->screen_label_9, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui->screen_label_9, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_label_9, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_label_9, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_label_9, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_label_9, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_label_9, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_label_9, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_label_9, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_label_10 ui->screen_label_10 = lv_label_create(ui->screen_cont_power_off); lv_obj_set_pos(ui->screen_label_10, 262, 218); lv_obj_set_size(ui->screen_label_10, 34, 32); lv_label_set_text(ui->screen_label_10, ""); lv_label_set_long_mode(ui->screen_label_10, LV_LABEL_LONG_WRAP); //Write style for screen_label_10, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_label_10, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_label_10, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_label_10, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_label_10, &lv_font_iconfont_25, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_label_10, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui->screen_label_10, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui->screen_label_10, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_label_10, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_label_10, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_label_10, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_label_10, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_label_10, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_label_10, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_label_10, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_label_11 ui->screen_label_11 = lv_label_create(ui->screen_cont_power_off); lv_obj_set_pos(ui->screen_label_11, 150, 218); lv_obj_set_size(ui->screen_label_11, 34, 32); lv_label_set_text(ui->screen_label_11, ""); lv_label_set_long_mode(ui->screen_label_11, LV_LABEL_LONG_WRAP); //Write style for screen_label_11, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->screen_label_11, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->screen_label_11, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->screen_label_11, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_label_11, &lv_font_iconfont_25, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_label_11, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui->screen_label_11, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui->screen_label_11, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_label_11, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->screen_label_11, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->screen_label_11, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->screen_label_11, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->screen_label_11, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->screen_label_11, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_label_11, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes screen_imgbtn_1 ui->screen_imgbtn_1 = lv_imagebutton_create(ui->screen_cont_power_off); lv_obj_set_pos(ui->screen_imgbtn_1, 199, 279); lv_obj_set_size(ui->screen_imgbtn_1, 84, 84); lv_obj_add_flag(ui->screen_imgbtn_1, LV_OBJ_FLAG_CHECKABLE); lv_imagebutton_set_src(ui->screen_imgbtn_1, LV_IMAGEBUTTON_STATE_RELEASED, &_swtich_RGB565A8_84x84, NULL, NULL); lv_imagebutton_set_src(ui->screen_imgbtn_1, LV_IMAGEBUTTON_STATE_PRESSED, &_swtich_RGB565A8_84x84, NULL, NULL); lv_imagebutton_set_src(ui->screen_imgbtn_1, LV_IMAGEBUTTON_STATE_CHECKED_RELEASED, &_swtich_RGB565A8_84x84, NULL, NULL); ui->screen_imgbtn_1_label = lv_label_create(ui->screen_imgbtn_1); lv_label_set_text(ui->screen_imgbtn_1_label, ""); lv_label_set_long_mode(ui->screen_imgbtn_1_label, LV_LABEL_LONG_WRAP); lv_obj_align(ui->screen_imgbtn_1_label, LV_ALIGN_CENTER, 0, 0); lv_obj_set_style_pad_all(ui->screen_imgbtn_1, 0, LV_STATE_DEFAULT); //Write style for screen_imgbtn_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_text_color(ui->screen_imgbtn_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->screen_imgbtn_1, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->screen_imgbtn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->screen_imgbtn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->screen_imgbtn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write style for screen_imgbtn_1, Part: LV_PART_MAIN, State: LV_STATE_PRESSED. lv_obj_set_style_image_recolor_opa(ui->screen_imgbtn_1, 0, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_image_opa(ui->screen_imgbtn_1, 255, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_text_color(ui->screen_imgbtn_1, lv_color_hex(0xFF33FF), LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_text_font(ui->screen_imgbtn_1, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_text_opa(ui->screen_imgbtn_1, 255, LV_PART_MAIN|LV_STATE_PRESSED); lv_obj_set_style_shadow_width(ui->screen_imgbtn_1, 0, LV_PART_MAIN|LV_STATE_PRESSED); //Write style for screen_imgbtn_1, Part: LV_PART_MAIN, State: LV_STATE_CHECKED. lv_obj_set_style_image_recolor_opa(ui->screen_imgbtn_1, 0, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_image_opa(ui->screen_imgbtn_1, 255, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_color(ui->screen_imgbtn_1, lv_color_hex(0xFF33FF), LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_font(ui->screen_imgbtn_1, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_text_opa(ui->screen_imgbtn_1, 255, LV_PART_MAIN|LV_STATE_CHECKED); lv_obj_set_style_shadow_width(ui->screen_imgbtn_1, 0, LV_PART_MAIN|LV_STATE_CHECKED); //Write style for screen_imgbtn_1, Part: LV_PART_MAIN, State: LV_IMAGEBUTTON_STATE_RELEASED. lv_obj_set_style_image_recolor_opa(ui->screen_imgbtn_1, 0, LV_PART_MAIN|LV_IMAGEBUTTON_STATE_RELEASED); lv_obj_set_style_image_opa(ui->screen_imgbtn_1, 255, LV_PART_MAIN|LV_IMAGEBUTTON_STATE_RELEASED); //The custom code of screen. //Update current screen layout. lv_obj_update_layout(ui->screen); //Init events for screen. events_init_screen(ui); }