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

#include "../ui.h"

lv_obj_t *ui_ScreenImageShar = NULL;
static lv_obj_t *image_shar_img = NULL;

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

    // 发送方等待配对图片（260x300），居中显示
    image_shar_img = lv_img_create(ui_ScreenImageShar);
    lv_img_set_src(image_shar_img, &ui_img_image_shar_png);
    lv_obj_set_align(image_shar_img, LV_ALIGN_CENTER);
    lv_obj_clear_flag(image_shar_img, LV_OBJ_FLAG_SCROLLABLE);

}

void ui_ScreenImageShar_screen_destroy(void) {
    if (ui_ScreenImageShar) lv_obj_del(ui_ScreenImageShar);
    ui_ScreenImageShar = NULL;
    image_shar_img = NULL;
}
