// 接收方等待配对界面 - 显示image_reception图片
// KEY2双击后进入此界面，等待与发送方BLE配对

#include "../ui.h"

lv_obj_t *ui_ScreenImageReception = NULL;
static lv_obj_t *image_reception_img = NULL;

void ui_ScreenImageReception_screen_init(void) {
    ui_ScreenImageReception = lv_obj_create(NULL);
    lv_obj_clear_flag(ui_ScreenImageReception, LV_OBJ_FLAG_SCROLLABLE);
    lv_obj_set_style_bg_color(ui_ScreenImageReception, lv_color_hex(0x000000), LV_PART_MAIN);
    lv_obj_set_style_bg_opa(ui_ScreenImageReception, 255, LV_PART_MAIN);

    // 接收方等待配对图片（260x300），居中显示
    image_reception_img = lv_img_create(ui_ScreenImageReception);
    lv_img_set_src(image_reception_img, &ui_img_image_reception_png);
    lv_obj_set_align(image_reception_img, LV_ALIGN_CENTER);
    lv_obj_clear_flag(image_reception_img, LV_OBJ_FLAG_SCROLLABLE);

}

void ui_ScreenImageReception_screen_destroy(void) {
    if (ui_ScreenImageReception) lv_obj_del(ui_ScreenImageReception);
    ui_ScreenImageReception = NULL;
    image_reception_img = NULL;
}
