// This file was generated by SquareLine Studio // SquareLine Studio version: SquareLine Studio 1.3.0 // LVGL version: 8.3.4 // Project name: chat_gpt #include "../ui.h" void ui_ScreenReset_screen_init(void) { ui_ScreenReset = lv_obj_create(NULL); lv_obj_clear_flag(ui_ScreenReset, LV_OBJ_FLAG_SCROLLABLE); /// Flags lv_obj_set_style_bg_img_src(ui_ScreenReset, &ui_img_setup_bg_png, LV_PART_MAIN | LV_STATE_DEFAULT); ui_LabelResetTitle = lv_label_create(ui_ScreenReset); lv_obj_set_width(ui_LabelResetTitle, 230); lv_obj_set_height(ui_LabelResetTitle, LV_SIZE_CONTENT); /// 140 lv_obj_set_x(ui_LabelResetTitle, 45); lv_obj_set_y(ui_LabelResetTitle, 15); lv_label_set_text(ui_LabelResetTitle, "Factory Reset"); lv_obj_set_style_text_color(ui_LabelResetTitle, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui_LabelResetTitle, 255, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui_LabelResetTitle, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui_LabelResetTitle, &ui_font_PingFangEN20, LV_PART_MAIN | LV_STATE_DEFAULT); ui_LabelResetContent = lv_label_create(ui_ScreenReset); lv_obj_set_width(ui_LabelResetContent, lv_pct(88)); lv_obj_set_height(ui_LabelResetContent, lv_pct(61)); lv_obj_set_x(ui_LabelResetContent, lv_pct(0)); lv_obj_set_y(ui_LabelResetContent, lv_pct(20)); lv_obj_set_align(ui_LabelResetContent, LV_ALIGN_TOP_MID); lv_label_set_text(ui_LabelResetContent, "1. Press the \"OK\" button to enter factory reset mode.\n2. Connect the box to your PC and add the OpenAI key and Wi-Fi credentials.\n3. Follow the on-screen prompts to complete the setup process."); lv_obj_set_style_text_color(ui_LabelResetContent, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui_LabelResetContent, 255, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui_LabelResetContent, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui_LabelResetContent, 5, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui_LabelResetContent, &ui_font_PingFangEN14, LV_PART_MAIN | LV_STATE_DEFAULT); ui_ButtonResetConfirm = lv_btn_create(ui_ScreenReset); lv_obj_set_width(ui_ButtonResetConfirm, 72); lv_obj_set_height(ui_ButtonResetConfirm, 24); lv_obj_set_x(ui_ButtonResetConfirm, 0); lv_obj_set_y(ui_ButtonResetConfirm, -20); lv_obj_set_align(ui_ButtonResetConfirm, LV_ALIGN_BOTTOM_MID); lv_obj_add_flag(ui_ButtonResetConfirm, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags lv_obj_clear_flag(ui_ButtonResetConfirm, LV_OBJ_FLAG_SCROLLABLE); /// Flags lv_obj_set_style_radius(ui_ButtonResetConfirm, 17, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_color(ui_ButtonResetConfirm, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui_ButtonResetConfirm, 255, LV_PART_MAIN | LV_STATE_DEFAULT); ui_LabelSetupBtn2 = lv_label_create(ui_ButtonResetConfirm); lv_obj_set_width(ui_LabelSetupBtn2, LV_SIZE_CONTENT); /// 1 lv_obj_set_height(ui_LabelSetupBtn2, LV_SIZE_CONTENT); /// 1 lv_obj_set_align(ui_LabelSetupBtn2, LV_ALIGN_CENTER); lv_label_set_text(ui_LabelSetupBtn2, "OK"); lv_obj_set_style_text_color(ui_LabelSetupBtn2, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui_LabelSetupBtn2, 255, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui_LabelSetupBtn2, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui_LabelSetupBtn2, &ui_font_PingFangEN16, LV_PART_MAIN | LV_STATE_DEFAULT); ui_ImageResetBack = lv_img_create(ui_ScreenReset); lv_img_set_src(ui_ImageResetBack, &ui_img_settings_back_png); lv_obj_set_width(ui_ImageResetBack, LV_SIZE_CONTENT); /// 1 lv_obj_set_height(ui_ImageResetBack, LV_SIZE_CONTENT); /// 1 lv_obj_set_x(ui_ImageResetBack, 10); lv_obj_set_y(ui_ImageResetBack, 10); lv_obj_add_flag(ui_ImageResetBack, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_ADV_HITTEST); /// Flags lv_obj_clear_flag(ui_ImageResetBack, LV_OBJ_FLAG_SCROLLABLE); /// Flags lv_obj_set_style_border_color(ui_ImageResetBack, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_opa(ui_ImageResetBack, 255, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(ui_ImageResetBack, 5, LV_PART_MAIN | LV_STATE_FOCUSED); lv_obj_add_event_cb(ui_ButtonResetConfirm, ui_event_ButtonResetConfirm, LV_EVENT_ALL, NULL); lv_obj_add_event_cb(ui_ImageResetBack, ui_event_ImageResetBack, LV_EVENT_ALL, NULL); }